File: conftest.py

package info (click to toggle)
pypy 2.4.0%2Bdfsg-3
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 86,992 kB
  • ctags: 170,715
  • sloc: python: 1,030,417; ansic: 43,437; cpp: 5,241; asm: 5,169; sh: 458; makefile: 408; xml: 231; lisp: 45
file content (22 lines) | stat: -rw-r--r-- 757 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
"""
This conftest adds an option to run the translation tests which by default will
be disabled.
Also it disables the backend tests on non ARMv7 platforms
"""
import py, os
from rpython.jit.backend import detect_cpu

cpu = detect_cpu.autodetect()

def pytest_addoption(parser):
    group = parser.getgroup('translation test options')
    group.addoption('--run-translation-tests',
                    action="store_true",
                    default=False,
                    dest="run_translation_tests",
                    help="run tests that translate code")

def pytest_collect_directory(path, parent):
    if not cpu.startswith('arm'):
        py.test.skip("ARM(v7) tests skipped: cpu is %r" % (cpu,))
pytest_collect_file = pytest_collect_directory