Home - Summaries: (main) : (py3.11) : (py3.12) : Everything - Nightly builds - Benchmarks - RPython - Builders - About

pypy/module/_vmprof/test/test_direct.py::TestDirect::()::test_infrastructure

item = <Function 'test_infrastructure'>

    @pytest.hookimpl(tryfirst=True)
    def pytest_runtest_setup(item):
        if isinstance(item, pytest.Function):
            config = item.config
            if get_marker(item, name='pypy_only'):
                if config.applevel is not None and not config.applevel.is_pypy:
                    pytest.skip('PyPy-specific test')
            appclass = item.getparent(pytest.Class)
            if appclass is not None:
>               from pypy.tool.pytest.objspace import gettestobjspace

conftest.py:251: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
tool/pytest/objspace.py:4: in <module>
    from pypy.tool.option import make_config, make_objspace
tool/option.py:3: in <module>
    from pypy.config.pypyoption import get_pypy_config
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

    import os
    import sys
    
    import py
    
    from rpython.config.config import (OptionDescription, BoolOption, IntOption,
      ChoiceOption, StrOption, to_optparse)
    from rpython.config.translationoption import IS_64_BITS
    
    
    modulepath = py.path.local(__file__).dirpath().dirpath().join("module")
    all_modules = [p.basename for p in modulepath.listdir()
                   if p.check(dir=True, dotfile=False)
                   and p.join('__init__.py').check()
                   and not p.basename.startswith('test')]
    
    essential_modules = set([
        "exceptions", "_io", "sys", "builtins", "posix", "_warnings",
        "itertools", "_frozen_importlib", "operator", "_locale", "struct",
        "thread", "__pypy__", "zipimport", "_opcode",
    ])
    if sys.platform == "win32":
        essential_modules.add("_winreg")
    
    default_modules = essential_modules.copy()
    default_modules.update([
        "_codecs", "atexit", "gc", "_weakref", "marshal", "errno", "imp",
        "itertools", "math", "cmath", "_sre", "_pickle_support",
        "token", "_ast", "_random",
        "_string", "_testing", "time", "_abc", "_pickle",
    ])
    
    
    # --allworkingmodules
    working_modules = default_modules.copy()
    working_modules.update([
        "_socket", "unicodedata", "mmap", "fcntl", "pwd",
        "select", "_lsprof", "signal", "_rawffi", "termios",
        "zlib", "bz2", "_md5", "_minimal_curses",
        "itertools", "pyexpat", "cpyext", "array",
        "binascii", "_multiprocessing", '_warnings', "_collections",
        "_multibytecodec", "_continuation", "_cffi_backend",
        "_csv", "_pypyjson", "_posixsubprocess", # "_cppyy", "micronumpy",
        "_jitlog", # "_hpy_universal"
        # "_hashlib", "crypt"
    ])
    
    import rpython.rlib.rvmprof.cintf
    if rpython.rlib.rvmprof.cintf.IS_SUPPORTED:
        working_modules.add('_vmprof')
        working_modules.add('faulthandler')
    
    translation_modules = default_modules.copy()
    translation_modules.update([
        "fcntl", "time", "select", "signal", "_rawffi", "zlib", "struct",
        "array", "binascii",
        # the following are needed for pyrepl (and hence for the
        # interactive prompt/pdb)
        "termios", "_minimal_curses",
    ])
    
    reverse_debugger_disable_modules = set([
        "_continuation", "_vmprof", "_multiprocessing",
        "micronumpy",
        ])
    
    # XXX this should move somewhere else, maybe to platform ("is this posixish"
    #     check or something)
    if sys.platform == "win32":
        # unix only modules
        for name in ["crypt", "fcntl", "pwd", "termios", "_minimal_curses",
                     "_posixsubprocess"]:
            if name in working_modules:
                working_modules.remove(name)
            if name in translation_modules:
                translation_modules.remove(name)
    
        if "faulthandler" in working_modules:
            working_modules.remove("faulthandler")  # missing details
        if "_vmprof" in working_modules:
            working_modules.remove("_vmprof")  # FIXME: missing details
    
        # The _locale module is needed by site.py on Windows
        default_modules.add("_locale")
    
        # needed to invoke MSVC
        translation_modules.update(["thread", "_winreg", "_cffi_backend"])
    
        # not ported yet
        if IS_64_BITS:
            for name in ["_cppyy", "micronumpy"]:
                if name in working_modules:
                    working_modules.remove(name)
    
    if sys.platform == "sunos5":
        working_modules.remove('fcntl')  # LOCK_NB not defined
        working_modules.remove("_minimal_curses")
        working_modules.remove("termios")
        if "_cppyy" in working_modules:
            working_modules.remove("_cppyy")  # depends on ctypes
    
    if sys.platform.startswith('linux') and sys.maxsize <= 2**31:
        # _hpy_universal needs tweaking to work on 32-bit linux
>       working_modules.remove('_hpy_universal')
E       KeyError: '_hpy_universal'

config/pypyoption.py:104: KeyError
builder: own-linux-x86-32 build #9496+
test: pypy/module/_vmprof/test/test_direct.py::TestDirect::()::test_infrastructure