Skip to content

Commit

Permalink
[BEAM-14467] Fix bug where run_pytest.sh does not elevate errors rai…
Browse files Browse the repository at this point in the history
…sed in no_xdist tests (apache#17687)
  • Loading branch information
TheNeuralBit authored May 17, 2022
1 parent 0e6a014 commit 6774b74
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions sdks/python/scripts/run_pytest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 6774b74

Please sign in to comment.