run-tests: use env dict to kill daemons
authorMatt Mackall <mpm@selenic.com>
Sun, 02 Jun 2013 14:04:55 -0500
changeset 19263 062c0a0a5549
parent 19262 7864e8f274fe
child 19264 eac114e13b96
run-tests: use env dict to kill daemons
tests/run-tests.py
--- 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)