From: Jan Kotas Date: Tue, 6 Feb 2018 19:11:47 +0000 (-0800) Subject: Fix handling of return code for system() calls (#16225) X-Git-Tag: accepted/tizen/unified/20190422.045933~3066 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a3632298282f1c6a85c02b80d921075ee1af0d1e;p=platform%2Fupstream%2Fcoreclr.git Fix handling of return code for system() calls (#16225) The value returned from system() is encoded bag of bits that gets misinterpretted once it starts propagate through the system. Normalize it to 0/1. --- diff --git a/tests/scripts/run-corefx-tests.py b/tests/scripts/run-corefx-tests.py index ba49631..7f6ff39 100644 --- a/tests/scripts/run-corefx-tests.py +++ b/tests/scripts/run-corefx-tests.py @@ -237,8 +237,8 @@ def main(args): command = "git checkout %s" % fx_commit log(command) returncode = 0 if testing else os.system(command) - if not returncode == 0: - sys.exit(returncode) + if returncode != 0: + sys.exit(1) # On Unix, coreFx build.sh requires HOME to be set, and it isn't by default # under our CI system, so set it now. @@ -266,7 +266,7 @@ def main(args): log(command) returncode = 0 if testing else os.system(command) if returncode != 0: - sys.exit(returncode) + sys.exit(1) # Build the build-tests command line. @@ -303,8 +303,10 @@ def main(args): log(command) returncode = 0 if testing else os.system(command) + if returncode != 0: + sys.exit(1) - sys.exit(returncode) + sys.exit(0) ##########################################################################