diff options
Diffstat (limited to 'test/genini.py')
-rwxr-xr-x | test/genini.py | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/test/genini.py b/test/genini.py index 9c28ef361..b8eda5d46 100755 --- a/test/genini.py +++ b/test/genini.py @@ -30,13 +30,12 @@ from os.path import join as joinpath, realpath mypath = sys.path[0] sys.path.append(joinpath(mypath, '..')) +sys.path.append(joinpath(mypath, '../python')) sys.path.append(joinpath(mypath, '../util/pbs')) -sys.path.append(joinpath(mypath, '../sim/pyconfig')) -from importer import AddToPath, LoadMpyFile -from m5config import * +pathlist = [ '.' ] -AddToPath('.') +m5_build_env = {} try: opts, args = getopt.getopt(sys.argv[1:], '-E:I:') @@ -45,16 +44,22 @@ try: offset = arg.find('=') if offset == -1: name = arg - value = True + value = '1' else: name = arg[:offset] value = arg[offset+1:] - env[name] = value + os.environ[name] = value + m5_build_env[name] = value if opt == '-I': - AddToPath(arg) + pathlist.append(arg) except getopt.GetoptError: sys.exit('Improper Usage') +from m5 import * + +for path in pathlist: + AddToPath(path) + for arg in args: LoadMpyFile(arg) |