From 7fd95d1a5e23bb823c1c4b4bde49cd9fbbd12142 Mon Sep 17 00:00:00 2001 From: Stefan Behnel Date: Fri, 5 Mar 2010 23:33:08 +0100 Subject: [PATCH] support terminating the test runner without error return code even after test failures --- runtests.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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()) -- 2.26.2