summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorSteve Reinhardt <stever@eecs.umich.edu>2005-02-22 23:53:34 -0500
committerSteve Reinhardt <stever@eecs.umich.edu>2005-02-22 23:53:34 -0500
commitaf33e74638ea822fba0ddbc7fddbe7583c61d920 (patch)
tree11a0ec348fd6b0a1311bf0ca81f93045750927a5 /test
parent884a8de50955422f3691496c19bf582c0f8f5e32 (diff)
downloadgem5-af33e74638ea822fba0ddbc7fddbe7583c61d920.tar.xz
Small initial steps toward generating C++ param structs
from Python object descriptions. Mostly cleanup of Python code based on things I encountered trying to figure out what's going on. Main reason I'm committing this now is to transfer work from my laptop to zizzer. sim/pyconfig/m5config.py: Small steps toward param struct generation: all param objects should now have a _cppname attribute that holds their corresponding C++ type name. Made Param ptype attribute an actual type instead of a string. String is still stored in ptype_string. Get rid of AddToPath() and Import() (redundant copies are in importer, and that seems to be the more logical place for them). Add a few comments, delete some unused code. test/genini.py: A few fixes to make the environment more compatible with what really happens when configs are executed from the m5 binary. --HG-- extra : convert_revision : 9fc8f72cd0c22ba3deada02f37484787342534f2
Diffstat (limited to 'test')
-rwxr-xr-x[-rw-r--r--]test/genini.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/test/genini.py b/test/genini.py
index 73e7012f6..9c28ef361 100644..100755
--- a/test/genini.py
+++ b/test/genini.py
@@ -30,13 +30,14 @@ from os.path import join as joinpath, realpath
mypath = sys.path[0]
sys.path.append(joinpath(mypath, '..'))
-sys.path.append(joinpath(mypath, '../configs/kernel'))
sys.path.append(joinpath(mypath, '../util/pbs'))
sys.path.append(joinpath(mypath, '../sim/pyconfig'))
-from importer import mpy_exec, mpy_execfile, AddToPath
+from importer import AddToPath, LoadMpyFile
from m5config import *
+AddToPath('.')
+
try:
opts, args = getopt.getopt(sys.argv[1:], '-E:I:')
for opt,arg in opts:
@@ -55,8 +56,7 @@ except getopt.GetoptError:
sys.exit('Improper Usage')
for arg in args:
- AddToPath(os.path.dirname(arg))
- mpy_execfile(arg)
+ LoadMpyFile(arg)
if globals().has_key('root') and isinstance(root, type) \
and issubclass(root, Root):