From 02bca9f6f6d159f07215e92f7501fc8ccb23bb5a Mon Sep 17 00:00:00 2001 From: Anas Nashif Date: Thu, 12 Sep 2024 16:54:21 -0400 Subject: [PATCH] twister: abort on unrecognised platforms identify misnamed platforms and abort. Signed-off-by: Anas Nashif --- scripts/pylib/twister/twisterlib/testplan.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/scripts/pylib/twister/twisterlib/testplan.py b/scripts/pylib/twister/twisterlib/testplan.py index 2b6b80a89f85..3e84a5067150 100755 --- a/scripts/pylib/twister/twisterlib/testplan.py +++ b/scripts/pylib/twister/twisterlib/testplan.py @@ -767,8 +767,7 @@ def apply_filters(self, **kwargs): # If there isn't any overlap between the platform_allow list and the platform_scope # we set the scope to the platform_allow list if ts.platform_allow and not platform_filter and not integration and platform_config.get('increased_platform_scope', True): - self.verify_platforms_existence( - ts.platform_allow, f"{ts_name} - platform_allow") + self.verify_platforms_existence(ts.platform_allow, f"{ts_name} - platform_allow") a = set(platform_scope) b = set(filter(lambda item: item.name in ts.platform_allow, self.platforms)) c = a.intersection(b) @@ -846,6 +845,9 @@ def apply_filters(self, **kwargs): instance.add_filter("In test case arch exclude", Filters.TESTSUITE) if ts.platform_exclude and plat.name in ts.platform_exclude: + # works only when we have all platforms parsed, -p limits parsing... + if not platform_filter: + self.verify_platforms_existence(ts.platform_exclude, f"{ts_name} - platform_exclude") instance.add_filter("In test case platform exclude", Filters.TESTSUITE) if ts.toolchain_exclude and toolchain in ts.toolchain_exclude: