[pypy-commit] pypy default: Disable all tests when the '-std=c++11' option is not understood by the compiler
arigo
pypy.commits at gmail.com
Wed Jan 11 06:25:55 EST 2017
Author: Armin Rigo <arigo at tunes.org>
Branch:
Changeset: r89489:48bdd88d30d9
Date: 2017-01-11 12:25 +0100
http://bitbucket.org/pypy/pypy/changeset/48bdd88d30d9/
Log: Disable all tests when the '-std=c++11' option is not understood by
the compiler
diff --git a/pypy/module/cppyy/test/conftest.py b/pypy/module/cppyy/test/conftest.py
--- a/pypy/module/cppyy/test/conftest.py
+++ b/pypy/module/cppyy/test/conftest.py
@@ -23,6 +23,10 @@
def pytest_ignore_collect(path, config):
if py.path.local.sysfind('genreflex') is None and config.option.runappdirect:
return True # "can't run dummy tests in -A"
+ if disabled:
+ return True
+
+disabled = None
def pytest_configure(config):
if py.path.local.sysfind('genreflex') is None:
@@ -37,7 +41,7 @@
# build dummy backend (which has reflex info and calls hard-wired)
import os
from rpython.translator.tool.cbuild import ExternalCompilationInfo
- from rpython.translator.platform import platform
+ from rpython.translator.platform import platform, CompilationError
from rpython.translator import cdir
from rpython.rtyper.lltypesystem import rffi
@@ -55,9 +59,16 @@
use_cpp_linker=True,
)
- soname = platform.compile(
- [], eci,
- outputfilename='libcppyy_dummy_backend',
- standalone=False)
+ try:
+ soname = platform.compile(
+ [], eci,
+ outputfilename='libcppyy_dummy_backend',
+ standalone=False)
+ except CompilationError as e:
+ if '-std=c++11' in str(e):
+ global disabled
+ disabled = str(e)
+ return
+ raise
lcapi.reflection_library = str(soname)
More information about the pypy-commit
mailing list