Skip to content

Commit

Permalink
twister: deal with variants set on command line
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
nashif committed Jan 10, 2025
1 parent 3d42a1c commit 5769966
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions scripts/pylib/twister/twisterlib/testplan.py
Original file line number Diff line number Diff line change
Expand Up @@ -898,9 +898,14 @@ def apply_filters(self, **kwargs):
):
if itoolchain:
toolchain = itoolchain
elif plat.arch in ['posix', 'unit']:
# workaround until toolchain variant in zephyr is overhauled and improved.
if self.env.toolchain in ['llvm']:
toolchain = 'llvm'
else:
toolchain = 'host'
else:
default_toolchain = "zephyr" if not self.env.toolchain else self.env.toolchain
toolchain = default_toolchain if plat.arch not in ['posix', 'unit'] else "host"
toolchain = "zephyr" if not self.env.toolchain else self.env.toolchain

instance = TestInstance(ts, plat, toolchain, self.env.outdir)
instance.run = instance.check_runnable(
Expand Down

0 comments on commit 5769966

Please sign in to comment.