Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
M
Mock Turtle
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
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
Mock Turtle
Commits
8c28ec89
Commit
8c28ec89
authored
Mar 07, 2023
by
Dimitris Lampridis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pytest: update app_id matching
parent
5d1f9bea
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
3 deletions
+5
-3
conftest.py
tests/conftest.py
+1
-1
test_config.py
tests/test_config.py
+4
-2
No files found.
tests/conftest.py
View file @
8c28ec89
...
...
@@ -20,7 +20,7 @@ def build_default_cfg():
config
.
pad
=
0
config
.
clock_freq
=
0
config
.
flags
=
0
config
.
app_id
=
0x
5452544c
config
.
app_id
=
0x
4d544400
# Common part of app_id for SPEC and SVEC demo
config
.
n_cpu
=
2
config
.
smem_size
=
0x00002000
config
.
n_hmq
[
0
]
=
2
...
...
tests/test_config.py
View file @
8c28ec89
...
...
@@ -19,7 +19,8 @@ class TestConfig(object):
def
test_valid_host
(
self
,
trtl_device
,
cfg
):
assert
trtl_device
.
rom
.
signature
==
cfg
.
signature
assert
((
trtl_device
.
rom
.
app_id
==
cfg
.
app_id
)
or
(
trtl_device
.
rom
.
app_id
==
cfg
.
app_id
|
0x10001
))
# SVEC or SPEC DEMO
assert
((
trtl_device
.
rom
.
app_id
==
cfg
.
app_id
|
ord
(
'C'
))
or
(
trtl_device
.
rom
.
app_id
==
cfg
.
app_id
|
ord
(
'V'
)))
# SVEC or SPEC DEMO
assert
trtl_device
.
rom
.
n_cpu
==
cfg
.
n_cpu
def
test_valid_softcpu
(
self
,
trtl_cpu
,
cfg
,
firmware_file_config
):
...
...
@@ -33,5 +34,6 @@ class TestConfig(object):
assert
msg
is
not
None
assert
msg
.
payload
[
0
]
==
cfg
.
signature
assert
((
msg
.
payload
[
5
]
==
cfg
.
app_id
)
or
(
msg
.
payload
[
5
]
==
cfg
.
app_id
|
0x10001
))
assert
((
msg
.
payload
[
5
]
==
cfg
.
app_id
|
ord
(
'C'
))
or
(
msg
.
payload
[
5
]
==
cfg
.
app_id
|
ord
(
'V'
)))
# SVEC or SPEC DEMO
assert
msg
.
payload
[
6
]
==
cfg
.
n_cpu
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