# HG changeset patch # User Martin Geisler # Date 1233438618 -3600 # Node ID a343cd25e425ccaaa7075836e6217017a5593568 # Parent 103127a8cbdbe230ce7adead9d6344099439fe4d run-tests: add --pure flag for using pure Python modules diff -r 103127a8cbdb -r a343cd25e425 tests/run-tests.py --- 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: