changeset 5267:b817d17c7ee5

Make run-tests.py work when invoked outside of tests. This makes it usable for unbundled extensions.
author Brendan Cully <brendan@kublai.com>
date Wed, 29 Aug 2007 16:50:21 -0700
parents d59ed18ec2d0
children 980da86fc66a
files tests/run-tests.py
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/tests/run-tests.py	Wed Aug 29 16:19:27 2007 -0700
+++ b/tests/run-tests.py	Wed Aug 29 16:50:21 2007 -0700
@@ -134,7 +134,8 @@
     vlog("# Performing temporary installation of HG")
     installerrs = os.path.join("tests", "install.err")
 
-    os.chdir("..") # Get back to hg root
+    # Run installer in hg root
+    os.chdir(os.path.join(os.path.dirname(sys.argv[0]), '..'))
     cmd = ('%s setup.py clean --all'
            ' install --force --home="%s" --install-lib="%s"'
            ' --install-scripts="%s" >%s 2>&1'