summaryrefslogtreecommitdiff
path: root/configs/example/fs.py
diff options
context:
space:
mode:
authorAndreas Hansson <andreas.hansson@arm.com>2016-10-13 03:17:19 -0400
committerAndreas Hansson <andreas.hansson@arm.com>2016-10-13 03:17:19 -0400
commit68fdccb30bd85cd99823fb411ec7ae67112062d7 (patch)
treee6ef3d54238c64c63b00a3b83da96a9a1cdaad8b /configs/example/fs.py
parent2e5e9085792b1a7c47c231a2adf0da6f7ff8f20d (diff)
downloadgem5-68fdccb30bd85cd99823fb411ec7ae67112062d7.tar.xz
ruby: Fix regressions and make Ruby configs Python packages
This patch moves the addition of network options into the Ruby module to avoid the regressions all having to add it explicitly. Doing this exposes an issue in our current config system though, namely the fact that addtoPath is relative to the Python script being executed. Since both example and regression scripts use the Ruby module we would end up with two different (relative) paths being added. Instead we take a first step at turning the config modules into Python packages, simply by adding a __init__.py in the configs/ruby, configs/topologies and configs/network subdirectories. As a result, we can now add the top-level configs directory to the Python search path, and then use the package names in the various modules. The example scripts are also updated, and the messy path-deducing variations in the scripts are unified.
Diffstat (limited to 'configs/example/fs.py')
-rw-r--r--configs/example/fs.py7
1 files changed, 2 insertions, 5 deletions
diff --git a/configs/example/fs.py b/configs/example/fs.py
index 32fc699ba..13a8b0cf9 100644
--- a/configs/example/fs.py
+++ b/configs/example/fs.py
@@ -49,12 +49,10 @@ from m5.defines import buildEnv
from m5.objects import *
from m5.util import addToPath, fatal
+addToPath('../')
addToPath('../common')
-addToPath('../ruby')
-addToPath('../network')
-import Ruby
-import Network
+from ruby import Ruby
from FSConfig import *
from SysPaths import *
@@ -308,7 +306,6 @@ Options.addFSOptions(parser)
# Add the ruby specific and protocol specific options
if '--ruby' in sys.argv:
Ruby.define_options(parser)
- Network.define_options(parser)
(options, args) = parser.parse_args()