run-tests: use env dict to kill daemons stable
authorMatt Mackall <mpm@selenic.com>
Sun, 02 Jun 2013 14:04:55 -0500
branchstable
changeset 1242 2d7fa9712652
parent 1241 bc56ed64a2c8
child 1243 00ca4c2f51cc
run-tests: use env dict to kill daemons [ original upstream message ]
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)