diff mbox series

oeqa/sdk/cases/meson.py: fix assertion for multilib

Message ID 20251203052217.525069-1-Qi.Chen@windriver.com
State New
Headers show
Series oeqa/sdk/cases/meson.py: fix assertion for multilib | expand

Commit Message

ChenQi Dec. 3, 2025, 5:22 a.m. UTC
From: Chen Qi <Qi.Chen@windriver.com>

In case of multilib, the values of CC and HOST_ARCH in self.td are
not valid for lib32. We need to use the env vars sourced by the
env script.

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
---
 meta/lib/oeqa/sdk/cases/meson.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/meta/lib/oeqa/sdk/cases/meson.py b/meta/lib/oeqa/sdk/cases/meson.py
index a809ca3a53..7419988922 100644
--- a/meta/lib/oeqa/sdk/cases/meson.py
+++ b/meta/lib/oeqa/sdk/cases/meson.py
@@ -39,11 +39,11 @@  class MesonTestBase(OESDKTestCase):
 
         # Check that the cross-compiler used is the one we set.
         data = json.loads(self._run(f"meson introspect --compilers {builddir}"))
-        self.assertIn(self.td.get("CC").split()[0], data["host"]["c"]["exelist"])
+        self.assertIn(self._run("echo $CC").split()[0], data["host"]["c"]["exelist"])
 
         # Check that the target architectures was set correctly.
         data = json.loads(self._run(f"meson introspect --machines {builddir}"))
-        self.assertEqual(data["host"]["cpu"], self.td["HOST_ARCH"])
+        self.assertEqual(data["host"]["cpu"], self._run("echo -n $OECORE_MESON_HOST_CPU"))
 
         self._run(f"meson compile -C {builddir} -v")