File: conftest.py

package info (click to toggle)
pypy3 7.3.19%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 212,236 kB
  • sloc: python: 2,098,316; ansic: 540,565; sh: 21,462; asm: 14,419; cpp: 4,451; makefile: 4,209; objc: 761; xml: 530; exp: 499; javascript: 314; pascal: 244; lisp: 45; csh: 12; awk: 4
file content (42 lines) | stat: -rw-r--r-- 1,870 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
"""
This conftest adds options used by test/test_random and
x86/test/test_zll_random.
"""

import random

def pytest_addoption(parser):
    group = parser.getgroup("JIT options")
    group.addoption('--slow', action="store_true",
           default=False, dest="run_slow_tests",
           help="run all the compiled tests (instead of just a few)")

    group = parser.getgroup('random test options')
    group.addoption('--random-seed', action="store", type=int,
                    default=random.randrange(0, 10000),
                    dest="randomseed",
                    help="choose a fixed random seed")
    group.addoption('--backend', action="store",
                    default='llgraph',
                    choices=['llgraph', 'cpu'],
                    dest="backend",
                    help="select the backend to run the functions with")
    group.addoption('--block-length', action="store", type=int,
                    default=30,
                    dest="block_length",
                    help="insert up to this many operations in each test")
    group.addoption('--n-vars', action="store", type=int,
                    default=10,
                    dest="n_vars",
                    help="supply this many randomly-valued arguments to "
                         "the function")
    group.addoption('--repeat', action="store", type=int,
                    default=15,
                    dest="repeat",
                    help="run the test this many times"),
    group.addoption('--output', '-O', action="store", type=str,
                    default="", dest="output",
                    help="dump output to a file")
    group.addoption('--z3-timeout', action="store", type=int,
                    default=500, dest="z3timeout",
                    help="give timeout that Z3 should use for proving in milliseconds per condition")