Skip to content

Commit

Permalink
twister: abort on unrecognised platforms
Browse files Browse the repository at this point in the history
identify misnamed platforms and abort.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
  • Loading branch information
nashif authored and aescolar committed Sep 16, 2024
1 parent d33dbdb commit 02bca9f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions scripts/pylib/twister/twisterlib/testplan.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit 02bca9f

Please sign in to comment.