# HG changeset patch
# User Simon Heimberg <simohe@besonet.ch>
# Date 1392274926 -3600
# Node ID d15090c7d55537064686bee0bc8745a9922df843
# Parent  2ff0ff8404a53ee5eb07c84f344362d8410d5738
run-tests: handle sys.exit in main function

[ original upstream message ]

diff -r 2ff0ff8404a5 -r d15090c7d555 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)