Patchwork [1,of,2] run-tests: test files can be on a path

login
register
mail settings
Submitter Simon Heimberg
Date July 13, 2013, 10:01 p.m.
Message ID <ab2c53cd3dc04cda9542.1373752893@lapsi.heimberg.home>
Download mbox | patch
Permalink /patch/1872/
State Deferred
Headers show

Comments

Simon Heimberg - July 13, 2013, 10:01 p.m.
# HG changeset patch
# User Simon Heimberg <simohe@besonet.ch>
# Date 1373750041 -7200
# Node ID ab2c53cd3dc04cda954266c54c7424cddf72c336
# Parent  321ec12c67636919b2c271a5f2036b2187e52340
run-tests: test files can be on a path

Test files could not be in another directory than the current one because
the path to the file had to start with "test-". Fix this by checking the
test name instead of the test path.

Patch

diff -r 321ec12c6763 -r ab2c53cd3dc0 tests/run-tests.py
--- a/tests/run-tests.py	Sam Jul 13 23:13:52 2013 +0200
+++ b/tests/run-tests.py	Sam Jul 13 23:14:01 2013 +0200
@@ -893,7 +893,7 @@ 
 
     testpath = os.path.join(TESTDIR, test)
     err = os.path.join(TESTDIR, test + ".err")
-    lctest = test.lower()
+    lctest = os.path.basename(test).lower()
 
     if not os.path.exists(testpath):
             return skip("doesn't exist")