[pypy-svn] pypy mingw32-build: Add the "--cc" option to py.test
amauryfa
commits-noreply at bitbucket.org
Fri Apr 29 12:07:17 CEST 2011
Author: Amaury Forgeot d'Arc <amauryfa at gmail.com>
Branch: mingw32-build
Changeset: r43756:0e04cf951e16
Date: 2011-04-29 11:57 +0200
http://bitbucket.org/pypy/pypy/changeset/0e04cf951e16/
Log: Add the "--cc" option to py.test For example: --cc=mingw32
diff --git a/pypy/conftest.py b/pypy/conftest.py
--- a/pypy/conftest.py
+++ b/pypy/conftest.py
@@ -33,6 +33,10 @@
raise ValueError("%s not in %s" % (value, PLATFORMS))
set_platform(value, None)
+def _set_compiler(opt, opt_str, value, parser):
+ from pypy.translator.platform import set_platform
+ set_platform('host', value)
+
def pytest_addoption(parser):
group = parser.getgroup("pypy options")
group.addoption('--view', action="store_true", dest="view", default=False,
@@ -46,6 +50,9 @@
group.addoption('-P', '--platform', action="callback", type="string",
default="host", callback=_set_platform,
help="set up tests to use specified platform as compile/run target")
+ group.addoption('--cc', action="callback", type="string",
+ default="host", callback=_set_compiler,
+ help="set up tests to use specified compiler")
def pytest_sessionstart():
# have python subprocesses avoid startup customizations by default
More information about the Pypy-commit
mailing list