From patchwork Sun Aug 30 18:36:14 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Trevor Woerner X-Patchwork-Id: 96835 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7E239C61DE1 for ; Sun, 30 Aug 2026 18:36:27 +0000 (UTC) Received: from mail-qv1-f42.google.com (mail-qv1-f42.google.com [209.85.219.42]) by mx.groups.io with SMTP id smtpd.msgproc02-g2.13831.1788114983948718254 for ; Sun, 30 Aug 2026 11:36:24 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20251104 header.b=OqkqFyH5; spf=pass (domain: gmail.com, ip: 209.85.219.42, mailfrom: twoerner@gmail.com) Received: by mail-qv1-f42.google.com with SMTP id 6a1803df08f44-90e8372bba7so6694346d6.0 for ; Sun, 30 Aug 2026 11:36:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1788114983; x=1788719783; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:from:to:cc:subject:date:message-id:reply-to:content-type; bh=fr/llnMj/qpH6crRKrp0FvfIC30Op5jU/FYiZnV19yo=; b=OqkqFyH51l0J21gT1HXvNlVNY6cIBumhBVuocsl11Iz2q0H/HDdDd5/vkOSXHQ9g+W Gak4X7WHvHLiWC/AcoLhPLJTg2f+5p2alAb099YI3Smp7YauVweMxrWZno47eXu+Ux3N Z144OlvESumJmjgQ+XDYmOEVxTwDR+i7eH8kwlBflwyQ/Rofr/S1L49iHy0bKYWaZ6tf QCgi+AYaRID74yZVrE0xcdYMtXmDLghUyd/Mte9sK87W1SgqCOEGgeNFTsCSubFFuNrZ TuR2wGfp6xajbMrXMJWB4rhwv2zvLZrahQAviCUxRy+Va/+hpR+u0QPDkHsi37w+qKAb 87Rw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1788114983; x=1788719783; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to:content-type; bh=fr/llnMj/qpH6crRKrp0FvfIC30Op5jU/FYiZnV19yo=; b=GzqTOFfIOCwkdHHhBoHw8GaKBtDpZLd7oaF1yMXsgAIVGDU+ITPVTi8O2lfm+K19wo T9i0OMzSiSVCNV9CByB1+mRUTJTDzYO/MuJMifrpBD2EVRtYrYxTMH3XkqTwmwtbGQMR 7sMx2wqJLJCdS4LYmxfgRA39pAO9XPXBECUR6cH4ZohgJ7wC37n2B4QRoCevYsT10fZ5 ME31JBrjWCi9EjLgbx+IAaAnWGqpHcztO9cUDIEGlXCKY5CtktiYm7dco9w/kOz99RmT 9d/nvIaLPsXcRAhrVVCP3F5Zj9PuLMzkoWQF37MH40hkgyR2sfu3PDHUZPybTUi+vkdv RtFA== X-Gm-Message-State: AFuF++naiKgHvn2VkLJtrzqRYiIdr7KfjThaZE3pQrhyBnXLA51Z3/g9 oAhL24HCb15xn9HtkBjpGx/+GHbj+FJ8qj9mFNWw6g0an9FXFOXSSrZ1KNMAAck7 X-Gm-Gg: AYBFou2MdS+3v4tSE86EvYa079+yYSGmuvxTANZuliQsLb864XaauyZzGk56nuvcUVk B+WoSGe9zAJ6kKi6+P2eYAjQGSfADorC/Muf9Q27A7m3tYrdyZM6cfPIjnlr+mLDQa5G+dZ5j0Z YcTXYXijvaMC1tWznED12+k2BaUQqBWph8Var0aYDZbCNsEyRgMrgH1x5thUAkJqbu1pqS+v9fR mnGNnBF5Do8FFkTi9AjxuZ/yIqvO1G77Ilb7DkHwQs256cizwtbkV+O2hgW71LmvNJu9Do6IcJ5 U2LuTeNvMqGEZy6Gq91LkCuflqZrL+CaadE5j3EuflkrOeTfy7Xzp9cxJF9Y134P0/W5x2DIm12 AUBxv0+6giDSfrDiMWHNPpRchKeBtGtrlALM8zkHdjO6Z8CIodbzJZinZcCIjcuWxYk41TK1ilM f7nKPC24M+6z2L6m1xBDoRxJSdD0B0A3VWK2IeNW8cm33/isevtGAjkTm2QhrfC9zL9zhOCasd9 4TKK/hgoava0+S/IvmNG2sAjC/Bkg== X-Received: by 2002:a05:6214:258d:b0:8f2:4100:8613 with SMTP id 6a1803df08f44-90ce0b52752mr258661886d6.0.1788114982543; Sun, 30 Aug 2026 11:36:22 -0700 (PDT) Received: from localhost.localdomain (pppoe-209-91-167-254.vianet.ca. [209.91.167.254]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-90ce444dae0sm67267116d6.4.2026.08.30.11.36.21 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 30 Aug 2026 11:36:21 -0700 (PDT) From: Trevor Woerner To: openembedded-core@lists.openembedded.org Subject: [PATCH 1/3] oeqa/sdk: run the SDK's own copy of a host tool Date: Sun, 30 Aug 2026 14:36:14 -0400 Message-ID: <20260830183616.4026354-1-twoerner@gmail.com> X-Mailer: git-send-email 2.51.0 MIME-Version: 1.0 List-Id: X-Webhook-Received: from 45-33-107-173.ip.linodeusercontent.com [45.33.107.173] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Sun, 30 Aug 2026 18:36:27 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/244690 ensure_host_package() decides whether a test can run by looking for a package name in the SDK's host manifest, which establishes neither that the package is present nor that the command the test runs is the SDK's own. On an extensible SDK the manifest lists what the shipped sstate could provide, so a case can pass the check and then run a command that is not there, or one belonging to the build host. Ask the SDK for the command instead. An eSDK ships sstate for more than it installs, so when the command is missing devtool installs the recipe and the lookup runs again. A command that resolves outside the SDK now fails rather than reporting a result about the build host. AI-Generated: codex/claude-opus 5 (xhigh) Signed-off-by: Trevor Woerner --- meta/lib/oeqa/sdk/case.py | 96 ++++++++++++++++++++++++++++----------- 1 file changed, 69 insertions(+), 27 deletions(-) diff --git a/meta/lib/oeqa/sdk/case.py b/meta/lib/oeqa/sdk/case.py index 03cfde88ff42..5f269161f4e1 100644 --- a/meta/lib/oeqa/sdk/case.py +++ b/meta/lib/oeqa/sdk/case.py @@ -18,38 +18,80 @@ class OESDKTestCase(OETestCase): (self.tc.sdk_env, cmd), shell=True, executable="/bin/bash", stderr=subprocess.STDOUT, universal_newlines=True) - def ensure_host_package(self, *packages, recipe=None): + def find_sdk_binary(self, binaries): """ - Check that the host variation of one of the packages listed is available - in the SDK (nativesdk-foo for SDK, foo-native for eSDK). The package is - a list for the case where debian-renaming may have occured, and the - manifest could contain 'foo' or 'libfoo'. + (name, outside) for the first of binaries that resolves. - If testing an eSDK and the package is not found, then try to install the - specified recipe to install it from sstate. + name is the command to run when it came from the SDK, and outside + lists what resolved beyond it otherwise. Callers run the name + returned: an eSDK stages native recipes, which need not name a + command the way their nativesdk counterparts do. perl-native keeps + its interpreter at bindir/perl-native/perl, reached as nativeperl. + """ + if isinstance(binaries, str): + binaries = (binaries,) + sdk_root = os.path.dirname(self.tc.sdk_env) + + outside = [] + for binary in binaries: + try: + path = self._run("command -v %s" % binary).strip() + except subprocess.CalledProcessError: + continue + if path.startswith(sdk_root + os.sep): + return binary, [] + outside.append("%s is %s" % (binary, path)) + return None, outside + + def ensure_sdk_binary(self, binaries, packages=()): """ + Return the first of binaries that resolves inside the SDK. - # In a SDK the manifest is correct. In an eSDK the manifest may be - # correct (type=full) or not include packages that exist in sstate but - # not installed yet (minimal) so we should try to install the recipe. - for package in packages: - if isinstance(self.tc, OESDKExtTestContext): - package = package + "-native" - else: - package = "nativesdk-" + package + Fail when one resolves outside it, because a result from the build + host describes the host and not the SDK. Skip when none resolves. + """ + if isinstance(binaries, str): + binaries = (binaries,) + if isinstance(packages, str): + packages = (packages,) + name, outside = self.find_sdk_binary(binaries) + if name: + return name + need = ", ".join(packages) or ", ".join(binaries) + if outside: + self.fail("Test %s needs one of %s from the SDK, but found %s" + % (self.id(), need, "; ".join(outside))) + raise unittest.SkipTest("Test %s needs one of %s: the SDK has no %s" + % (self.id(), need, " or ".join(binaries))) + + def ensure_host_package(self, *packages, recipe=None, binary=None): + """ + Return the command the test should run, having confirmed it comes + from the SDK rather than the build host. - if self.tc.hasHostPackage(package): - break - else: - if isinstance(self.tc, OESDKExtTestContext): - recipe = (recipe or packages[0]) + "-native" - print("Trying to install %s..." % recipe) - try: - self._run('devtool sdk-install %s' % recipe) - except subprocess.CalledProcessError: - raise unittest.SkipTest("Test %s needs one of %s" % (self.id(), ", ".join(packages))) - else: - raise unittest.SkipTest("Test %s needs one of %s" % (self.id(), ", ".join(packages))) + An eSDK ships sstate for more than it installs, so a tool can be + available without being present. When the command is missing, ask + devtool to install the recipe and look again. + + binary names the commands the packages provide, and is needed only + where a command is not named after its package: pkgconf provides + pkg-config, and an eSDK reaches perl as nativeperl. + """ + binaries = binary or packages + + name, _ = self.find_sdk_binary(binaries) + if name: + return name + + if isinstance(self.tc, OESDKExtTestContext): + install = (recipe or packages[0]) + "-native" + print("Trying to install %s..." % install) + try: + self._run('devtool sdk-install %s' % install) + except subprocess.CalledProcessError: + pass + + return self.ensure_sdk_binary(binaries, packages) def ensure_target_package(self, *packages, multilib=False, recipe=None): """ From patchwork Sun Aug 30 18:36:15 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Trevor Woerner X-Patchwork-Id: 96834 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 71BA6C61DE2 for ; Sun, 30 Aug 2026 18:36:27 +0000 (UTC) Received: from mail-qv1-f49.google.com (mail-qv1-f49.google.com [209.85.219.49]) by mx.groups.io with SMTP id smtpd.msgproc01-g2.13800.1788114985007435609 for ; Sun, 30 Aug 2026 11:36:25 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20251104 header.b=rQIZQ9/G; spf=pass (domain: gmail.com, ip: 209.85.219.49, mailfrom: twoerner@gmail.com) Received: by mail-qv1-f49.google.com with SMTP id 6a1803df08f44-90e8535619bso6584936d6.2 for ; Sun, 30 Aug 2026 11:36:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1788114984; x=1788719784; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to:content-type; bh=/xZ7cirSmTU2tH90xtl/WYdbCgj55YW3MKMz3+msdcM=; b=rQIZQ9/Gm26VJ3ESZlX231yjtwE2TxZ8ReLcP+hlMCh9gB/NoZzFPgKoCThZ4oBpgr ib76vB1N3MLA3T3tJ/IUVvgUhas74VySpNtoBNUBDLgd+ApUpR3XaH3A4A14m+YzS5PG CFpeFvy+WLHjY7IV/AZ2+wppW6yriJQdpHvF3Ik7zpw+NhqwbHK04sBBmUX4qfaXkD3u 6yUBtklbzC8UZMlN9N4V7azdYWa7YzP1HupRki2/b0VqWWUQFnimve6NQql7C1hPNpHH GEkTv8rm65ypxqZSEMp3dPCELJ6bCKao2+7ljigd4WgapT0hQU4to0m6kpCTIYLizWcx xRvQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1788114984; x=1788719784; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to:content-type; bh=/xZ7cirSmTU2tH90xtl/WYdbCgj55YW3MKMz3+msdcM=; b=iC5AefNWrPZrO0HtVhzQjyKauTZGzkHljbgGteNBR2usWTSp/tJCBKj+PNY0gtAFE/ zpL7rvnJ3GmIEYkdpEl4e8Ae8bW7WsKc49OTCR/N/UDmEChsUFxTQSYvftzFe+BwRmss J8xfD/PQ5/5dgjx0Ab9EvtWD+UZVItse9iA+CNiN0cOX3Jhb8v0pVOGQrablLOp41lpF pQzV4FVHU8LR/5nJHrTlnrQijDmLmiBzq45VWyrVSCHhEuir/oNuS1SZLfOm5dib1ds1 umsqugqet1ukiNiIZuopSC4bEqPs+C/EWrn5L064kQESLbzQ5GRkOh6X4FtMRBtqM0az qguA== X-Gm-Message-State: AFuF++lBhz9Hc5afkgCG/+26fcMiqDR7H2OhtByuxbPtdRRGFshH4hFF Zt31gFjS6Eft1mT6HRtuwrTVkxBKTpZcX416rYSd9B1GWfzW1k2hdccrDvRKzw5t X-Gm-Gg: AYBFou025oniEQrdWTq0jAO5oO5PLvh3nvnzZ1f7Ok60aXQ1DbhKtZWcOny360hITfc /KdjNVjJQtNQz/xrOBLve/1CZUNIoPTFHjj/VjtYwQOOOjxrP6SeU+Hsq/6NxMl6VCl2ekK9v69 aWxcGZONDdAzycA854TLix8fJcyA4kmjdLynR7U8gb9DjLHq2dnf7MPEHfSUZUMpmBgT1IWcg/C 7Vz54JmutN3gavNqQjOdMcGif+/vWPTFgAPm4DtvqEeAOvWSqA/G+djS9dC1fweMU9z/Q57KEn2 UNgw/Wzlabqf3ycms2wepZtR8u8YMSaWoDDXLU0Vr+3SrO0r2a0tgWZfgo1YAbuLCdXbtQSzF+8 Di8jbjT219xDHyg1GBKL+AffSRDOQp86t5zxasJGHdiK77GlCK0lAARbZsfFYXcaIIY/Ak80VXj mA6KNyy6JzGgeU5GI9rVxHxAZ82o3cKqpxcyFeOedfD/2GPFOtPNikdhJ9yLXaImCipsyVXmony c5XwUkVeAcROPLiqUDNpekkewPwPQ== X-Received: by 2002:a05:6214:4f02:b0:90d:255:df33 with SMTP id 6a1803df08f44-90d0255e06cmr183436736d6.30.1788114983853; Sun, 30 Aug 2026 11:36:23 -0700 (PDT) Received: from localhost.localdomain (pppoe-209-91-167-254.vianet.ca. [209.91.167.254]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-90ce444dae0sm67267116d6.4.2026.08.30.11.36.22 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 30 Aug 2026 11:36:23 -0700 (PDT) From: Trevor Woerner To: openembedded-core@lists.openembedded.org Subject: [PATCH 2/3] oeqa/sdk: name the commands the host tool cases need Date: Sun, 30 Aug 2026 14:36:15 -0400 Message-ID: <20260830183616.4026354-2-twoerner@gmail.com> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20260830183616.4026354-1-twoerner@gmail.com> References: <20260830183616.4026354-1-twoerner@gmail.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from 45-33-107-173.ip.linodeusercontent.com [45.33.107.173] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Sun, 30 Aug 2026 18:36:27 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/244691 These cases identify a tool only by the package carrying it, so they run whatever the build host provides. gtk3 shows this is not confined to eSDKs: its glib-2.0-utils check passes on a standard SDK while glib-compile-resources and glib-mkenums both resolve to /usr/bin. perl needs two names because the recipe installs it twice: nativesdk-perl creates ${bindir}/perl, and perl-native creates ${bindir}/perl-native/perl, kept off PATH so recipes running "env perl" do not find it. AI-Generated: codex/claude-opus 5 (xhigh) Signed-off-by: Trevor Woerner --- meta/lib/oeqa/sdk/cases/gtk3.py | 3 ++- meta/lib/oeqa/sdk/cases/maturin.py | 8 +++++--- meta/lib/oeqa/sdk/cases/meson.py | 2 +- meta/lib/oeqa/sdk/cases/perl.py | 4 ++-- meta/lib/oeqa/sdk/cases/python.py | 2 +- meta/lib/oeqa/sdk/cases/rust.py | 2 ++ 6 files changed, 13 insertions(+), 8 deletions(-) diff --git a/meta/lib/oeqa/sdk/cases/gtk3.py b/meta/lib/oeqa/sdk/cases/gtk3.py index cdaf50ed3842..336df6491c77 100644 --- a/meta/lib/oeqa/sdk/cases/gtk3.py +++ b/meta/lib/oeqa/sdk/cases/gtk3.py @@ -18,7 +18,8 @@ class GTK3Test(MesonTestBase): def setUp(self): super().setUp() self.ensure_target_package("gtk+3", "libgtk-3.0", recipe="gtk+3") - self.ensure_host_package("glib-2.0-utils", "libglib-2.0-utils", recipe="glib-2.0") + self.ensure_host_package("glib-2.0-utils", "libglib-2.0-utils", + recipe="glib-2.0", binary="glib-compile-resources") """ Test that autotools and GTK+ 3 compiles correctly. diff --git a/meta/lib/oeqa/sdk/cases/maturin.py b/meta/lib/oeqa/sdk/cases/maturin.py index e3e8edc7819c..1476e6f19a38 100644 --- a/meta/lib/oeqa/sdk/cases/maturin.py +++ b/meta/lib/oeqa/sdk/cases/maturin.py @@ -16,10 +16,12 @@ errors_have_output() class MaturinTest(OESDKTestCase): def setUp(self): - self.ensure_host_package("python3-maturin") + self.ensure_host_package("python3-maturin", binary="maturin") + self.python3 = self.ensure_host_package("python3-core", recipe="python3", + binary="python3") def test_maturin_list_python(self): - out = self._run(r"""python3 -c 'import sys; print(f"{sys.executable}\n{sys.version_info.major}.{sys.version_info.minor}")'""") + out = self._run(r"""%s -c 'import sys; print(f"{sys.executable}\n{sys.version_info.major}.{sys.version_info.minor}")'""" % self.python3) executable, version = out.splitlines() output = self._run("maturin list-python") @@ -32,7 +34,7 @@ class MaturinTest(OESDKTestCase): class MaturinDevelopTest(OESDKTestCase): def setUp(self): machine = self.td.get("MACHINE") - self.ensure_host_package("python3-maturin") + self.ensure_host_package("python3-maturin", binary="maturin") if not ( self.tc.hasHostPackage("packagegroup-rust-cross-canadian-%s" % machine) diff --git a/meta/lib/oeqa/sdk/cases/meson.py b/meta/lib/oeqa/sdk/cases/meson.py index 7540d8ba5539..04ab22c73cf1 100644 --- a/meta/lib/oeqa/sdk/cases/meson.py +++ b/meta/lib/oeqa/sdk/cases/meson.py @@ -25,7 +25,7 @@ class MesonTestBase(OESDKTestCase): self.skipTest(f"{self.id()} does not support eSDK (https://bugzilla.yoctoproject.org/show_bug.cgi?id=15854)") self.ensure_host_package("meson") - self.ensure_host_package("pkgconf") + self.ensure_host_package("pkgconf", binary="pkg-config") def build_meson(self, sourcedir, builddir, installdir=None, options=""): """ diff --git a/meta/lib/oeqa/sdk/cases/perl.py b/meta/lib/oeqa/sdk/cases/perl.py index a72bd2461a6b..330d472f2013 100644 --- a/meta/lib/oeqa/sdk/cases/perl.py +++ b/meta/lib/oeqa/sdk/cases/perl.py @@ -11,9 +11,9 @@ errors_have_output() class PerlTest(OESDKTestCase): def setUp(self): - self.ensure_host_package("perl") + self.perl = self.ensure_host_package("perl", binary=("perl", "nativeperl")) def test_perl(self): - cmd = "perl -e '$_=\"Uryyb, jbeyq\"; tr/a-zA-Z/n-za-mN-ZA-M/;print'" + cmd = "%s -e '$_=\"Uryyb, jbeyq\"; tr/a-zA-Z/n-za-mN-ZA-M/;print'" % self.perl output = self._run(cmd) self.assertEqual(output, "Hello, world") diff --git a/meta/lib/oeqa/sdk/cases/python.py b/meta/lib/oeqa/sdk/cases/python.py index b990cd889ad9..cbc7fb69b2d1 100644 --- a/meta/lib/oeqa/sdk/cases/python.py +++ b/meta/lib/oeqa/sdk/cases/python.py @@ -11,7 +11,7 @@ errors_have_output() class Python3Test(OESDKTestCase): def setUp(self): - self.ensure_host_package("python3-core", recipe="python3") + self.ensure_host_package("python3-core", recipe="python3", binary="python3") def test_python3(self): cmd = "python3 -c \"import codecs; print(codecs.encode('Uryyb, jbeyq', 'rot13'))\"" diff --git a/meta/lib/oeqa/sdk/cases/rust.py b/meta/lib/oeqa/sdk/cases/rust.py index 4b115bebf521..20e05089af1b 100644 --- a/meta/lib/oeqa/sdk/cases/rust.py +++ b/meta/lib/oeqa/sdk/cases/rust.py @@ -29,6 +29,7 @@ class RustCompileTest(OESDKTestCase): machine = self.td.get("MACHINE") if not self.tc.hasHostPackage("packagegroup-rust-cross-canadian-%s" % machine): raise unittest.SkipTest("RustCompileTest class: SDK doesn't contain a Rust cross-canadian toolchain") + self.ensure_sdk_binary("cargo") def test_cargo_build(self): self._run('cd %s/hello; cargo add zstd' % (self.tc.sdk_dir)) @@ -50,6 +51,7 @@ class RustHostCompileTest(OESDKTestCase): machine = self.td.get("MACHINE") if not self.tc.hasHostPackage("packagegroup-rust-cross-canadian-%s" % machine): raise unittest.SkipTest("RustCompileTest class: SDK doesn't contain a Rust cross-canadian toolchain") + self.ensure_sdk_binary("cargo") def test_cargo_build(self): sdksys = self.td.get("SDK_SYS") From patchwork Sun Aug 30 18:36:16 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Trevor Woerner X-Patchwork-Id: 96833 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 63866C61DB9 for ; Sun, 30 Aug 2026 18:36:27 +0000 (UTC) Received: from mail-qv1-f53.google.com (mail-qv1-f53.google.com [209.85.219.53]) by mx.groups.io with SMTP id smtpd.msgproc01-g2.13802.1788114986706550132 for ; Sun, 30 Aug 2026 11:36:26 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20251104 header.b=PYWzFTJB; spf=pass (domain: gmail.com, ip: 209.85.219.53, mailfrom: twoerner@gmail.com) Received: by mail-qv1-f53.google.com with SMTP id 6a1803df08f44-902e4af2d9dso34729026d6.0 for ; Sun, 30 Aug 2026 11:36:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1788114986; x=1788719786; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to:content-type; bh=SU/9msWST4oSeQiy7ZRtuQD+MrG4v1oqoD8qrB3mmEE=; b=PYWzFTJB7Uj3SJV8TzTYCsoDYCaxej6ZSb9HbRSrCjaBtewpFOjLVHaC5DnSCXWvVG YlNQiEwgpbD1Zz96tM5RfCFLShiAzF+BEXvmsXySV7/Y1FLhxG/pv9T4N4rDUz6E9RVZ AKqKPro+9S36yYCMqf9EnMz5bIOdnZC2TIO8KFA4B6Suc12t60QR3Gnd+55B+hsvwmFo Wi3fBRSce4Nm4GHaCgvCYoa5rXrYw6LwsJF42E2BGGvKU9NssBOg20hGBm8nrm5vOBir uQGMu5XwRhjRX2Ozer8I9LSbnDe01nt1HxDRrd+4vsOOxM2SmhY6u9U+9jLJv+Zt0qZF KjZw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1788114986; x=1788719786; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to:content-type; bh=SU/9msWST4oSeQiy7ZRtuQD+MrG4v1oqoD8qrB3mmEE=; b=Ve9h+hGE/BfaXvmshL4KTgR6YS6Gg5B479v6X9AjKYTS6BrgXrZq0Umb34TPhh3y49 oKogagjs6IWmeymKNBamvi3b0aG12ouxXDogf7O395J20Kh5pbFDy1oXfuqBHYK/D54j uaTiiY8I6UEcSrwYOEsUdpy4R8vaXrxRlgyqNvvX0RNtLkhVq/2ylKM5eVmVBKTxRUri 99Uyi+sWmUPJJUavwbvgWqDdUtdnsfyadn7j/wDw0XcJOAxyKun+vQGK8eygEV4hEmWi tpl9ICy8VbccE0EiZ+5GuIXDOP86XT2wJQB0TSFtuOM+SpIrpUw2sF55WhmjsGYTLZSF LsOw== X-Gm-Message-State: AFuF++n9wHXyN3YJOzMOPFWCmlN+sKFvI2tUxPP/FD9I2ArWNgv/qpe4 LrpYZK8AMnnj3CAlvQKN92AxiJYJ7VFaBlNVuYA836uKfBFfIqQDBzWdbwJNIOvJ X-Gm-Gg: AYBFou2xvutOMXCYP71Mz0kvV0VlsZ6i1gdu0d7+86s/L9u7pqeS3yxo3V1UQrAAOyo tw3fvp4oHgH2z+8cNA8eNHK9Xj+vZmwhmMwGS1DG90kvFKEWSHS1SmvPHPkx5nWwLBam5BNPW0j QVIpl0FMW+tN1HCCvXys+rYykTKks+6BdYMl+PZvxfL/nLVRZeqKoE48NbbdS4zgrukFqnfgaUn HbiLZBeW2e6cHk7QNqMShTGmqQBkUqBN0S4hmaTqZfe3fBbN9Zgvn8U5N2wN0uRAeLInuD0UJ1v DiYTGFAwF/BKPph9cxxKgg1Q2zI2y5pZuLvzo62YfeCShA5dxQfp1w3GfD252EVKCSZk3Q242q6 MYQ/fRFp9wvNF5T6RaVCljrzPUJVU3bVZHB7UyJUCuBeVT+BBXvw3IligEWt6knNOFz+8oojAhe sJYyhCTrznoxGXatPLDOv2Px/+d5VYAQ0fWs/E+3OBqidRWmb5cuF1HH0CyVww75+NmsDmlkgSP cGHcQ1ljGrlFBqxoH2UPs+etubzWo4= X-Received: by 2002:a05:6214:20e3:b0:90c:df17:14c8 with SMTP id 6a1803df08f44-90e871c2cfemr44507186d6.17.1788114985557; Sun, 30 Aug 2026 11:36:25 -0700 (PDT) Received: from localhost.localdomain (pppoe-209-91-167-254.vianet.ca. [209.91.167.254]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-90ce444dae0sm67267116d6.4.2026.08.30.11.36.24 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 30 Aug 2026 11:36:24 -0700 (PDT) From: Trevor Woerner To: openembedded-core@lists.openembedded.org Subject: [PATCH 3/3] oeqa/sdk: run the Go driver the SDK installs Date: Sun, 30 Aug 2026 14:36:16 -0400 Message-ID: <20260830183616.4026354-3-twoerner@gmail.com> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20260830183616.4026354-1-twoerner@gmail.com> References: <20260830183616.4026354-1-twoerner@gmail.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from 45-33-107-173.ip.linodeusercontent.com [45.33.107.173] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Sun, 30 Aug 2026 18:36:27 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/244692 The Go cases confirm go-cross-canadian is in the SDK and then guard on "which go", which cannot succeed: the recipe installs ${TARGET_PREFIX}go and leaves the unprefixed binary in its own libdir, off PATH. So the cases skip on an SDK that does contain Go. Ask for either name and run what the SDK provides. Running them for the first time shows the module cases also need -buildvcs=false, as they build inside a git tree and Go fails stamping VCS information into the binary. AI-Generated: codex/claude-opus 5 (xhigh) Signed-off-by: Trevor Woerner --- meta/lib/oeqa/sdk/cases/go.py | 24 ++++++++---------------- 1 file changed, 8 insertions(+), 16 deletions(-) diff --git a/meta/lib/oeqa/sdk/cases/go.py b/meta/lib/oeqa/sdk/cases/go.py index 693be89e1df7..dfbbc4723cbe 100644 --- a/meta/lib/oeqa/sdk/cases/go.py +++ b/meta/lib/oeqa/sdk/cases/go.py @@ -30,21 +30,17 @@ class GoCompileTest(OESDKTestCase): if not self.tc.hasHostPackage("go-cross-canadian-%s" % translated_target_arch): raise unittest.SkipTest("GoCompileTest class: SDK doesn't contain a Go cross-canadian toolchain") - # Additional runtime check for go command availability - try: - self._run('which go') - except Exception as e: - raise unittest.SkipTest("GoCompileTest class: go command not available: %s" % str(e)) + self.go = self.ensure_sdk_binary(("go", "${TARGET_PREFIX}go")) def test_go_build(self): """Test Go build command (native compilation)""" - self._run('cd %s; go build -o test test.go' % self.tc.sdk_dir) + self._run('cd %s; %s build -o test test.go' % (self.tc.sdk_dir, self.go)) def test_go_module(self): """Test Go module creation and building""" # Create a simple Go module - self._run('cd %s; go mod init hello-go' % self.tc.sdk_dir) - self._run('cd %s; go build -o hello-go' % self.tc.sdk_dir) + self._run('cd %s; %s mod init hello-go' % (self.tc.sdk_dir, self.go)) + self._run('cd %s; %s build -buildvcs=false -o hello-go' % (self.tc.sdk_dir, self.go)) @classmethod def tearDownClass(self): @@ -68,11 +64,7 @@ class GoHostCompileTest(OESDKTestCase): if not self.tc.hasHostPackage("go-cross-canadian-%s" % translated_target_arch): raise unittest.SkipTest("GoHostCompileTest class: SDK doesn't contain a Go cross-canadian toolchain") - # Additional runtime check for go command availability - try: - self._run('which go') - except Exception as e: - raise unittest.SkipTest("GoHostCompileTest class: go command not available: %s" % str(e)) + self.go = self.ensure_sdk_binary(("go", "${TARGET_PREFIX}go")) def _get_go_arch(self): """Get Go architecture from SDK_SYS""" @@ -85,13 +77,13 @@ class GoHostCompileTest(OESDKTestCase): def test_go_cross_compile(self): """Test Go cross-compilation for target""" goarch = self._get_go_arch() - self._run('cd %s; GOOS=linux GOARCH=%s go build -o test-%s test.go' % (self.tc.sdk_dir, goarch, goarch)) + self._run('cd %s; GOOS=linux GOARCH=%s %s build -o test-%s test.go' % (self.tc.sdk_dir, goarch, self.go, goarch)) def test_go_module_cross_compile(self): """Test Go module cross-compilation""" goarch = self._get_go_arch() - self._run('cd %s; go mod init hello-go' % self.tc.sdk_dir) - self._run('cd %s; GOOS=linux GOARCH=%s go build -o hello-go-%s' % (self.tc.sdk_dir, goarch, goarch)) + self._run('cd %s; %s mod init hello-go' % (self.tc.sdk_dir, self.go)) + self._run('cd %s; GOOS=linux GOARCH=%s %s build -buildvcs=false -o hello-go-%s' % (self.tc.sdk_dir, goarch, self.go, goarch)) @classmethod def tearDownClass(self):