Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
W
White Rabbit Trigger Distribution
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Projects
White Rabbit Trigger Distribution
Commits
09b9a6e3
Commit
09b9a6e3
authored
Sep 21, 2022
by
Dimitris Lampridis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pytest: extend test_alarm_log_and_net and improve test labels
parent
02f66e1b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
7 deletions
+9
-7
test_WrtdRefDesigns.py
pytest/tests/test_WrtdRefDesigns.py
+9
-7
No files found.
pytest/tests/test_WrtdRefDesigns.py
View file @
09b9a6e3
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment