diff options
author | Gabe Black <gabeblack@google.com> | 2017-11-10 17:43:07 -0800 |
---|---|---|
committer | Gabe Black <gabeblack@google.com> | 2017-11-13 21:19:39 +0000 |
commit | 85960074a19762ff050f97ed48dfa2e885120dbf (patch) | |
tree | 3450044f2fa2d43263a47a8d79e0acb3a60e72ef /configs | |
parent | 981ee9807966fc1a0ba7d0fb9e9b2368ddeeae24 (diff) | |
download | gem5-85960074a19762ff050f97ed48dfa2e885120dbf.tar.xz |
config: Fix the "script" SysPath functor.
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 <curtis.dunham@arm.com>
Maintainer: Gabe Black <gabeblack@google.com>
Diffstat (limited to 'configs')
-rw-r--r-- | configs/common/SysPaths.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/configs/common/SysPaths.py b/configs/common/SysPaths.py index c012846ce..9a234ccec 100644 --- a/configs/common/SysPaths.py +++ b/configs/common/SysPaths.py @@ -34,8 +34,12 @@ config_root = os.path.dirname(config_path) 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: @@ -64,4 +68,4 @@ class PathSearchFunc(object): disk = PathSearchFunc('disks') binary = PathSearchFunc('binaries') -script = PathSearchFunc('boot') +script = PathSearchFunc('boot', sys_paths=[config_root]) |