[systemtest] Decrease spiflash timeout to 30s on FPGA
On FPGAs spiflash should be rather quick to load a software binary to
the device. If it takes longer then probably something went wrong. To
avoid waiting for a timeout for a very long time reduce it to 30s on
FPGAs, while keeping the original timeout for Verilator platforms (where
spiflash takes a very long time, and currently doesn't work at all).
Signed-off-by: Philipp Wagner <phw@lowrisc.org>
diff --git a/test/systemtest/utils.py b/test/systemtest/utils.py
index 8a03e3e..eb1c596 100644
--- a/test/systemtest/utils.py
+++ b/test/systemtest/utils.py
@@ -364,7 +364,11 @@
"^^^^^^^^^^^^^^^^^^^^ {} ^^^^^^^^^^^^^^^^^^^^\n".format(f))
-def load_sw_over_spi(tmp_path, spiflash_path, sw_test_bin, spiflash_args=[]):
+def load_sw_over_spi(tmp_path,
+ spiflash_path,
+ sw_test_bin,
+ spiflash_args=[],
+ timeout=600):
""" Use the spiflash utility to load software onto a device. """
log.info("Flashing device software from {} over SPI".format(
@@ -373,7 +377,7 @@
cmd_flash = [spiflash_path, '--input', sw_test_bin] + spiflash_args
p_flash = Process(cmd_flash, logdir=tmp_path, cwd=tmp_path)
p_flash.run()
- p_flash.proc.wait(timeout=600)
+ p_flash.proc.wait(timeout=timeout)
assert p_flash.proc.returncode == 0
log.info("Device software flashed.")