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

login
register
mail settings
Submitter Simon Heimberg
Date July 13, 2013, 10:01 p.m.
Message ID <c634510b16e8c57c1bc9.1373752894@lapsi.heimberg.home>
Download mbox | patch
Permalink /patch/1873/
State Accepted
Commit 534cdbe87cad7087d0d1e627c901b84de29b0077
Delegated to: Augie Fackler
Headers show

Comments

Simon Heimberg - July 13, 2013, 10:01 p.m.
# HG changeset patch
# User Simon Heimberg <simohe@besonet.ch>
# Date 1373750105 -7200
# Node ID c634510b16e8c57c1bc9451e0947bbd912d6fc75
# Parent  ab2c53cd3dc04cda954266c54c7424cddf72c336
run-tests: only check the common criteria once per test

Patch

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