twister: testplan: do not verify_platforms_existence again
We already sanitize those lists very early on, no need to call this check again on the same lists. Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This commit is contained in:
parent
c0dbcdab10
commit
30ad1901f3
1 changed files with 2 additions and 18 deletions
|
@ -816,12 +816,7 @@ class TestPlan:
|
||||||
if platform_filter:
|
if platform_filter:
|
||||||
logger.debug(f"Checking platform filter: {platform_filter}")
|
logger.debug(f"Checking platform filter: {platform_filter}")
|
||||||
# find in aliases and rename
|
# find in aliases and rename
|
||||||
self.verify_platforms_existence(platform_filter, "platform_filter")
|
platform_filter = self.verify_platforms_existence(platform_filter, "platform_filter")
|
||||||
for pf in platform_filter:
|
|
||||||
logger.debug(f"Checking platform in filter: {pf}")
|
|
||||||
if pf in self.platform_names:
|
|
||||||
_platforms.append(self.get_platform(pf).name)
|
|
||||||
platform_filter = _platforms
|
|
||||||
platforms = list(filter(lambda p: p.name in platform_filter, self.platforms))
|
platforms = list(filter(lambda p: p.name in platform_filter, self.platforms))
|
||||||
elif emu_filter:
|
elif emu_filter:
|
||||||
platforms = list(
|
platforms = list(
|
||||||
|
@ -850,7 +845,7 @@ class TestPlan:
|
||||||
|
|
||||||
keyed_tests = {}
|
keyed_tests = {}
|
||||||
|
|
||||||
for ts_name, ts in self.testsuites.items():
|
for _, ts in self.testsuites.items():
|
||||||
if (
|
if (
|
||||||
ts.build_on_all
|
ts.build_on_all
|
||||||
and not platform_filter
|
and not platform_filter
|
||||||
|
@ -862,14 +857,10 @@ class TestPlan:
|
||||||
filter(lambda item: item.name in ts.integration_platforms, self.platforms)
|
filter(lambda item: item.name in ts.integration_platforms, self.platforms)
|
||||||
)
|
)
|
||||||
if self.options.integration:
|
if self.options.integration:
|
||||||
self.verify_platforms_existence(
|
|
||||||
ts.integration_platforms, f"{ts_name} - integration_platforms")
|
|
||||||
platform_scope = integration_platforms
|
platform_scope = integration_platforms
|
||||||
else:
|
else:
|
||||||
# if not in integration mode, still add integration platforms to the list
|
# if not in integration mode, still add integration platforms to the list
|
||||||
if not platform_filter:
|
if not platform_filter:
|
||||||
self.verify_platforms_existence(
|
|
||||||
ts.integration_platforms, f"{ts_name} - integration_platforms")
|
|
||||||
platform_scope = platforms + integration_platforms
|
platform_scope = platforms + integration_platforms
|
||||||
else:
|
else:
|
||||||
platform_scope = platforms
|
platform_scope = platforms
|
||||||
|
@ -886,7 +877,6 @@ class TestPlan:
|
||||||
and not integration
|
and not integration
|
||||||
and platform_config.get('increased_platform_scope', True)
|
and platform_config.get('increased_platform_scope', True)
|
||||||
):
|
):
|
||||||
self.verify_platforms_existence(ts.platform_allow, f"{ts_name} - platform_allow")
|
|
||||||
a = set(platform_scope)
|
a = set(platform_scope)
|
||||||
b = set(filter(lambda item: item.name in ts.platform_allow, self.platforms))
|
b = set(filter(lambda item: item.name in ts.platform_allow, self.platforms))
|
||||||
c = a.intersection(b)
|
c = a.intersection(b)
|
||||||
|
@ -979,12 +969,6 @@ class TestPlan:
|
||||||
instance.add_filter("In test suite vendor exclude", Filters.TESTSUITE)
|
instance.add_filter("In test suite vendor exclude", Filters.TESTSUITE)
|
||||||
|
|
||||||
if ts.platform_exclude and plat.name in ts.platform_exclude:
|
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)
|
instance.add_filter("In test case platform exclude", Filters.TESTSUITE)
|
||||||
|
|
||||||
if ts.toolchain_exclude and toolchain in ts.toolchain_exclude:
|
if ts.toolchain_exclude and toolchain in ts.toolchain_exclude:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue