From 4f0db947f2dcf1782a2f55e8baa8c696fe5cbad8 Mon Sep 17 00:00:00 2001 From: Jamie McCrae Date: Mon, 8 Jul 2024 13:25:12 +0100 Subject: [PATCH] [nrf fromlist] scripts: list_hardware: Do not check qualifiers for run once config Upstream PR: https://github.com/zephyrproject-rtos/zephyr/pull/72857 Removes validating the qualifiers for flash run once configuration as files may be present that contain information for qualifiers that are not present in a single repository but are spaced out in other repositories, or might be optional Signed-off-by: Jamie McCrae (cherry picked from commit b72acf47e550090878fa87145c9766504c3deb13) (cherry picked from commit 973e62f1dfecd551b0057cd0c723e76ed0401c7a) --- scripts/list_hardware.py | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) diff --git a/scripts/list_hardware.py b/scripts/list_hardware.py index 2ea2ed9f0c5..2485985f4b4 100755 --- a/scripts/list_hardware.py +++ b/scripts/list_hardware.py @@ -100,25 +100,13 @@ def __init__(self, folder='', soc_yaml=None): for item_data in data['runners']['run_once'][grp]: for group in item_data['groups']: for qualifiers in group['qualifiers']: - soc_name, *components = qualifiers.split('/') + soc_name = qualifiers.split('/')[0] found_match = False - # Allow 'ns' as final qualifier until "virtual" CPUs are ported to soc.yml - # https://github.com/zephyrproject-rtos/zephyr/issues/70721 - if components and components[-1] == 'ns': - components.pop() - for soc in self._socs + self._extended_socs: if re.match(fr'^{soc_name}$', soc.name) is not None: - if soc.cpuclusters and components: - check_string = '/'.join(components) - for cpucluster in soc.cpuclusters: - if re.match(fr'^{check_string}$', cpucluster) is not None: - found_match = True - break - elif not soc.cpuclusters and not components: - found_match = True - break + found_match = True + break if found_match is False: sys.exit(f'ERROR: SoC qualifier match unresolved: {qualifiers}')