run-tests: move killdaemons into Test.run()
killdaemons() was the only part of runone() looking at env variables. We
move killdaemons() into Test.run() to enable us to fully move env into
Test.
--- a/tests/run-tests.py Sat Apr 19 13:18:55 2014 -0700
+++ b/tests/run-tests.py Sat Apr 19 13:22:52 2014 -0700
@@ -560,7 +560,10 @@
def run(self, env):
createhgrc(env['HGRCPATH'], self._options)
- return self._run(self._replacements, env)
+ try:
+ return self._run(self._replacements, env)
+ finally:
+ killdaemons(env['DAEMON_PIDS'])
def _run(self, replacements, env):
raise NotImplemented('Subclasses must implement Test.run()')
@@ -1036,8 +1039,6 @@
times.append((test, endtime - starttime))
vlog("# Ret was:", ret)
- killdaemons(env['DAEMON_PIDS'])
-
skipped = (ret == SKIPPED_STATUS)
# If we're not in --debug mode and reference output file exists,