Skip to content

Commit 76cf94c

Browse files
committed
Return error code if run_tests.py fails
When any of the tests fail the run_tests.py script should return an error code to indicate that not all of the tests have passed.
1 parent 64e537d commit 76cf94c

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

run_tests.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -605,6 +605,9 @@ def runner(files, test_filter, debug):
605605
else:
606606
raise
607607

608+
return r
609+
610+
608611
def remove_stale_bytecode(arg, dirname, names):
609612
names = map(os.path.normcase, names)
610613
for name in names:
@@ -665,7 +668,8 @@ def main(module_filter, test_filter, libdir):
665668
print "totalrefcount=%-8d change=%-6d" % (rc, rc - prev)
666669
track.update()
667670
else:
668-
runner(files, test_filter, debug)
671+
result = runner(files, test_filter, debug)
672+
return len(result.failures + result.errors) > 0
669673

670674

671675
def process_args(argv=None):

0 commit comments

Comments
 (0)