@@ -614,27 +614,15 @@ def add_testsuites(self, testsuite_filter=None):
614
614
)
615
615
616
616
# convert to fully qualified names
617
- _integration = []
618
- _platform_allow = []
619
- _platform_exclude = []
620
- for _ip in suite .integration_platforms :
621
- if _ip in self .platform_names :
622
- _integration .append (self .get_platform (_ip ).name )
623
- else :
624
- logger .error (f"Platform { _ip } not found in the list of platforms" )
625
- suite .integration_platforms = _integration
626
- for _pe in suite .platform_exclude :
627
- if _pe in self .platform_names :
628
- _platform_exclude .append (self .get_platform (_pe ).name )
629
- else :
630
- logger .error (f"Platform { _pe } not found in the list of platforms" )
631
- suite .platform_exclude = _platform_exclude
632
- for _pa in suite .platform_allow :
633
- if _pa in self .platform_names :
634
- _platform_allow .append (self .get_platform (_pa ).name )
635
- else :
636
- logger .error (f"Platform { _pa } not found in the list of platforms" )
637
- suite .platform_allow = _platform_allow
617
+ suite .integration_platforms = self .verify_platforms_existence (
618
+ suite .integration_platforms ,
619
+ f"integration_platforms in { suite .name } " )
620
+ suite .platform_exclude = self .verify_platforms_existence (
621
+ suite .platform_exclude ,
622
+ f"platform_exclude in { suite .name } " )
623
+ suite .platform_allow = self .verify_platforms_existence (
624
+ suite .platform_allow ,
625
+ f"platform_allow in { suite .name } " )
638
626
639
627
if suite .harness in ['ztest' , 'test' ]:
640
628
if subcases is None :
@@ -1261,12 +1249,16 @@ def verify_platforms_existence(self, platform_names_to_verify, log_info=""):
1261
1249
as platform_allow or integration_platforms options) is correct. If not -
1262
1250
log and raise error.
1263
1251
"""
1252
+ _platforms = []
1264
1253
for platform in platform_names_to_verify :
1265
1254
if platform in self .platform_names :
1266
- continue
1255
+ p = self .get_platform (platform )
1256
+ if p :
1257
+ _platforms .append (p .name )
1267
1258
else :
1268
1259
logger .error (f"{ log_info } - unrecognized platform - { platform } " )
1269
1260
sys .exit (2 )
1261
+ return _platforms
1270
1262
1271
1263
def create_build_dir_links (self ):
1272
1264
"""
0 commit comments