From 3bf7f83f213f96daa9a17cd3ddd4cff0a200bb9d Mon Sep 17 00:00:00 2001 From: Maciej Perkowski Date: Fri, 5 May 2023 13:34:05 +0200 Subject: [PATCH] twister: Bring back scope selection rule using platform_allow A change to the scope selection rules was introduced by #52715 but it doesn't comply with the description in the code. What's more, the change introduces major issues i.e. non deterministic scope selection, especially in a CI environment. More context at #57595 Signed-off-by: Maciej Perkowski --- scripts/pylib/twister/twisterlib/testplan.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/scripts/pylib/twister/twisterlib/testplan.py b/scripts/pylib/twister/twisterlib/testplan.py index 3dffbc21213..3b56f2da00c 100755 --- a/scripts/pylib/twister/twisterlib/testplan.py +++ b/scripts/pylib/twister/twisterlib/testplan.py @@ -685,10 +685,8 @@ class TestPlan: b = set(filter(lambda item: item.name in ts.platform_allow, self.platforms)) c = a.intersection(b) if not c: - _platform_scope = list(filter(lambda item: item.name in ts.platform_allow, \ + platform_scope = list(filter(lambda item: item.name in ts.platform_allow, \ self.platforms)) - if len(_platform_scope) > 0: - platform_scope = _platform_scope[:1] # list of instances per testsuite, aka configurations.