summaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
authorKevin Lim <ktlim@umich.edu>2005-03-08 21:03:20 -0500
committerKevin Lim <ktlim@umich.edu>2005-03-08 21:03:20 -0500
commit2162b433adfa596bc0d6515b8157b24cd2599541 (patch)
tree96c01743fc94260c77848a92cefcc0e4e8dbc248 /util
parentbb41c21d6ae3417cfcbfa1bb5ecc9efbae1950ab (diff)
parent550e6a5010602049b9be426ba41939ee7167ccd9 (diff)
downloadgem5-2162b433adfa596bc0d6515b8157b24cd2599541.tar.xz
Hand-merge static_inst.hh. These execute functions are within an external file in the new CPU case.
cpu/static_inst.hh: Hand-merge. These execute functions are within an external file in the new CPU case. --HG-- extra : convert_revision : a34112f471fa31bdd5bb53552ddd704b9571c110
Diffstat (limited to 'util')
-rw-r--r--util/pbs/jobfile.py15
1 files changed, 12 insertions, 3 deletions
diff --git a/util/pbs/jobfile.py b/util/pbs/jobfile.py
index 570faa61b..83eb81358 100644
--- a/util/pbs/jobfile.py
+++ b/util/pbs/jobfile.py
@@ -26,7 +26,9 @@
#
# Authors: Nathan Binkert
-from os.path import expanduser
+from os.path import expanduser, isfile, join as joinpath
+import sys
+
def crossproduct(options):
number = len(options)
indexes = [ 0 ] * number
@@ -49,9 +51,16 @@ def crossproduct(options):
done = next()
class JobFile(object):
- def __init__(self, file):
+ def __init__(self, jfile):
self.data = {}
- execfile(expanduser(file), self.data)
+ jfile = expanduser(jfile)
+ if not isfile(jfile):
+ for p in sys.path:
+ if isfile(joinpath(p, jfile)):
+ jfile = joinpath(p, jfile)
+ break
+
+ execfile(jfile, self.data)
self.options = self.data['options']
self.environment = self.data['environment']
self.jobinfo = {}