[PATCH] run-tests: use os.path.realpath() to find hg's setup.py
Greg Ward
greg-hg at gerg.ca
Tue Jun 2 08:02:12 CDT 2009
# HG changeset patch
# User Greg Ward <greg-hg at gerg.ca>
# Date 1243947709 14400
# Node ID 9e6253ace10acd07dd489c414ee369966137c71a
# Parent 68e0a55eee6e97df2bbb4548c6b6dbd2d2b7bb97
run-tests: use os.path.realpath() to find hg's setup.py.
Needed for running out-of-tree test suites without --with-hg/--local.
diff --git a/tests/run-tests.py b/tests/run-tests.py
--- a/tests/run-tests.py
+++ b/tests/run-tests.py
@@ -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'
More information about the Mercurial-devel
mailing list