--- a/tests/run-tests.py Sat Jan 24 01:44:43 2009 +0100
+++ b/tests/run-tests.py Sat Jan 31 22:50:18 2009 +0100
@@ -67,6 +67,8 @@
help="skip showing test changes")
parser.add_option("--with-hg", type="string",
help="test existing install at given location")
+parser.add_option("--pure", action="store_true",
+ help="use pure Python code instead of C extensions")
for option, default in defaults.items():
defaults[option] = int(os.environ.get(*default))
@@ -175,13 +177,14 @@
global python
vlog("# Performing temporary installation of HG")
installerrs = os.path.join("tests", "install.err")
+ pure = options.pure and "--pure" or ""
# Run installer in hg root
os.chdir(os.path.join(os.path.dirname(sys.argv[0]), '..'))
- cmd = ('%s setup.py clean --all'
+ cmd = ('%s setup.py %s clean --all'
' install --force --prefix="%s" --install-lib="%s"'
' --install-scripts="%s" >%s 2>&1'
- % (sys.executable, INST, PYTHONDIR, BINDIR, installerrs))
+ % (sys.executable, pure, INST, PYTHONDIR, BINDIR, installerrs))
vlog("# Running", cmd)
if os.system(cmd) == 0:
if not verbose: