mirror of https://github.com/YosysHQ/yosys.git
functional tests: run from make tests but not smtlib/rkt tests
This commit is contained in:
parent
7de8be1451
commit
5a476a8d29
1
Makefile
1
Makefile
|
@ -891,6 +891,7 @@ endif
|
|||
+cd tests/xprop && bash run-test.sh $(SEEDOPT)
|
||||
+cd tests/fmt && bash run-test.sh
|
||||
+cd tests/cxxrtl && bash run-test.sh
|
||||
+cd tests/functional && bash run-test.sh
|
||||
@echo ""
|
||||
@echo " Passed \"make test\"."
|
||||
@echo ""
|
||||
|
|
|
@ -4,6 +4,10 @@ import random
|
|||
|
||||
random_seed = random.getrandbits(32)
|
||||
|
||||
def pytest_configure(config):
|
||||
config.addinivalue_line("markers", "smt: test uses smtlib/z3")
|
||||
config.addinivalue_line("markers", "rkt: test uses racket/rosette")
|
||||
|
||||
def pytest_addoption(parser):
|
||||
parser.addoption("--per-cell", type=int, default=None, help="run only N tests per cell")
|
||||
parser.addoption("--steps", type=int, default=1000, help="run each test for N steps")
|
||||
|
@ -27,4 +31,4 @@ def pytest_generate_tests(metafunc):
|
|||
seed1 = metafunc.config.getoption("seed")
|
||||
rnd = lambda seed2: random.Random('{}-{}'.format(seed1, seed2))
|
||||
names, cases = generate_test_cases(per_cell, rnd)
|
||||
metafunc.parametrize("cell,parameters", cases, ids=names)
|
||||
metafunc.parametrize("cell,parameters", cases, ids=names)
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
#!/usr/bin/env bash
|
||||
pytest -v "$@"
|
||||
pytest -v -m "not smt and not rkt" "$@"
|
||||
|
|
|
@ -55,6 +55,7 @@ def test_cxx(cell, parameters, tmp_path, num_steps, rnd):
|
|||
run([str(vcdharness_exe_file.resolve()), str(vcd_functional_file), str(num_steps), str(seed)])
|
||||
yosys_sim(rtlil_file, vcd_functional_file, vcd_yosys_sim_file, getattr(cell, 'sim_preprocessing', ''))
|
||||
|
||||
@pytest.mark.smt
|
||||
def test_smt(cell, parameters, tmp_path, num_steps, rnd):
|
||||
import smt_vcd
|
||||
|
||||
|
@ -72,6 +73,7 @@ def test_smt(cell, parameters, tmp_path, num_steps, rnd):
|
|||
smt_vcd.simulate_smt(smt_file, vcd_functional_file, num_steps, rnd(cell.name + "-smt"))
|
||||
yosys_sim(rtlil_file, vcd_functional_file, vcd_yosys_sim_file, getattr(cell, 'sim_preprocessing', ''))
|
||||
|
||||
@pytest.mark.rkt
|
||||
def test_rkt(cell, parameters, tmp_path, num_steps, rnd):
|
||||
import rkt_vcd
|
||||
|
||||
|
|
Loading…
Reference in New Issue