Skip to content

Commit 5769966

Browse files
committed
twister: deal with variants set on command line
not force host variant if environment is setting something different in the case of posix arch. Fixes #83766 Signed-off-by: Anas Nashif <anas.nashif@intel.com>
1 parent 3d42a1c commit 5769966

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

scripts/pylib/twister/twisterlib/testplan.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -898,9 +898,14 @@ def apply_filters(self, **kwargs):
898898
):
899899
if itoolchain:
900900
toolchain = itoolchain
901+
elif plat.arch in ['posix', 'unit']:
902+
# workaround until toolchain variant in zephyr is overhauled and improved.
903+
if self.env.toolchain in ['llvm']:
904+
toolchain = 'llvm'
905+
else:
906+
toolchain = 'host'
901907
else:
902-
default_toolchain = "zephyr" if not self.env.toolchain else self.env.toolchain
903-
toolchain = default_toolchain if plat.arch not in ['posix', 'unit'] else "host"
908+
toolchain = "zephyr" if not self.env.toolchain else self.env.toolchain
904909

905910
instance = TestInstance(ts, plat, toolchain, self.env.outdir)
906911
instance.run = instance.check_runnable(

0 commit comments

Comments
 (0)