changeset 8943:09ff905cdc86

run-tests: use os.path.realpath() to find hg's setup.py. Needed for running out-of-tree test suites without --with-hg/--local.
author Greg Ward <greg-hg@gerg.ca>
date Tue, 23 Jun 2009 22:20:54 -0400
parents 51038bb526ea
children dda4ad7c9ea9
files tests/run-tests.py
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/tests/run-tests.py	Wed Jun 24 03:05:01 2009 +0200
+++ b/tests/run-tests.py	Tue Jun 23 22:20:54 2009 -0400
@@ -266,7 +266,9 @@
     pure = options.pure and "--pure" or ""
 
     # Run installer in hg root
-    os.chdir(os.path.join(os.path.dirname(sys.argv[0]), '..'))
+    script = os.path.realpath(sys.argv[0])
+    hgroot = os.path.dirname(os.path.dirname(script))
+    os.chdir(hgroot)
     cmd = ('%s setup.py %s clean --all'
            ' install --force --prefix="%s" --install-lib="%s"'
            ' --install-scripts="%s" >%s 2>&1'