Author: Wim Lavrijsen <[email protected]>
Branch:
Changeset: r70960:377369757ddc
Date: 2014-04-24 19:03 -0700
http://bitbucket.org/pypy/pypy/changeset/377369757ddc/
Log: merge reflex-support: disable tests when -A and no genreflex
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
@@ -15,6 +15,10 @@
not re.search("test0[1-36]", item.location[2]):
py.test.skip("genreflex is not installed")
+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"
+
def pytest_configure(config):
if py.path.local.sysfind('genreflex') is None:
import pypy.module.cppyy.capi.loadable_capi as lcapi
@@ -22,6 +26,9 @@
import ctypes
ctypes.CDLL(lcapi.reflection_library)
except Exception, e:
+ if config.option.runappdirect:
+ return # "can't run dummy tests in -A"
+
# build dummy backend (which has reflex info and calls hard-wired)
import os
from rpython.translator.tool.cbuild import ExternalCompilationInfo
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit