Gabe Black has uploaded this change for review. ( https://gem5-review.googlesource.com/c/public/gem5/+/12271

Change subject: systemc: Add a --working-dir option to the test config.py.
......................................................................

systemc: Add a --working-dir option to the test config.py.

The tests expect to be run from a certain directory. Generally that
doesn't matter, but in at least one case the test opens a file with a
relative path, and that doesn't work unless CWD is what it expects.

Change-Id: I34c0ed975e77daed50ace4f7eebd034bf04c5595
---
M src/systemc/tests/config.py
1 file changed, 9 insertions(+), 0 deletions(-)



diff --git a/src/systemc/tests/config.py b/src/systemc/tests/config.py
index 4b143d1..439a682 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 @@
 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)

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/12271
To unsubscribe, or for help writing mail filters, visit https://gem5-review.googlesource.com/settings

Gerrit-Project: public/gem5
Gerrit-Branch: master
Gerrit-Change-Id: I34c0ed975e77daed50ace4f7eebd034bf04c5595
Gerrit-Change-Number: 12271
Gerrit-PatchSet: 1
Gerrit-Owner: Gabe Black <[email protected]>
Gerrit-MessageType: newchange
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev

Reply via email to