Mercurial > hg-stable
changeset 7723:a343cd25e425
run-tests: add --pure flag for using pure Python modules
author | Martin Geisler <mg@daimi.au.dk> |
---|---|
date | Sat, 31 Jan 2009 22:50:18 +0100 |
parents | 103127a8cbdb |
children | fff6e253e1f6 |
files | tests/run-tests.py |
diffstat | 1 files changed, 5 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- 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: