From: Tom Hochstein <tom.hochstein@oss.nxp.com>
To: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>,
openembedded-core@lists.openembedded.org,
Ross Burton <ross.burton@arm.com>
Subject: Re: [OE-core] [PATCH v5 4/5] oeqa/sdk/meson: improve test to validate host/build target assignments
Date: Tue, 8 Apr 2025 10:10:01 -0500 [thread overview]
Message-ID: <27985820-e6f7-49a1-8574-5c55f17ab80d@oss.nxp.com> (raw)
In-Reply-To: <D91AQNC6UKX5.394WLWGGFWT4O@bootlin.com>
On 4/8/2025 8:37 AM, Mathieu Dubois-Briand wrote:
> [You don't often get email from mathieu.dubois-briand@bootlin.com. Learn why this is important at https://aka.ms/LearnAboutSenderIdentification ]
>
> On Mon Apr 7, 2025 at 11:18 PM CEST, Tom Hochstein via lists.openembedded.org wrote:
>> From: Ross Burton <ross.burton@arm.com>
>>
>> Use 'meson introspect' to dump JSON describing the build configuration
>> and validate that the build and host architectures are correctly set in
>> the meson.cross file.
>>
>> Also instead of calling ninja directly, call the relevant meson commands.
>>
>> Fixes: [YOCTO #15485]
>> Signed-off-by: Ross Burton <ross.burton@arm.com>
>> Signed-off-by: Tom Hochstein <tom.hochstein@oss.nxp.com>
>> ---
>> meta/lib/oeqa/sdk/cases/meson.py | 18 +++++++++++++-----
>> 1 file changed, 13 insertions(+), 5 deletions(-)
>>
>> diff --git a/meta/lib/oeqa/sdk/cases/meson.py b/meta/lib/oeqa/sdk/cases/meson.py
>> index 1edf78720a..407b94d242 100644
>> --- a/meta/lib/oeqa/sdk/cases/meson.py
>> +++ b/meta/lib/oeqa/sdk/cases/meson.py
>> @@ -4,6 +4,7 @@
>> # SPDX-License-Identifier: MIT
>> #
>>
>> +import json
>> import os
>> import subprocess
>> import tempfile
>> @@ -39,10 +40,17 @@ class MesonTest(OESDKTestCase):
>> self.assertTrue(os.path.isdir(dirs["source"]))
>> os.makedirs(dirs["build"])
>>
>> - log = self._run("meson --warnlevel 1 -Degl=no -Dglx=no -Dx11=false {build} {source}".format(**dirs))
>> - # Check that Meson thinks we're doing a cross build and not a native
>> - self.assertIn("Build type: cross build", log)
>> - self._run("ninja -C {build} -v".format(**dirs))
>> - self._run("DESTDIR={install} ninja -C {build} -v install".format(**dirs))
>> + log = self._run("meson setup --warnlevel 1 -Degl=no -Dglx=no -Dx11=false {build} {source}".format(**dirs))
>> +
>> + # Check that the host (gcc) and build (cross-gcc) compilers are different
>> + data = json.loads(self._run("meson introspect --compilers {build}".format(**dirs)))
>> + self.assertNotEqual(data["build"]["c"]["exelist"], data["host"]["c"]["exelist"])
>> + # Check that the system architectures were set correctly
>> + data = json.loads(self._run("meson introspect --machines {build}".format(**dirs)))
>> + self.assertEqual(data["build"]["cpu"], self.td["SDK_ARCH"])
>> + self.assertEqual(data["host"]["cpu"], self.td["HOST_ARCH"])
>> +
>> + self._run("meson compile -C {build} -v".format(**dirs))
>> + self._run("meson install -C {build} --destdir {install}".format(**dirs))
>>
>> self.check_elf(os.path.join(dirs["install"], "usr", "local", "lib", "libepoxy.so"))
>
> Hi,
>
> Thanks for the new version, but we have a new error now:
>
> Traceback (most recent call last):
> File "/srv/pokybuild/yocto-worker/qemux86/build/meta/lib/oeqa/sdk/cases/meson.py", line 47, in test_epoxy
> self.assertNotEqual(data["build"]["c"]["exelist"], data["host"]["c"]["exelist"])
> ~~~~~~~~~~~~~^^^^^
> KeyError: 'c'
Thanks, Mathieu.
Ross, can you have a look?
>
> https://autobuilder.yoctoproject.org/valkyrie/#/builders/30/builds/1330
>
> Can you have a look at this please?
>
> --
> Mathieu Dubois-Briand, Bootlin
> Embedded Linux and Kernel engineering
> https://bootlin.com
>
next prev parent reply other threads:[~2025-04-08 15:10 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-07 21:18 [PATCH v5 1/5] toolchain-scripts: Add Meson settings for Yocto build SDK Tom Hochstein
2025-04-07 21:18 ` [PATCH v5 2/5] toolchain-scripts: Export meson settings for SDK builds Tom Hochstein
2025-04-07 21:18 ` [PATCH v5 3/5] meson: Fix host_machine setting for native cross-file Tom Hochstein
2025-04-07 21:18 ` [PATCH v5 4/5] oeqa/sdk/meson: improve test to validate host/build target assignments Tom Hochstein
2025-04-08 13:37 ` [OE-core] " Mathieu Dubois-Briand
2025-04-08 15:10 ` Tom Hochstein [this message]
[not found] ` <183460753CA35884.31078@lists.openembedded.org>
2025-04-10 13:28 ` Tom Hochstein
[not found] ` <1834F816ACB44615.7383@lists.openembedded.org>
2025-04-10 15:28 ` Tom Hochstein
[not found] ` <1834FEA34534143E.27206@lists.openembedded.org>
2025-04-10 18:58 ` Tom Hochstein
2025-04-11 10:01 ` Mathieu Dubois-Briand
[not found] ` <18353B5DF2EF4BC1.27206@lists.openembedded.org>
2025-04-11 10:13 ` Mathieu Dubois-Briand
2025-04-11 15:37 ` Tom Hochstein
2025-04-15 8:29 ` Mathieu Dubois-Briand
2025-04-07 21:18 ` [PATCH v5 5/5] meson: Allow user to override setup command options Tom Hochstein
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=27985820-e6f7-49a1-8574-5c55f17ab80d@oss.nxp.com \
--to=tom.hochstein@oss.nxp.com \
--cc=mathieu.dubois-briand@bootlin.com \
--cc=openembedded-core@lists.openembedded.org \
--cc=ross.burton@arm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox