run-tests: kill daemons during tearDown()
authorGregory Szorc <gregory.szorc@gmail.com>
Sun, 20 Apr 2014 15:46:34 -0700
changeset 21456 a06a4142ad1f
parent 21455 0f0bace82149
child 21457 12dd94e32102
run-tests: kill daemons during tearDown()
tests/run-tests.py
--- a/tests/run-tests.py	Mon Apr 21 09:30:11 2014 -0700
+++ b/tests/run-tests.py	Sun Apr 20 15:46:34 2014 -0700
@@ -456,8 +456,6 @@
         except Exception, e:
             return self.fail('Exception during execution: %s' % e, 255)
 
-        killdaemons(env['DAEMON_PIDS'])
-
         def describe(ret):
             if ret < 0:
                 return 'killed by signal: %d' % -ret
@@ -522,6 +520,10 @@
 
     def tearDown(self):
         """Tasks to perform after run()."""
+        for entry in self._daemonpids:
+            killdaemons(entry)
+        self._daemonpids = []
+
         if not self._options.keep_tmpdir:
             shutil.rmtree(self._testtmp)