Mercurial > hg
changeset 17966:ae20cde050c2
run-tests: add a --compiler option
Without this option, it is not possible to run the test suite on Windows
using mingw's gcc as the compiler.
author | Bryan O'Sullivan <bryano@fb.com> |
---|---|
date | Tue, 27 Nov 2012 11:18:33 -0800 |
parents | 0167da3cbc44 |
children | 0e2850a6fcdd |
files | tests/run-tests.py |
diffstat | 1 files changed, 7 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/tests/run-tests.py Tue Nov 27 11:18:31 2012 -0800 +++ b/tests/run-tests.py Tue Nov 27 11:18:33 2012 -0800 @@ -163,6 +163,8 @@ parser.add_option("-p", "--port", type="int", help="port on which servers should listen" " (default: $%s or %d)" % defaults['port']) + parser.add_option("--compiler", type="string", + help="compiler to build with") parser.add_option("--pure", action="store_true", help="use pure Python code instead of C extensions") parser.add_option("-R", "--restart", action="store_true", @@ -371,6 +373,9 @@ def installhg(options): vlog("# Performing temporary installation of HG") installerrs = os.path.join("tests", "install.err") + compiler = '' + if options.compiler: + compiler = '--compiler ' + options.compiler pure = options.pure and "--pure" or "" # Run installer in hg root @@ -385,10 +390,10 @@ # when they happen. nohome = '' cmd = ('%(exe)s setup.py %(pure)s clean --all' - ' build --build-base="%(base)s"' + ' build %(compiler)s --build-base="%(base)s"' ' install --force --prefix="%(prefix)s" --install-lib="%(libdir)s"' ' --install-scripts="%(bindir)s" %(nohome)s >%(logfile)s 2>&1' - % dict(exe=sys.executable, pure=pure, + % dict(exe=sys.executable, pure=pure, compiler=compiler, base=os.path.join(HGTMP, "build"), prefix=INST, libdir=PYTHONDIR, bindir=BINDIR, nohome=nohome, logfile=installerrs))