diff tests/run-tests.py @ 28037:54c896f8bb79

run-tests: warn about symlinks to non hg scripts If you symlink /usr/bin/true to /something/hg and try to run --with-hg=/something/hg, run-tests will end up running /usr/bin/hg, not /usr/bin/true.
author timeless <timeless@mozdev.org>
date Mon, 08 Feb 2016 22:50:19 +0000
parents fb92927f9775
children 92e8e3f20a6f
line wrap: on
line diff
--- a/tests/run-tests.py	Mon Feb 08 18:29:17 2016 +0900
+++ b/tests/run-tests.py	Mon Feb 08 22:50:19 2016 +0000
@@ -285,7 +285,7 @@
         options.pure = True
 
     if options.with_hg:
-        options.with_hg = os.path.expanduser(options.with_hg)
+        options.with_hg = os.path.realpath(os.path.expanduser(options.with_hg))
         if not (os.path.isfile(options.with_hg) and
                 os.access(options.with_hg, os.X_OK)):
             parser.error('--with-hg must specify an executable hg script')