run-tests: check for test file existence in Test.run()
authorGregory Szorc <gregory.szorc@gmail.com>
Sat, 19 Apr 2014 21:00:24 -0700
changeset 21328 9da0761a22a1
parent 21327 206814c9072a
child 21329 8ead79ffbc40
run-tests: check for test file existence in Test.run() We delay this a little bit. But it shouldn't really matter when the check is performed.
tests/run-tests.py
--- a/tests/run-tests.py	Sat Apr 19 20:53:45 2014 -0700
+++ b/tests/run-tests.py	Sat Apr 19 21:00:24 2014 -0700
@@ -582,6 +582,10 @@
             shutil.rmtree(self._threadtmp, True)
 
     def run(self, result):
+        if not os.path.exists(self._path):
+            result.skipped = True
+            return self.skip("Doesn't exist")
+
         # Remove any previous output files.
         if os.path.exists(self._errpath):
             os.remove(self._errpath)
@@ -1112,9 +1116,6 @@
     err = os.path.join(TESTDIR, test + ".err")
     lctest = test.lower()
 
-    if not os.path.exists(testpath):
-            return skip("doesn't exist")
-
     if not (options.whitelisted and test in options.whitelisted):
         if options.blacklist and test in options.blacklist:
             return skip("blacklisted")