| Message ID | 20251104033329.466996-1-Qi.Chen@windriver.com |
|---|---|
| State | New |
| Headers | show |
| Series | oeqa/sdk/cases/autotools.py: fix host_sys value to handle multilib case | expand |
On Tue, 4 Nov 2025 at 04:33, Chen Qi via lists.openembedded.org
<Qi.Chen=windriver.com@lists.openembedded.org> wrote:
> This is because in case of multilib, HOST_SYS value is not correct.
Can you please give an example of the incorrect value, and what it
should be. We probably can find a better way to obtain the correct
value than surgery on CONFIGURE_FLAGS.
Alex
On 11/4/25 21:12, Alexander Kanavin wrote: > On Tue, 4 Nov 2025 at 04:33, Chen Qi via lists.openembedded.org > <Qi.Chen=windriver.com@lists.openembedded.org> wrote: >> This is because in case of multilib, HOST_SYS value is not correct. > Can you please give an example of the incorrect value, and what it > should be. We probably can find a better way to obtain the correct > value than surgery on CONFIGURE_FLAGS. > > Alex Hi Alex, When getting host_sys from td["HOST_SYS"], the value is always x86_64-poky-linux. This value is correct for environment-setup-x86-64-v3-poky-linux. But for environment-setup-x86-pokymllib32-linux, it's not correct. The correct value is i686-pokymllib32-linux. P.S. In that test case, the check runs after: self._run("cd {build} && {source}/configure CFLAGS='-std=gnu17 -Dbool=int -Dtrue=1 -Dfalse=0 -Wno-error=implicit-function-declaration' $CONFIGURE_FLAGS".format(**opts)) So I guess the initial intention is to ensure $CONFIGURE_FLAGS actually takes effect. Regards, Qi
On Wed, 5 Nov 2025 at 03:40, ChenQi <Qi.Chen@windriver.com> wrote: > When getting host_sys from td["HOST_SYS"], the value is always > x86_64-poky-linux. This value is correct for > environment-setup-x86-64-v3-poky-linux. But for > environment-setup-x86-pokymllib32-linux, it's not correct. The correct > value is i686-pokymllib32-linux. Right, what I was trying to find out is if there's some place where that value can be obtained directly. As far as I see, CONFIGURE_FLAGS is set in meta/classes-recipe/toolchain-scripts.bbclass, and there's no separate variable holding the correct value. So the patch seems ok. Alex
diff --git a/meta/lib/oeqa/sdk/cases/autotools.py b/meta/lib/oeqa/sdk/cases/autotools.py index ecafafa7d6..b9dd125294 100644 --- a/meta/lib/oeqa/sdk/cases/autotools.py +++ b/meta/lib/oeqa/sdk/cases/autotools.py @@ -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))