Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
MooreOnline
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
LHCb
MooreOnline
Commits
4875e79a
Commit
4875e79a
authored
2 years ago
by
Rosen Matev
Browse files
Options
Downloads
Patches
Plain Diff
Testbench diagnostics
parent
f17deb53
No related branches found
No related tags found
1 merge request
!188
Testbench improvements and WIP alignment scenario
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
MooreScripts/python/MooreScripts/testbench/asyncdim.py
+4
-1
4 additions, 1 deletion
MooreScripts/python/MooreScripts/testbench/asyncdim.py
MooreScripts/python/MooreScripts/testbench/emulator.py
+3
-2
3 additions, 2 deletions
MooreScripts/python/MooreScripts/testbench/emulator.py
with
7 additions
and
3 deletions
MooreScripts/python/MooreScripts/testbench/asyncdim.py
+
4
−
1
View file @
4875e79a
...
@@ -69,7 +69,10 @@ class DimService:
...
@@ -69,7 +69,10 @@ class DimService:
def
callback
(
timestamp
,
tag
,
value
):
def
callback
(
timestamp
,
tag
,
value
):
assert
tag
==
self
.
_tag
assert
tag
==
self
.
_tag
if
isinstance
(
value
,
str
):
if
isinstance
(
value
,
str
):
assert
value
[
-
1
]
==
"
\0
"
if
not
value
[
-
1
]
==
"
\0
"
:
msg
=
f
"
Unexpected DIM response
{
value
!r}
"
log
.
fatal
(
msg
)
raise
RuntimeError
(
msg
)
value
=
value
[:
-
1
]
value
=
value
[:
-
1
]
log
.
debug
(
f
"
{
self
.
_name
}
: callback got
{
value
!r}
"
)
log
.
debug
(
f
"
{
self
.
_name
}
: callback got
{
value
!r}
"
)
self
.
_queue
.
put_nowait
((
timestamp
,
value
))
self
.
_queue
.
put_nowait
((
timestamp
,
value
))
...
...
This diff is collapsed.
Click to expand it.
MooreScripts/python/MooreScripts/testbench/emulator.py
+
3
−
2
View file @
4875e79a
...
@@ -289,8 +289,9 @@ async def tasks_wait_for_status(tasks, status, *, skip=[], utgid=None):
...
@@ -289,8 +289,9 @@ async def tasks_wait_for_status(tasks, status, *, skip=[], utgid=None):
st
=
await
t
.
status
()
st
=
await
t
.
status
()
statuses
[
t
.
utgid
]
=
st
statuses
[
t
.
utgid
]
=
st
if
not
all
(
s
==
status
for
s
in
statuses
.
values
()):
if
not
all
(
s
==
status
for
s
in
statuses
.
values
()):
log
.
error
(
f
"
Unexpected statuses:
{
statuses
}
"
)
message
=
f
"
Unexpected statuses:
{
statuses
}
"
raise
RuntimeError
(
f
"
Unexpected statuses:
{
statuses
}
"
)
log
.
error
(
message
)
raise
RuntimeError
(
message
)
async
def
tasks_wait_for_exit
(
tasks
):
async
def
tasks_wait_for_exit
(
tasks
):
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment