From patchwork Thu Feb 13 22:36:56 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [2,of,7] run-tests: handle sys.exit in main function From: Simon Heimberg X-Patchwork-Id: 3645 Message-Id: <19e87c239bfeef21b439.1392331016@lapsasi> To: Mercurial-devel Date: Thu, 13 Feb 2014 23:36:56 +0100 # HG changeset patch # User Simon Heimberg # Date 1392274926 -3600 # Thu Feb 13 08:02:06 2014 +0100 # Node ID 19e87c239bfeef21b439f4c1b3436af1f0096f44 # Parent be8f06e69f033b982017c48eb999a089e695875e run-tests: handle sys.exit in main function diff -r be8f06e69f03 -r 19e87c239bfe tests/run-tests.py --- a/tests/run-tests.py Thu Feb 13 07:29:28 2014 +0100 +++ b/tests/run-tests.py Thu Feb 13 08:02:06 2014 +0100 @@ -1163,7 +1163,7 @@ print "\ninterrupted!" if failed: - sys.exit(1) + return 1 testtypes = [('.py', pytest, '.out'), ('.t', tsttest, '')] @@ -1273,7 +1273,7 @@ vlog("# Using", IMPL_PATH, os.environ[IMPL_PATH]) try: - runtests(options, tests) + sys.exit(runtests(options, tests) or 0) finally: time.sleep(.1) cleanup(options)