]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
oeqa/sdk/cases/autotools.py: fix host_sys value to handle multilib case
authorChen Qi <Qi.Chen@windriver.com>
Tue, 4 Nov 2025 03:33:29 +0000 (11:33 +0800)
committerMathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Fri, 7 Nov 2025 05:47:27 +0000 (06:47 +0100)
For now, testsdk always fails for multilib. This could be reproduced
by the following steps:

  1. Add to local.conf:
     OE_FRAGMENTS += "machine/qemux86-64 distro/poky"
     OE_FRAGMENTS += "core/yocto-autobuilder/multilib-x86-lib32"
     IMAGE_CLASSES += "testsdk"
  2. bitbake core-image-minimal -c populate_sdk && \
     bitbake core-image-minimal -c testsdk

This is because in case of multilib, HOST_SYS value is not correct.

So switch to use CONFIGURE_FLAGS environment variable to extract
the host_sys value.

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
meta/lib/oeqa/sdk/cases/autotools.py

index ecafafa7d6d4396fe770801446475aebf2d3c22e..b9dd1252943def6430f6a06c16aa7e7d4159e846 100644 (file)
@@ -43,7 +43,8 @@ class AutotoolsTest(OESDKTestCase):
 
             # Check that configure detected the target correctly
             with open(os.path.join(opts["build"], "config.log")) as f:
-                host_sys = self.td["HOST_SYS"]
+                configure_flags= self._run("echo $CONFIGURE_FLAGS")
+                host_sys = configure_flags.split("--host=")[1].split()[0]
                 self.assertIn(f"host_alias='{host_sys}'\n", f.readlines())
 
             self._run("cd {build} && make CFLAGS='-std=gnu17 -Dbool=int -Dtrue=1 -Dfalse=0 -Wno-error=implicit-function-declaration' {parallel_make}".format(**opts))