diff run_tests.py @ 4968:461def18244d

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.
author John Kristensen <john@jerrykan.com>
date Sun, 08 Feb 2015 00:35:41 +1100
parents 4960a2c21590
children 380d8d8b30a3
line wrap: on
line diff
--- a/run_tests.py	Thu Mar 05 00:19:42 2015 +1100
+++ b/run_tests.py	Sun Feb 08 00:35:41 2015 +1100
@@ -605,6 +605,9 @@
         else:
             raise
 
+    return r
+
+
 def remove_stale_bytecode(arg, dirname, names):
     names = map(os.path.normcase, names)
     for name in names:
@@ -665,7 +668,8 @@
                 print "totalrefcount=%-8d change=%-6d" % (rc, rc - prev)
                 track.update()
     else:
-        runner(files, test_filter, debug)
+        result = runner(files, test_filter, debug)
+        return len(result.failures + result.errors) > 0
 
 
 def process_args(argv=None):

Roundup Issue Tracker: http://roundup-tracker.org/