run-tests: move blacklist and retest filtering to runone
authorMatt Mackall <mpm@selenic.com>
Fri, 22 Apr 2011 11:36:40 -0500
changeset 13993 174d0a113757
parent 13992 ec4ae5727f07
child 13994 f31a5b7f5c07
run-tests: move blacklist and retest filtering to runone
tests/run-tests.py
--- a/tests/run-tests.py	Fri Apr 22 11:32:05 2011 -0500
+++ b/tests/run-tests.py	Fri Apr 22 11:36:40 2011 -0500
@@ -671,6 +671,16 @@
     else:
         return None # not a supported test, don't record
 
+    if options.blacklist:
+        filename = options.blacklist.get(test)
+        if filename is not None:
+            skipped.append((test, "blacklisted (%s)" % filename))
+            return None
+
+    if options.retest and not os.path.exists(test + ".err"):
+        ignores.append((test, "not retesting"))
+        return None
+
     if options.keywords:
         fp = open(test)
         t = fp.read().lower() + test.lower()
@@ -953,16 +963,6 @@
         ignores = []
 
         for test in tests:
-            if options.blacklist:
-                filename = options.blacklist.get(test)
-                if filename is not None:
-                    skipped.append((test, "blacklisted (%s)" % filename))
-                    continue
-
-            if options.retest and not os.path.exists(test + ".err"):
-                ignores.append((test, "not retesting"))
-                continue
-
             ret = runone(options, test, skips, passes, fails, ignores)
             if options.first and ret is not None and not ret:
                 break