Skip to content

Commit

Permalink
config: Fix the "script" SysPath functor.
Browse files Browse the repository at this point in the history
This particular functor looks in the config root, not in the path
specified by M5_ROOT like binary and disk.

Change-Id: Ib007c36934c65ca9f808e995a2e0c71f0b338788
Reviewed-on: https://gem5-review.googlesource.com/5641
Reviewed-by: Curtis Dunham <[email protected]>
Maintainer: Gabe Black <[email protected]>
  • Loading branch information
gabemblack committed Nov 13, 2017
1 parent 981ee98 commit 8596007
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions configs/common/SysPaths.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,12 @@
class PathSearchFunc(object):
_sys_paths = None

def __init__(self, *subdirs):
def __init__(self, subdirs, sys_paths=None):
if isinstance(subdirs, basestring):
subdirs = [subdirs]
self._subdir = os.path.join(*subdirs)
if sys_paths:
self._sys_paths = sys_paths

def __call__(self, filename):
if self._sys_paths is None:
Expand Down Expand Up @@ -64,4 +68,4 @@ def __call__(self, filename):

disk = PathSearchFunc('disks')
binary = PathSearchFunc('binaries')
script = PathSearchFunc('boot')
script = PathSearchFunc('boot', sys_paths=[config_root])

0 comments on commit 8596007

Please sign in to comment.