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:
parent
9ad859fc0a
commit
674e6d201d
57 changed files with 554 additions and 1238 deletions
14
tests/functional/conftest.py
Normal file
14
tests/functional/conftest.py
Normal 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)
|
Loading…
Add table
Add a link
Reference in a new issue