run-tests: use os.path.realpath() to find hg's setup.py.
Needed for running out-of-tree test suites without --with-hg/--local.
--- 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'