From: Stefan Behnel Date: Fri, 5 Mar 2010 22:33:08 +0000 (+0100) Subject: support terminating the test runner without error return code even after test failures X-Git-Tag: 0.13.beta0~2^2~102^2 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=7fd95d1a5e23bb823c1c4b4bde49cd9fbbd12142;p=cython.git support terminating the test runner without error return code even after test failures --- diff --git a/runtests.py b/runtests.py index daff5a0e..b459b28e 100644 --- a/runtests.py +++ b/runtests.py @@ -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())