changeset 13993:174d0a113757

run-tests: move blacklist and retest filtering to runone
author Matt Mackall <mpm@selenic.com>
date Fri, 22 Apr 2011 11:36:40 -0500
parents ec4ae5727f07
children f31a5b7f5c07
files tests/run-tests.py
diffstat 1 files changed, 10 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- 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