From b5f4eb3f9e28b83aa98a55258bd23f740152e018 Mon Sep 17 00:00:00 2001 From: Torsten Rasmussen Date: Mon, 11 Aug 2025 13:41:22 +0200 Subject: [PATCH] [nrf fromlist] scripts: fix get_module_setting_root in compliance check root settings in zephyr/module.yml are in lower case and without quotes, as seen in following example: > build: > settings: > board_root: . > dts_root: . remove the `upper()` call and change `_ROOT` --> `_root`. Also remove the not needed `"` stripping. Upstream PR #: 94343 Signed-off-by: Torsten Rasmussen --- scripts/ci/check_compliance.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/scripts/ci/check_compliance.py b/scripts/ci/check_compliance.py index 3ee7b62c9b5..82f0de14a77 100755 --- a/scripts/ci/check_compliance.py +++ b/scripts/ci/check_compliance.py @@ -88,17 +88,15 @@ def get_module_setting_root(root, settings_file): # Invoke the script directly using the Python executable since this is # not a module nor a pip-installed Python utility root_paths = [] - if os.path.exists(settings_file): with open(settings_file, 'r') as fp_setting_file: content = fp_setting_file.read() lines = content.strip().split('\n') for line in lines: - root = root.upper() - if line.startswith(f'"{root}_ROOT":'): + if line.lstrip().startswith(f'{root}_root:'): _, root_path = line.split(":", 1) - root_paths.append(Path(root_path.strip('"'))) + root_paths.append(Path(root_path.strip())) return root_paths def get_vendor_prefixes(path, errfn = print) -> set[str]: