You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beam.apache.org by bh...@apache.org on 2022/05/17 16:49:18 UTC

[beam] branch master updated: [BEAM-14467] Fix bug where run_pytest.sh does not elevate errors raised in no_xdist tests (#17687)

This is an automated email from the ASF dual-hosted git repository.

bhulette pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/beam.git


The following commit(s) were added to refs/heads/master by this push:
     new 6774b747ba4  [BEAM-14467] Fix bug where run_pytest.sh does not elevate errors raised in no_xdist tests (#17687)
6774b747ba4 is described below

commit 6774b747ba42fdc187d4ba8dc34f48a3e1cc9368
Author: Brian Hulette <bh...@google.com>
AuthorDate: Tue May 17 09:49:13 2022 -0700

     [BEAM-14467] Fix bug where run_pytest.sh does not elevate errors raised in no_xdist tests (#17687)
---
 sdks/python/scripts/run_pytest.sh | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/sdks/python/scripts/run_pytest.sh b/sdks/python/scripts/run_pytest.sh
index cd8b8b74c5d..6c7d5c46e78 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