[PATCH 2 of 2] run-tests: only check the common criteria once per test

Simon Heimberg simohe at besonet.ch
Sat Jul 13 17:01:34 CDT 2013


# HG changeset patch
# User Simon Heimberg <simohe at besonet.ch>
# Date 1373750105 -7200
# Node ID c634510b16e8c57c1bc9451e0947bbd912d6fc75
# Parent  ab2c53cd3dc04cda954266c54c7424cddf72c336
run-tests: only check the common criteria once per test

diff -r ab2c53cd3dc0 -r c634510b16e8 tests/run-tests.py
--- a/tests/run-tests.py	Sam Jul 13 23:14:01 2013 +0200
+++ b/tests/run-tests.py	Sam Jul 13 23:15:05 2013 +0200
@@ -915,8 +915,10 @@
                 else:
                     return ignore("doesn't match keyword")
 
+    if not lctest.startswith("test-"):
+        return skip("not a test file")
     for ext, func, out in testtypes:
-        if lctest.startswith("test-") and lctest.endswith(ext):
+        if lctest.endswith(ext):
             runner = func
             ref = os.path.join(TESTDIR, test + out)
             break


More information about the Mercurial-devel mailing list