run-tests: add ignores list stable
authorMatt Mackall <mpm@selenic.com>
Fri, 22 Apr 2011 11:22:02 -0500
branchstable
changeset 904 d758c9ebc705
parent 903 92c48e9ca3a7
child 905 66b8706b3112
run-tests: add ignores list [ original upstream message ]
tests/run-tests.py
--- a/tests/run-tests.py	Thu Apr 21 18:38:30 2011 -0500
+++ b/tests/run-tests.py	Fri Apr 22 11:22:02 2011 -0500
@@ -633,7 +633,7 @@
         output = re.sub(s, r, output)
     return ret, splitnewlines(output)
 
-def runone(options, test, skips, fails):
+def runone(options, test, skips, fails, ignores):
     '''tristate output:
     None -> skipped
     True -> passed
@@ -940,17 +940,18 @@
 
         skips = []
         fails = []
+        ignores = []
 
         for test in tests:
             if options.blacklist:
                 filename = options.blacklist.get(test)
                 if filename is not None:
-                    skips.append((test, "blacklisted (%s)" % filename))
+                    skipped.append((test, "blacklisted (%s)" % filename))
                     skipped += 1
                     continue
 
             if options.retest and not os.path.exists(test + ".err"):
-                skipped += 1
+                ignores.append((test, "not retesting"))
                 continue
 
             if options.keywords:
@@ -964,10 +965,10 @@
                     if k in t:
                         break
                 else:
-                    skipped += 1
+                    ignores.append((test, "doesn't match keyword"))
                     continue
 
-            ret = runone(options, test, skips, fails)
+            ret = runone(options, test, skips, fails, ignores)
             if ret is None:
                 skipped += 1
             elif not ret:
@@ -992,7 +993,7 @@
                 print "Failed %s: %s" % s
             _checkhglib("Tested")
             print "# Ran %d tests, %d skipped, %d failed." % (
-                tested, skipped, failed)
+                tested, len(skips) + len(ignores), failed)
 
         if options.anycoverage:
             outputcoverage(options)