Gabe Black has submitted this change and it was merged. (
https://gem5-review.googlesource.com/5641 )
Change subject: config: Fix the "script" SysPath functor.
......................................................................
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 <[email protected]>
Maintainer: Gabe Black <[email protected]>
---
M configs/common/SysPaths.py
1 file changed, 6 insertions(+), 2 deletions(-)
Approvals:
Curtis Dunham: Looks good to me, approved
Gabe Black: Looks good to me, approved
diff --git a/configs/common/SysPaths.py b/configs/common/SysPaths.py
index c012846..9a234cc 100644
--- a/configs/common/SysPaths.py
+++ b/configs/common/SysPaths.py
@@ -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:
@@ -64,4 +68,4 @@
disk = PathSearchFunc('disks')
binary = PathSearchFunc('binaries')
-script = PathSearchFunc('boot')
+script = PathSearchFunc('boot', sys_paths=[config_root])
--
To view, visit https://gem5-review.googlesource.com/5641
To unsubscribe, or for help writing mail filters, visit
https://gem5-review.googlesource.com/settings
Gerrit-Project: public/gem5
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: Ib007c36934c65ca9f808e995a2e0c71f0b338788
Gerrit-Change-Number: 5641
Gerrit-PatchSet: 2
Gerrit-Owner: Gabe Black <[email protected]>
Gerrit-Assignee: Curtis Dunham <[email protected]>
Gerrit-Reviewer: Curtis Dunham <[email protected]>
Gerrit-Reviewer: Gabe Black <[email protected]>
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev