-
Notifications
You must be signed in to change notification settings - Fork 6.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Backport v3.7-branch] twister: setup soc/arch roots based on module settings #77822
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -947,6 +947,22 @@ def __init__(self, options=None, default_options=None) -> None: | |||||||||||
if snippet_root: | ||||||||||||
self.snippet_roots.append(Path(module.project) / snippet_root) | ||||||||||||
|
||||||||||||
|
||||||||||||
self.soc_roots = [Path(ZEPHYR_BASE), Path(ZEPHYR_BASE) / 'subsys' / 'testsuite'] | ||||||||||||
self.dts_roots = [Path(ZEPHYR_BASE)] | ||||||||||||
self.arch_roots = [Path(ZEPHYR_BASE)] | ||||||||||||
|
||||||||||||
for module in modules: | ||||||||||||
soc_root = module.meta.get("build", {}).get("settings", {}).get("soc_root") | ||||||||||||
if soc_root: | ||||||||||||
self.soc_roots.append(os.path.join(module.project, soc_root)) | ||||||||||||
dts_root = module.meta.get("build", {}).get("settings", {}).get("dts_root") | ||||||||||||
if soc_root: | ||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||
self.dts_roots.append(os.path.join(module.project, dts_root)) | ||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. suggestion: see
Suggested change
OR:
Suggested change
|
||||||||||||
arch_root = module.meta.get("build", {}).get("settings", {}).get("arch_root") | ||||||||||||
if arch_root: | ||||||||||||
self.arch_roots.append(os.path.join(module.project, arch_root)) | ||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. suggestion: append with path-like object (PEP 519):
Suggested change
OR:
Suggested change
otherwise following line will cause
full traceback:
|
||||||||||||
|
||||||||||||
self.hwm = None | ||||||||||||
|
||||||||||||
self.test_config = options.test_config if options else None | ||||||||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
suggestion: see
arch_roots
belowOR: