Commit 7bb6a3d8 authored by Federico Vaga's avatar Federico Vaga

test: improve config test code

Signed-off-by: Federico Vaga's avatarFederico Vaga <federico.vaga@cern.ch>
parent cd2aeb87
......@@ -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
......
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