summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorKevin Lim <ktlim@umich.edu>2005-02-11 17:54:42 -0500
committerKevin Lim <ktlim@umich.edu>2005-02-11 17:54:42 -0500
commit79e83cea971bf346a5b0d6e88541e502a614c777 (patch)
treee1561f7044a4b3ee79a960d57451716af53387b5 /test
parentc4d0ebd25cc5f0657b99543ff2df30d1a86f3ad5 (diff)
parent10ee909fbd895b588bf01021af98e81a3ae40fc0 (diff)
downloadgem5-79e83cea971bf346a5b0d6e88541e502a614c777.tar.xz
Merge ktlim@zizzer.eecs.umich.edu:/bk/m5
into zamp.eecs.umich.edu:/z/ktlim2/m5 --HG-- extra : convert_revision : 11832134b169aa827a1d03c96ef89edddf4b3dab
Diffstat (limited to 'test')
-rw-r--r--test/genini.py25
1 files changed, 15 insertions, 10 deletions
diff --git a/test/genini.py b/test/genini.py
index db1a7a5b0..73e7012f6 100644
--- a/test/genini.py
+++ b/test/genini.py
@@ -26,26 +26,31 @@
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
import getopt, os, os.path, sys
+from os.path import join as joinpath, realpath
-sys.path.append('..')
-sys.path.append('../configs/kernel')
-sys.path.append('../sim/pyconfig')
+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 m5config import *
try:
- opts, args = getopt.getopt(sys.argv[1:], '-E:')
- for o,a in opts:
- if o == '-E':
- offset = a.find('=')
+ opts, args = getopt.getopt(sys.argv[1:], '-E:I:')
+ for opt,arg in opts:
+ if opt == '-E':
+ offset = arg.find('=')
if offset == -1:
- name = a
+ name = arg
value = True
else:
- name = a[:offset]
- value = a[offset+1:]
+ name = arg[:offset]
+ value = arg[offset+1:]
env[name] = value
+ if opt == '-I':
+ AddToPath(arg)
except getopt.GetoptError:
sys.exit('Improper Usage')