Debian Codegraph @

rpython/jit/backend/zarch/test/conftest.py

raw symbols SCIP
1 """
2 This disables the backend tests on non zarch platforms.
3 Note that you need "--slow" to run translation tests.
4 """
5 import os
6 import pytest
7 from rpython.jit.backend import detect_cpu
8
9 cpu = detect_cpu.autodetect()
10 IS_ZARCH = cpu.startswith('zarch')
11 THIS_DIR = os.path.dirname(__file__)
12
13 @pytest.hookimpl(tryfirst=True)
14 def pytest_ignore_collect(path, config):
15 path = str(path)
16 if not IS_ZARCH:
17 if os.path.commonprefix([path, THIS_DIR]) == THIS_DIR: # workaround for bug in pytest<3.0.5
18 return True