[PATCH 1 of 3] run-tests: extract correct status when script terminates with exit

Patrick Mezard pmezard at gmail.com
Sat Jul 14 11:35:46 CDT 2007


# HG changeset patch
# User Patrick Mezard <pmezard at gmail.com>
# Date 1184414471 -7200
# Node ID 1a293598985e7d0835c8ea24408c7b86290b2b93
# Parent  15efc1d061431c1d7aa18b4ab4161c60dcea86ac
run-tests: extract correct status when script terminates with exit

diff -r 15efc1d06143 -r 1a293598985e tests/run-tests.py
--- a/tests/run-tests.py	Sun Jul 08 12:58:19 2007 +0200
+++ b/tests/run-tests.py	Sat Jul 14 14:01:11 2007 +0200
@@ -205,6 +205,8 @@ def run(cmd):
             proc.tochild.close()
             output = proc.fromchild.read()
             ret = proc.wait()
+            if os.WIFEXITED(ret):
+                ret = os.WEXITSTATUS(ret)
         except Timeout:
             vlog('# Process %d timed out - killing it' % proc.pid)
             os.kill(proc.pid, signal.SIGTERM)


More information about the Mercurial-devel mailing list