3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-06-21 21:33:40 +00:00

rewrite functional backend test code in python

This commit is contained in:
Emily Schmidt 2024-07-12 11:07:33 +01:00
parent 9ad859fc0a
commit 674e6d201d
57 changed files with 554 additions and 1238 deletions

View file

@ -0,0 +1,14 @@
import pytest
from rtlil_cells import generate_test_cases
def pytest_addoption(parser):
parser.addoption(
"--per-cell", type=int, default=None, help="run only N tests per cell"
)
def pytest_generate_tests(metafunc):
if "cell" in metafunc.fixturenames:
print(dir(metafunc.config))
per_cell = metafunc.config.getoption("per_cell", default=None)
names, cases = generate_test_cases(per_cell)
metafunc.parametrize("cell,parameters", cases, ids=names)