diff --git a/sdks/python/scripts/run_pytest.sh b/sdks/python/scripts/run_pytest.sh index cd8b8b74c5dc..6c7d5c46e78e 100755 --- a/sdks/python/scripts/run_pytest.sh +++ b/sdks/python/scripts/run_pytest.sh @@ -43,15 +43,15 @@ pytest -o junit_suite_name=${envname}_no_xdist \ --junitxml=pytest_${envname}_no_xdist.xml -m 'no_xdist' ${pytest_args} --pyargs ${posargs} status2=$? -# Exit with error if no tests were run (status code 5). +# Exit with error if no tests were run in either suite (status code 5). if [[ $status1 == 5 && $status2 == 5 ]]; then exit $status1 fi # Exit with error if one of the statuses has an error that's not 5. -if [[ $status1 && $status1 != 5 ]]; then +if [[ $status1 != 0 && $status1 != 5 ]]; then exit $status1 fi -if [[ $status2 && $status2 != 5 ]]; then +if [[ $status2 != 0 && $status2 != 5 ]]; then exit $status2 fi