Skip to content

Commit 7590fbb

Browse files
committed
Move hardcoded paths into config.ini
1 parent 5cf4e1e commit 7590fbb

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

riscof/config.ini

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ pluginpath=./mlogv32
99
ispec=./mlogv32/mlogv32_isa.yaml
1010
pspec=./mlogv32/mlogv32_platform.yaml
1111
target_run=1
12+
# change these when running the tests on another computer (FIXME: hack)
13+
host_repo_path=/Users/object/Git/mlogv32
14+
riscof_repo_path=/workspaces/mlogv32
1215

1316
[sail_cSim]
1417
pluginpath=./sail_cSim

riscof/mlogv32/riscof_mlogv32.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,9 @@ def __init__(self, *args: Any, **kwargs: Any):
4242
self.isa_spec: str = os.path.abspath(config["ispec"])
4343
self.platform_spec: str = os.path.abspath(config["pspec"])
4444

45+
self.host_repo_path: str = config["host_repo_path"]
46+
self.riscof_repo_path: str = config["riscof_repo_path"]
47+
4548
# We capture if the user would like the run the tests on the target or
4649
# not. If you are interested in just compiling the tests and not running
4750
# them on the target, then following variable should be set to False
@@ -152,10 +155,10 @@ def runTests(self, testlist: dict[str, Any]):
152155

153156
# hack
154157
binary_file_host = binary_file.replace(
155-
"/workspaces/mlogv32", "/Users/object/Git/mlogv32"
158+
self.riscof_repo_path, self.host_repo_path
156159
)
157160
out_file_host = out_file.replace(
158-
"/workspaces/mlogv32", "/Users/object/Git/mlogv32"
161+
self.riscof_repo_path, self.host_repo_path
159162
)
160163

161164
# name of the signature file as per requirement of RISCOF. RISCOF expects the signature to

0 commit comments

Comments
 (0)