Commit 09b9a6e3 authored by Dimitris Lampridis's avatar Dimitris Lampridis

pytest: extend test_alarm_log_and_net and improve test labels

parent 02f66e1b
......@@ -41,9 +41,11 @@ class TestWrtdRefDesigns(object):
wrtd = request.getfixturevalue(node)
assert wrtd.get_fw_name(0) == fw_name
# TODO: add tdc-fdel and tdc-adc once alarms have been added to tdc
@pytest.mark.parametrize('tx_node, rx_nodes', [('adc', ['fdelay'])])
def test_alarm_log_and_net(self, tx_node, rx_nodes, request,fdelay):
@pytest.mark.parametrize('tx_node, rx_nodes',
[('adc', ['fdelay']),
('tdc', ['adc', 'fdelay'])],
ids=['adc->fdelay', 'tdc->adc/fdelay'])
def test_alarm_log_and_net(self, tx_node, rx_nodes, request, adc, tdc, fdelay):
"""
Schedule an alarm in tx_node, send an event and check the logs to
see that the alarm triggered, the event was sent out and that it was
......@@ -79,8 +81,8 @@ class TestWrtdRefDesigns(object):
receiver = request.getfixturevalue(rx_node)
receiver.check_log_entry({'id': 'net0', 'log_type': 'NETWORK', 'log_reason': 'RX'})
@pytest.mark.parametrize('channel', [1, 2, 3, 4])
@pytest.mark.parametrize('fmc', [0, 1])
@pytest.mark.parametrize('channel', [1, 2, 3, 4], ids=lambda i: f'ch{i}')
@pytest.mark.parametrize('fmc', [0, 1], ids=lambda i: f'fmc{i+1}')
def test_fd_out_tdc_in(self, tdc, fdelay, fmc, channel):
"""
Schedule an alarm on fdelay, generate pulse on output, check that
......@@ -114,7 +116,7 @@ class TestWrtdRefDesigns(object):
tdc_channel = f'LC-I{5*(fmc+1)}'
tdc.check_log_entry({'id': tdc_channel, 'log_type': 'GENERATED'})
@pytest.mark.parametrize('fmc', [0, 1])
@pytest.mark.parametrize('fmc', [0, 1], ids=lambda i: f'fmc{i+1}')
def test_fd_tdc_snake_adc_trigin(self, tdc, fdelay, adc, fmc, fmc_adc):
"""
Schedule an alarm on fdelay, generate pulse on FD output 1, receive
......@@ -195,7 +197,7 @@ class TestWrtdRefDesigns(object):
assert fmc_adc[fmc].acquisition_complete(), "acquisition timeout"
@pytest.mark.parametrize('fmc', [0, 1])
@pytest.mark.parametrize('fmc', [0, 1], ids=lambda i: f'fmc{i+1}')
def test_fd_adc_snake(self, fdelay, adc, fmc, fmc_adc):
"""
Schedule an alarm on fdelay, generate pulse on FD output 1, receive
......
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