Skip to content

Commit

Permalink
twister: Fix toolchain assignment for posix
Browse files Browse the repository at this point in the history
twister was unconditionally setting the toolchain to "host" for the
"posix" and "unit" architectures, clobbering the toolchain setup in the
environment.

Signed-off-by: Keith Short <[email protected]>
  • Loading branch information
keith-zephyr committed Jan 9, 2025
1 parent 5aeda6f commit 8d5d9c7
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions scripts/pylib/twister/twisterlib/testplan.py
Original file line number Diff line number Diff line change
Expand Up @@ -898,9 +898,12 @@ def apply_filters(self, **kwargs):
):
if itoolchain:
toolchain = itoolchain
elif self.env.toolchain:
toolchain = self.env.toolchain
elif plat.arch in ['posix', 'unit']:
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"

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

0 comments on commit 8d5d9c7

Please sign in to comment.