[PATCH 2 of 3] run-tests: fix error when timeout occures

Simon Heimberg simohe at besonet.ch
Wed Apr 22 05:01:43 CDT 2009


# HG changeset patch
# User Simon Heimberg <simohe at besonet.ch>
# Date 1240384306 -7200
# Node ID 8dcac5c4675773c3353043834375f0585628e356
# Parent  85abf8746a72d4398ff1dd3359824d2f178c7b48
run-tests: fix error when timeout occures

diff -r 85abf8746a72 -r 8dcac5c46757 tests/run-tests.py
--- a/tests/run-tests.py	Mit Apr 22 09:07:25 2009 +0200
+++ b/tests/run-tests.py	Mit Apr 22 09:11:46 2009 +0200
@@ -303,7 +303,7 @@
 def alarmed(signum, frame):
     raise Timeout
 
-def run(cmd):
+def run(cmd, options):
     """Run command in a sub-process, capturing the output (stdout and stderr).
     Return the exist code, and output."""
     # TODO: Use subprocess.Popen if we're running on Python 2.4
@@ -409,7 +409,7 @@
         signal.alarm(options.timeout)
 
     vlog("# Running", cmd)
-    ret, out = run(cmd)
+    ret, out = run(cmd, options)
     vlog("# Ret was:", ret)
 
     if options.timeout > 0:


More information about the Mercurial-devel mailing list