From 8d5d9c70837441687ca4f789c414364fbb100f89 Mon Sep 17 00:00:00 2001 From: Keith Short Date: Thu, 9 Jan 2025 14:16:37 -0700 Subject: [PATCH] twister: Fix toolchain assignment for posix 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 --- scripts/pylib/twister/twisterlib/testplan.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/scripts/pylib/twister/twisterlib/testplan.py b/scripts/pylib/twister/twisterlib/testplan.py index 7c29df275ebabb..f1694af741f1b2 100755 --- a/scripts/pylib/twister/twisterlib/testplan.py +++ b/scripts/pylib/twister/twisterlib/testplan.py @@ -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(