Merge with stable
authorChristian Ebert <blacktrash@gmx.net>
Tue, 10 May 2011 01:44:09 +0200
changeset 937 d2ee1f7d81f8
parent 933 eb234d5d695c (current diff)
parent 936 7a8ae4eb18bf (diff)
child 939 80fc9699c7eb
Merge with stable
--- a/tests/run-tests.py	Fri May 06 20:13:10 2011 +0200
+++ b/tests/run-tests.py	Tue May 10 01:44:09 2011 +0200
@@ -180,10 +180,6 @@
     if 'java' in sys.platform or '__pypy__' in sys.modules:
         options.pure = True
 
-    if not (os.path.isfile(options.shell) and
-            os.access(options.shell, os.X_OK)):
-        parser.error('--shell must be executable')
-
     if options.with_hg:
         if not (os.path.isfile(options.with_hg) and
                 os.access(options.with_hg, os.X_OK)):
@@ -717,7 +713,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 +792,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, [
@@ -902,7 +898,7 @@
     the one we expect it to be.  If not, print a warning to stderr."""
     expecthg = os.path.join(PYTHONDIR, 'mercurial')
     actualhg = _gethgpath()
-    if actualhg != expecthg:
+    if os.path.abspath(actualhg) != os.path.abspath(expecthg):
         sys.stderr.write('warning: %s with unexpected mercurial lib: %s\n'
                          '         (expected %s)\n'
                          % (verb, actualhg, expecthg))