summaryrefslogtreecommitdiff
path: root/configs/example/fs.py
diff options
context:
space:
mode:
authorKevin Lim <ktlim@umich.edu>2006-10-30 14:01:34 -0500
committerKevin Lim <ktlim@umich.edu>2006-10-30 14:01:34 -0500
commitbc93802fb8f65656c09cfb96f2e4c2febe0e569f (patch)
tree12144e82d41a52eb2164d5d1bfee2545a863e7f2 /configs/example/fs.py
parent9be53b10b302a3b8ca8fcaa38bf318aa4dcc641c (diff)
downloadgem5-bc93802fb8f65656c09cfb96f2e4c2febe0e569f.tar.xz
Use some python os.path stuff to make it more flexible where we can execute this script from.
--HG-- extra : convert_revision : a76861a0f2669a7cd3bf3a34177739c69a913545
Diffstat (limited to 'configs/example/fs.py')
-rw-r--r--configs/example/fs.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/configs/example/fs.py b/configs/example/fs.py
index ec3be835a..aefa26169 100644
--- a/configs/example/fs.py
+++ b/configs/example/fs.py
@@ -39,6 +39,10 @@ import Simulation
if not m5.build_env['FULL_SYSTEM']:
m5.panic("This script requires full-system mode (ALPHA_FS).")
+# Get paths we might need. It's expected this file is in m5/configs/example.
+config_path = os.path.dirname(os.path.abspath(__file__))
+config_root = os.path.dirname(config_path)
+
parser = optparse.OptionParser()
# Benchmark options
@@ -54,8 +58,7 @@ parser.add_option("--etherdump", action="store", type="string", dest="etherdump"
help="Specify the filename to dump a pcap capture of the" \
"ethernet traffic")
-
-execfile("Options.py")
+execfile(os.path.join(config_root, "common", "Options.py"))
(options, args) = parser.parse_args()