Skip to content

Commit 0f2f40a

Browse files
authored
fix test result output on Windows (#951)
* fix test result output on Windows Using `call` swallows the exit code of the test runner, making Jenkins mark failed test runs as unstable instead of failed. * exit if pytest fails * set error code explicitly
1 parent 294e244 commit 0f2f40a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

scripts/run-tests.bat

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ if "%VERSION%" == "2.7" set IGNORE_PYTHON3_WITH_PYTHON2=--ignore-glob="*\py3_*.p
1515

1616
set PYTEST_JUNIT="--junitxml=.\tests\python-agent-junit.xml"
1717
if "%ASYNCIO%" == "true" (
18-
call %PYTHON%\python.exe -m pytest %PYTEST_JUNIT% %IGNORE_PYTHON3_WITH_PYTHON2% --cov --cov-context=test --cov-branch --cov-config=setup.cfg -m "not integrationtest"
18+
%PYTHON%\python.exe -m pytest %PYTEST_JUNIT% %IGNORE_PYTHON3_WITH_PYTHON2% --cov --cov-context=test --cov-branch --cov-config=setup.cfg -m "not integrationtest" || exit /b 1
1919
)
2020
if "%ASYNCIO%" == "false" (
21-
call %PYTHON%\python.exe -m pytest %PYTEST_JUNIT% --ignore-glob="*\asyncio*\*" %IGNORE_PYTHON3_WITH_PYTHON2% --cov --cov-context=test --cov-branch --cov-config=setup.cfg -m "not integrationtest"
21+
%PYTHON%\python.exe -m pytest %PYTEST_JUNIT% --ignore-glob="*\asyncio*\*" %IGNORE_PYTHON3_WITH_PYTHON2% --cov --cov-context=test --cov-branch --cov-config=setup.cfg -m "not integrationtest" || exit /b 1
2222
)
2323
call %PYTHON%\python.exe setup.py bdist_wheel

0 commit comments

Comments
 (0)