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

(cherry picked from commit 5769966)

Original-Signed-off-by: Anas Nashif <anas.nashif@intel.com>
GitOrigin-RevId: 5769966
Cr-Build-Id: 8726132470642320465
Cr-Build-Url: https://cr-buildbucket.appspot.com/build/8726132470642320465
Copybot-Job-Name: zephyr-main-copybot-downstream
Change-Id: I0adcdd707d690d3d8ddc6b881218fb5f6b140113
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/zephyr/+/6167011
Commit-Queue: Keith Short <keithshort@chromium.org>
Tested-by: ChromeOS Prod (Robot) <chromeos-ci-prod@chromeos-bot.iam.gserviceaccount.com>
Reviewed-by: Keith Short <keithshort@chromium.org>
Tested-by: Keith Short <keithshort@chromium.org>
  • Loading branch information
Anas Nashif authored and Chromeos LUCI committed Jan 10, 2025
1 parent b081fa6 commit fa714c7
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 fa714c7

Please sign in to comment.