summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rwxr-xr-xsrc/systemc/tests/config.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/systemc/tests/config.py b/src/systemc/tests/config.py
index 4b143d109..439a6828c 100755
--- a/src/systemc/tests/config.py
+++ b/src/systemc/tests/config.py
@@ -27,7 +27,9 @@
from __future__ import print_function
+import argparse
import m5
+import os
import re
from m5.objects import SystemC_Kernel, Root
@@ -37,6 +39,13 @@ from m5.objects import SystemC_Kernel, Root
kernel = SystemC_Kernel()
root = Root(full_system=True, systemc_kernel=kernel)
+parser = argparse.ArgumentParser()
+parser.add_argument('--working-dir')
+
+args = parser.parse_args()
+if args.working_dir:
+ os.chdir(args.working_dir)
+
kernel.sc_main("Hello", "World");
m5.instantiate(None)