Skip to content

Commit b81040b

Browse files
committed
Add reloc_tests config
1 parent 3253e06 commit b81040b

File tree

3 files changed

+14
-4
lines changed

3 files changed

+14
-4
lines changed

riscof/config.ini

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ ispec=./mlogv32/mlogv32_isa.yaml
1010
pspec=./mlogv32/mlogv32_platform.yaml
1111
target_run=1
1212
jobs=8
13-
skip_tests=/vm_sv32/
13+
skip_tests=
14+
reloc_tests=/Zifencei/src/Fencei.S,/pmp32/
1415
# change these when running the tests on another computer (FIXME: hack)
1516
host_repo_path=/Users/object/Git/mlogv32
1617
riscof_repo_path=/workspaces/mlogv32

riscof/filter_test_list.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,12 @@ def main(
1616
with open(config, "r") as f:
1717
cfg = ConfigParser()
1818
cfg.read_file(f)
19-
skip_tests = cfg.get("mlogv32", "skip_tests").split(",")
19+
skip_tests = cfg.get("mlogv32", "skip_tests")
20+
21+
if not skip_tests:
22+
return
23+
24+
skip_tests = skip_tests.split(",")
2025

2126
with open(work_dir / "test_list.yaml", "rb") as f:
2227
test_list: dict[str, Any] = yaml.load(f, yaml.Loader)

riscof/mlogv32/riscof_mlogv32.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,8 @@ def __init__(self, *args: Any, **kwargs: Any):
5757
self.host_repo_path: str = config["host_repo_path"]
5858
self.riscof_repo_path: str = config["riscof_repo_path"]
5959

60+
self.reloc_tests: list[str] = config["reloc_tests"].split(",")
61+
6062
self.make = config["make"] if "make" in config else "make"
6163

6264
# We capture if the user would like the run the tests on the target or
@@ -201,8 +203,10 @@ def get_compile_command(self, testlist: dict[str, Any], testname: str):
201203
compile_macros = " -D" + " -D".join(testentry["macros"])
202204

203205
# use a different linker script for tests that require .text to be writable
204-
if testname.endswith("/Zifencei/src/Fencei.S"):
205-
linker_script = "reloc.ld"
206+
for reloc_test in self.reloc_tests:
207+
if reloc_test in testname:
208+
linker_script = "reloc.ld"
209+
break
206210
else:
207211
linker_script = "xip.ld"
208212

0 commit comments

Comments
 (0)