changeset 21457:12dd94e32102

run-tests: move errpath deletion to setUp()
author Gregory Szorc <gregory.szorc@gmail.com>
date Sun, 20 Apr 2014 15:53:25 -0700
parents a06a4142ad1f
children c42219733f30
files tests/run-tests.py
diffstat 1 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/tests/run-tests.py	Sun Apr 20 15:46:34 2014 -0700
+++ b/tests/run-tests.py	Sun Apr 20 15:53:25 2014 -0700
@@ -398,6 +398,10 @@
                                      os.path.basename(self._path))
         os.mkdir(self._testtmp)
 
+        # Remove any previous output files.
+        if os.path.exists(self._errpath):
+            os.remove(self._errpath)
+
     def run(self):
         """Run this test instance.
 
@@ -430,10 +434,6 @@
         if not os.path.basename(self.name.lower()).startswith('test-'):
             return self.skip('not a test file')
 
-        # Remove any previous output files.
-        if os.path.exists(self._errpath):
-            os.remove(self._errpath)
-
         replacements, port = self._getreplacements()
         env = self._getenv(port)
         self._daemonpids.append(env['DAEMON_PIDS'])