Skip to content

Commit c33b212

Browse files
committed
Fix RISCOF timeout for arch-tests on macOS/Arm64
The SAIL reference model was timing out after 300 seconds (the default RISCOF makeUtil timeout) when running >1000 tests sequentially on macOS-arm64 GitHub runners. - Add configurable timeout parameter to both SAIL and rv32emu plugins - Set jobs=3 for parallel test execution (matches CI's -j3) - Set timeout=900s for SAIL (slower reference model) - Set timeout=600s for rv32emu (faster DUT)
1 parent bf2297a commit c33b212

3 files changed

Lines changed: 10 additions & 2 deletions

File tree

tests/arch-test-target/constants.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,12 @@
2525
pspec={3}/{2}_platform.yaml
2626
path={4}/build
2727
target_run=1
28+
jobs=3
29+
timeout=600
2830
2931
[{0}]
3032
pluginpath={1}
3133
path={1}
34+
jobs=3
35+
timeout=900
3236
"""

tests/arch-test-target/rv32emu/riscof_rv32emu.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,9 @@ def __init__(self, *args, **kwargs):
4444
# parallel on the DUT executable. Can also be used in the build function if required.
4545
self.num_jobs = str(config["jobs"] if "jobs" in config else 1)
4646

47+
# Timeout in seconds for the make command execution
48+
self.timeout = int(config["timeout"]) if "timeout" in config else 300
49+
4750
# Path to the directory where this python file is located. Collect it from the config.ini
4851
self.pluginpath = os.path.abspath(config["pluginpath"])
4952

@@ -178,7 +181,7 @@ def runTests(self, testList):
178181

179182
# once the make-targets are done and the makefile has been created, run all the targets in
180183
# parallel using the make command set above.
181-
make.execute_all(self.work_dir)
184+
make.execute_all(self.work_dir, self.timeout)
182185

183186
# if target runs are not required then we simply exit as this point after running all
184187
# the makefile targets.

tests/arch-test-target/sail_cSim/riscof_sail_cSim.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ def __init__(self, *args, **kwargs):
2828
logger.error("Config node for sail_cSim missing.")
2929
raise SystemExit(1)
3030
self.num_jobs = str(config["jobs"] if "jobs" in config else 1)
31+
self.timeout = int(config["timeout"]) if "timeout" in config else 300
3132
self.pluginpath = os.path.abspath(config["pluginpath"])
3233
self.sail_exe = {
3334
"32": os.path.join(
@@ -181,4 +182,4 @@ def runTests(self, testList, cgf_file=None):
181182
execute += coverage_cmd
182183

183184
make.add_target(execute)
184-
make.execute_all(self.work_dir)
185+
make.execute_all(self.work_dir, self.timeout)

0 commit comments

Comments
 (0)