From 49d937e42e46467049404a8dabaf5cc57de735a2 Mon Sep 17 00:00:00 2001 From: David Mandelin Date: Mon, 26 Oct 2009 13:02:19 -0700 Subject: [PATCH] Bug 524400: make trace-test.py return nonzero exit code if there were test failures, r=jorendorff --HG-- extra : rebase_source : e3658606a5fbeb971c7dda101af9943e8d6278ad --- js/src/trace-test/trace-test.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/js/src/trace-test/trace-test.py b/js/src/trace-test/trace-test.py index 771937f39066..669647c9eae2 100644 --- a/js/src/trace-test/trace-test.py +++ b/js/src/trace-test/trace-test.py @@ -212,8 +212,10 @@ def run_tests(tests, test_dir, lib_dir): print(' ' + subprocess.list2cmdline(get_test_cmd(test, lib_dir))) else: print(' ' + test) + return False else: print('PASSED ALL' + ('' if complete else ' (partial run -- interrupted by user %s)'%doing)) + return True if __name__ == '__main__': script_path = os.path.abspath(__file__) @@ -317,7 +319,9 @@ if __name__ == '__main__': sys.exit() try: - run_tests(test_list, test_dir, lib_dir) + ok = run_tests(test_list, test_dir, lib_dir) + if not ok: + sys.exit(2) except OSError: if not os.path.exists(JS): print >> sys.stderr, "JS shell argument: file does not exist: '%s'"%JS