summaryrefslogtreecommitdiff
path: root/tests/configs
diff options
context:
space:
mode:
authorNilay Vaish <nilay@cs.wisc.edu>2012-03-28 11:01:53 -0500
committerNilay Vaish <nilay@cs.wisc.edu>2012-03-28 11:01:53 -0500
commit390cfc7be9e5e477451a31a1dc8df82b42ee4011 (patch)
tree79535c74b31fdac5d3e0f64c12372fc7572609c8 /tests/configs
parent6ca3af8ecfa5e6fbc03b01c0eba3de9d6e2f7c45 (diff)
downloadgem5-390cfc7be9e5e477451a31a1dc8df82b42ee4011.tar.xz
Config: Change the way options are added
I am not too happy with the way options are added in files se.py and fs.py currently. This patch moves all the options to the file Options.py, functions from which are called when required.
Diffstat (limited to 'tests/configs')
-rw-r--r--tests/configs/memtest-ruby.py6
-rw-r--r--tests/configs/rubytest-ruby.py6
-rw-r--r--tests/configs/simple-timing-mp-ruby.py6
-rw-r--r--tests/configs/simple-timing-ruby.py7
4 files changed, 8 insertions, 17 deletions
diff --git a/tests/configs/memtest-ruby.py b/tests/configs/memtest-ruby.py
index e2c59497e..c69e1bf00 100644
--- a/tests/configs/memtest-ruby.py
+++ b/tests/configs/memtest-ruby.py
@@ -41,16 +41,14 @@ addToPath(config_root+'/configs/common')
addToPath(config_root+'/configs/ruby')
import Ruby
+import Options
parser = optparse.OptionParser()
+Options.addCommonOptions(parser)
-#
# Add the ruby specific and protocol specific options
-#
Ruby.define_options(parser)
-execfile(os.path.join(config_root, "configs/common", "Options.py"))
-
(options, args) = parser.parse_args()
#
diff --git a/tests/configs/rubytest-ruby.py b/tests/configs/rubytest-ruby.py
index c53ed26bd..70deb2958 100644
--- a/tests/configs/rubytest-ruby.py
+++ b/tests/configs/rubytest-ruby.py
@@ -42,16 +42,14 @@ addToPath(config_root+'/configs/common')
addToPath(config_root+'/configs/ruby')
import Ruby
+import Options
parser = optparse.OptionParser()
+Options.addCommonOptions(parser)
-#
# Add the ruby specific and protocol specific options
-#
Ruby.define_options(parser)
-execfile(os.path.join(config_root, "configs/common", "Options.py"))
-
(options, args) = parser.parse_args()
#
diff --git a/tests/configs/simple-timing-mp-ruby.py b/tests/configs/simple-timing-mp-ruby.py
index 9919cabcb..d2f11abce 100644
--- a/tests/configs/simple-timing-mp-ruby.py
+++ b/tests/configs/simple-timing-mp-ruby.py
@@ -39,17 +39,15 @@ m5_root = os.path.dirname(config_root)
addToPath(config_root+'/configs/common')
addToPath(config_root+'/configs/ruby')
+import Options
import Ruby
parser = optparse.OptionParser()
+Options.addCommonOptions(parser)
-#
# Add the ruby specific and protocol specific options
-#
Ruby.define_options(parser)
-execfile(os.path.join(config_root, "configs/common", "Options.py"))
-
(options, args) = parser.parse_args()
#
diff --git a/tests/configs/simple-timing-ruby.py b/tests/configs/simple-timing-ruby.py
index 8339e0e9a..19e827c80 100644
--- a/tests/configs/simple-timing-ruby.py
+++ b/tests/configs/simple-timing-ruby.py
@@ -35,21 +35,18 @@ import os, optparse, sys
# Get paths we might need
config_path = os.path.dirname(os.path.abspath(__file__))
config_root = os.path.dirname(config_path)
-m5_root = os.path.dirname(config_root)
addToPath(config_root+'/configs/common')
addToPath(config_root+'/configs/ruby')
import Ruby
+import Options
parser = optparse.OptionParser()
+Options.addCommonOptions(parser)
-#
# Add the ruby specific and protocol specific options
-#
Ruby.define_options(parser)
-execfile(os.path.join(config_root, "configs/common", "Options.py"))
-
(options, args) = parser.parse_args()
#