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
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
hdl-core-lib
mock-turtle
Commits
7bb6a3d8
Commit
7bb6a3d8
authored
May 02, 2018
by
Federico Vaga
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test: improve config test code
Signed-off-by:
Federico Vaga
<
federico.vaga@cern.ch
>
parent
cd2aeb87
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
6 deletions
+4
-6
test_config.py
tests/test_config.py
+4
-6
No files found.
tests/test_config.py
View file @
7bb6a3d8
...
...
@@ -4,9 +4,8 @@ import PyMockTurtle
import
time
@
pytest
.
fixture
def
firmware_file_config
():
testdir
=
os
.
path
.
dirname
(
os
.
path
.
abspath
(
os
.
path
.
realpath
(
__file__
)))
return
os
.
path
.
join
(
testdir
,
"firmware/config_rom/fw-config-rom.bin"
)
def
firmware_file_config
(
trtl_firmware_dir
):
return
os
.
path
.
join
(
trtl_firmware_dir
,
"firmware/config_rom/fw-config-rom.bin"
)
class
TestConfig
(
object
):
...
...
@@ -18,9 +17,8 @@ class TestConfig(object):
assert
trtl_device
.
rom
.
app_id
==
cfg
.
app_id
assert
trtl_device
.
rom
.
n_cpu
==
cfg
.
n_cpu
def
test_valid_softcpu
(
self
,
trtl_device
,
trtl_cpu
,
devid
,
cfg
):
trtl_cpu
.
disable
()
trtl_cpu
.
load_application_file
(
firmware_file_config
())
def
test_valid_softcpu
(
self
,
trtl_cpu
,
cfg
,
firmware_file_config
):
trtl_cpu
.
load_application_file
(
firmware_file_config
)
trtl_cpu
.
enable
()
# Give time to the soft-CPU to build and send the message
...
...
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