mirror of
https://github.com/YosysHQ/yosys
synced 2025-04-07 09:55:20 +00:00
14 lines
499 B
Python
14 lines
499 B
Python
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) |