changeset 19263:062c0a0a5549

run-tests: use env dict to kill daemons
author Matt Mackall <mpm@selenic.com>
date Sun, 02 Jun 2013 14:04:55 -0500
parents 7864e8f274fe
children eac114e13b96
files tests/run-tests.py
diffstat 1 files changed, 5 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/tests/run-tests.py	Sun Jun 02 13:45:08 2013 -0500
+++ b/tests/run-tests.py	Sun Jun 02 14:04:55 2013 -0500
@@ -383,8 +383,8 @@
     except OSError:
         pass
 
-def killdaemons():
-    return killmod.killdaemons(DAEMON_PIDS, tryhard=False, remove=True,
+def killdaemons(pidfile):
+    return killmod.killdaemons(pidfile, tryhard=False, remove=True,
                                logfn=vlog)
 
 def cleanup(options):
@@ -806,7 +806,7 @@
         ret = proc.wait()
         if ret == 0:
             ret = signal.SIGTERM << 8
-        killdaemons()
+        killdaemons(env['DAEMON_PIDS'])
         return ret
 
     output = ''
@@ -827,7 +827,7 @@
         ret = 'timeout'
 
     if ret:
-        killdaemons()
+        killdaemons(env['DAEMON_PIDS'])
 
     for s, r in replacements:
         output = re.sub(s, r, output)
@@ -940,7 +940,7 @@
         times.append((test, endtime - starttime))
     vlog("# Ret was:", ret)
 
-    killdaemons()
+    killdaemons(env['DAEMON_PIDS'])
 
     skipped = (ret == SKIPPED_STATUS)