# HG changeset patch # User Bryan O'Sullivan # Date 1354043913 28800 # Node ID ae20cde050c2d37382fd3a618de255c64413773a # Parent 0167da3cbc444b9e052bd72cc61b7c974ed7bbe0 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. diff -r 0167da3cbc44 -r ae20cde050c2 tests/run-tests.py --- 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))