run-tests: move test name filter to Test.run()
authorGregory Szorc <gregory.szorc@gmail.com>
Sat, 19 Apr 2014 21:08:03 -0700
changeset 21332 60ce874f5b06
parent 21331 bfe929a4b45b
child 21333 9a5913beaf77
run-tests: move test name filter to Test.run()
tests/run-tests.py
--- a/tests/run-tests.py	Sat Apr 19 21:05:50 2014 -0700
+++ b/tests/run-tests.py	Sat Apr 19 21:08:03 2014 -0700
@@ -605,6 +605,9 @@
                     else:
                         return self.ignore("doesn't match keyword")
 
+        if not os.path.basename(self._test.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)
@@ -1135,8 +1138,6 @@
     err = os.path.join(TESTDIR, test + ".err")
     lctest = test.lower()
 
-    if not os.path.basename(lctest).startswith("test-"):
-        return skip("not a test file")
     for ext, cls, out in testtypes:
         if lctest.endswith(ext):
             runner = cls