support terminating the test runner without error return code even after test failures
authorStefan Behnel <scoder@users.berlios.de>
Fri, 5 Mar 2010 22:33:08 +0000 (23:33 +0100)
committerStefan Behnel <scoder@users.berlios.de>
Fri, 5 Mar 2010 22:33:08 +0000 (23:33 +0100)
runtests.py

index daff5a0e0c4bf4dece5b8d32e50f0520e293738b..b459b28e517ad050fec6717d0e9cff204c96be79 100644 (file)
@@ -727,6 +727,9 @@ if __name__ == '__main__':
                       help="a bug ticket number to run the respective test in 'tests/*'")
     parser.add_option("--xml-output", dest="xml_output_dir", metavar="DIR",
                       help="write test results in XML to directory DIR")
+    parser.add_option("--exit-ok", dest="exit_ok", default=False,
+                      action="store_true",
+                      help="exit without error code even on test failures")
 
     options, cmd_args = parser.parse_args()
 
@@ -907,4 +910,7 @@ if __name__ == '__main__':
         import refnanny
         sys.stderr.write("\n".join([repr(x) for x in refnanny.reflog]))
 
-    sys.exit(not result.wasSuccessful())
+    if options.exit_ok:
+        sys.exit(0)
+    else:
+        sys.exit(not result.wasSuccessful())