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>
# 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))