Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BEAM-14467] Fix bug where run_pytest.sh does not elevate errors raised in no_xdist tests #17687

Merged
merged 1 commit into from
May 17, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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