Commit 3164b2c7 authored by Federico Vaga's avatar Federico Vaga

tst: make --bitstream optional

Signed-off-by: Federico Vaga's avatarFederico Vaga <federico.vaga@cern.ch>
parent e5879288
......@@ -16,12 +16,13 @@ def pytest_addoption(parser):
parser.addoption("--pci-id",
required=True, help="SPEC PCI Identifier")
parser.addoption("--bitstream",
required=True, help="SPEC bitstream to be tested")
default=None, help="SPEC bitstream to be tested")
def pytest_configure(config):
pytest.pci_id = config.getoption("--pci-id")
pytest.cfg_bitstream = config.getoption("--bitstream")
if pytest.cfg_bitstream is not None:
spec = PySPEC(pytest.pci_id)
spec.program_fpga(pytest.cfg_bitstream)
del spec
......@@ -209,6 +209,8 @@ class TestDma(object):
for i in range(1000000):
assert data == dma.read(0, len(data))
@pytest.mark.skipif(pytest.cfg_bitstream,
reason="We need a bitstream to reflash")
def test_dma_reg_word(self, spec):
"""
Regression test.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment