wlav committed 534ad69

disable all tests if run with -A and genreflex not available

Comments (0)

Files changed (1)


                 not"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
             import ctypes
         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