[PATCH] run-tests: take the basepath when constructing the test temp dir
Idan Kamara
idankk86 at gmail.com
Sat May 7 13:02:43 CDT 2011
# HG changeset patch
# User Idan Kamara <idankk86 at gmail.com>
# Date 1304791275 -10800
# Node ID 128e25be4ac29a575112f54fef44da18b2ac51d5
# Parent e3aab6097c901c22f6bef796004b79a1cfb4c897
run-tests: take the basepath when constructing the test temp dir
so it's possible to run tests that are outside the test/ dir
diff -r e3aab6097c90 -r 128e25be4ac2 tests/run-tests.py
--- a/tests/run-tests.py Sat May 07 20:56:43 2011 +0300
+++ b/tests/run-tests.py Sat May 07 21:01:15 2011 +0300
@@ -717,7 +717,7 @@
def ignore(msg):
result('i', (test, msg))
- if (test.startswith("test-") and '~' not in test and
+ if (os.path.basename(test).startswith("test-") and '~' not in test and
('.' not in test or test.endswith('.py') or
test.endswith('.bat') or test.endswith('.t'))):
if not os.path.exists(test):
@@ -796,7 +796,7 @@
# Make a tmp subdirectory to work in
testtmp = os.environ["TESTTMP"] = os.environ["HOME"] = \
- os.path.join(HGTMP, test)
+ os.path.join(HGTMP, os.path.basename(test))
os.mkdir(testtmp)
ret, out = runner(testpath, testtmp, options, [
More information about the Mercurial-devel
mailing list