[PATCH STABLE] tests: run test-check-code* last

Matt Harbison matt_harbison at yahoo.com
Sun Sep 9 22:14:13 CDT 2012


# HG changeset patch
# User Matt Harbison <matt_harbison at yahoo.com>
# Date 1347244676 14400
# Branch stable
# Node ID 299d1005b72ce3f803f6b1dff0a7788fc73710f0
# Parent  3ee5d3c372fabcf57c305835dac98da78bdc1837
tests: run test-check-code* last

Part of check-code.py scans the output of the tests and helpfully indicates that
(glob) needs to be used on paths for Windows compatibility.  But since the tests
are run in sorted order, the majority of the tests get run after check-code and
will need a second run of the tests to pick up the problem.

I don't see a mechanism in place to ensure these are run only after all others
complete in parallel mode, but this is still an improvement in that the vast
majority of tests will be covered.

diff --git a/tests/run-tests.py b/tests/run-tests.py
--- a/tests/run-tests.py
+++ b/tests/run-tests.py
@@ -1210,7 +1210,14 @@
         args = os.listdir(".")
     args.sort()
 
-    tests = args
+    notcheck, check = [], []
+    for f in args:
+        if f.startswith('test-check-code'):
+            check.append(f)
+        else:
+            notcheck.append(f)
+
+    tests = notcheck + check
 
     # Reset some environment variables to well-known values so that
     # the tests produce repeatable output.


More information about the Mercurial-devel mailing list