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

Simon Heimberg simohe at besonet.ch
Sat Jul 13 22:01:33 UTC 2013


# HG changeset patch
# User Simon Heimberg <simohe at 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.

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")



More information about the Mercurial-devel mailing list