changeset a91eb7b4a442 in /z/repo/gem5
details: http://repo.gem5.org/gem5?cmd=changeset;node=a91eb7b4a442
description:
        config: enable setting SE-mode environment variables from file

diffstat:

 configs/common/Options.py |  2 ++
 configs/example/se.py     |  4 ++++
 2 files changed, 6 insertions(+), 0 deletions(-)

diffs (26 lines):

diff -r 876341add7be -r a91eb7b4a442 configs/common/Options.py
--- a/configs/common/Options.py Thu Apr 23 13:37:50 2015 -0400
+++ b/configs/common/Options.py Thu Apr 23 13:40:18 2015 -0700
@@ -234,6 +234,8 @@
     parser.add_option("-o", "--options", default="",
                       help="""The options to pass to the binary, use " "
                               around the entire string""")
+    parser.add_option("-e", "--env", default="",
+                      help="Initialize workload environment from text file.")
     parser.add_option("-i", "--input", default="",
                       help="Read stdin from a file.")
     parser.add_option("--output", default="",
diff -r 876341add7be -r a91eb7b4a442 configs/example/se.py
--- a/configs/example/se.py     Thu Apr 23 13:37:50 2015 -0400
+++ b/configs/example/se.py     Thu Apr 23 13:40:18 2015 -0700
@@ -94,6 +94,10 @@
         process.executable = wrkld
         process.cwd = os.getcwd()
 
+        if options.env:
+            with open(options.env, 'r') as f:
+                process.env = [line.rstrip() for line in f]
+
         if len(pargs) > idx:
             process.cmd = [wrkld] + pargs[idx].split()
         else:
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev

Reply via email to