Skip to content

Commit 7265aed

Browse files
author
Sylvain MARIE
committed
Fixed test runner to accelerate some targets (no html nor coverage reports when not needed)
1 parent 54e9237 commit 7265aed

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

ci_tools/run_tests.sh

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,13 @@ cleanup() {
1212

1313
trap "cleanup" INT TERM EXIT
1414

15-
# Run tests with "python -m pytest" to use the correct version of pytest
16-
echo -e "\n\n****** Running tests ******\n\n"
17-
python -m pytest --junitxml=reports/junit/junit.xml --html=reports/junit/report.html --cov-report term-missing --cov=./pytest_cases -v pytest_cases/tests/
15+
if [ "${TRAVIS_PYTHON_VERSION}" = "3.5" ]; then
16+
# full
17+
# Run tests with "python -m pytest" to use the correct version of pytest
18+
echo -e "\n\n****** Running tests ******\n\n"
19+
python -m pytest --junitxml=reports/junit/junit.xml --html=reports/junit/report.html --cov-report term-missing --cov=./pytest_cases -v pytest_cases/tests/
20+
else
21+
# faster - skip coverage and html report but keep junit (because used in validity threshold)
22+
echo -e "\n\n****** Running tests******\n\n"
23+
python -m pytest --junitxml=reports/junit/junit.xml -v pytest_cases/tests/
24+
fi

0 commit comments

Comments
 (0)