changeset 21332:60ce874f5b06

run-tests: move test name filter to Test.run()
author Gregory Szorc <gregory.szorc@gmail.com>
date Sat, 19 Apr 2014 21:08:03 -0700
parents bfe929a4b45b
children 9a5913beaf77
files tests/run-tests.py
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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