have test.py return status
authorCraig Dowell <craigdo@ee.washington.edu>
Thu, 01 Oct 2009 11:53:19 -0700
changeset 5350 9f457bebbcf4
parent 5349 8e8459d1831b
child 5351 6abced63cd7f
have test.py return status
test.py
--- a/test.py	Thu Oct 01 17:38:21 2009 +0400
+++ b/test.py	Thu Oct 01 11:53:19 2009 -0700
@@ -1054,6 +1054,11 @@
     if len(options.xml):
         shutil.copyfile(xml_results_file, options.xml)
 
+    if passed_tests == total_tests:
+        return 0
+    else:
+        return -1
+
 def main(argv):
     random.seed()
 
@@ -1100,8 +1105,8 @@
     global options
     options = parser.parse_args()[0]
     signal.signal(signal.SIGINT, sigint_hook)
-    run_tests()
-    return 0
+    
+    return run_tests()
 
 if __name__ == '__main__':
     sys.exit(main(sys.argv))