* [PATCH 1/2] populate_sdk_base: fix typo in error message
@ 2026-12-02 22:48 Ross Burton
2026-12-02 22:48 ` [PATCH 2/2] oeqa/selftest/sdk: add install tests for all SDK_ARCHIVE_TYPE variants Ross Burton
0 siblings, 1 reply; 4+ messages in thread
From: Ross Burton @ 2026-12-02 22:48 UTC (permalink / raw)
To: openembedded-core
When listing the valid SDK_ARCHIVE_TYPEs, the value should be "7zip" not
"7z".
Signed-off-by: Ross Burton <ross.burton@arm.com>
---
meta/classes-recipe/populate_sdk_base.bbclass | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/meta/classes-recipe/populate_sdk_base.bbclass b/meta/classes-recipe/populate_sdk_base.bbclass
index 35d2f203399..f29e12c27c1 100644
--- a/meta/classes-recipe/populate_sdk_base.bbclass
+++ b/meta/classes-recipe/populate_sdk_base.bbclass
@@ -115,7 +115,7 @@ python () {
d.setVar('SDK_ARCHIVE_CMD',
'cd ${SDK_OUTPUT}/${SDKPATH}; tar ${SDKTAROPTS} -cf - . | xz ${SDK_XZ_OPTIONS} > ${SDKDEPLOYDIR}/${TOOLCHAIN_OUTPUTNAME}.${SDK_ARCHIVE_TYPE}')
else:
- bb.fatal("Invalid SDK_ARCHIVE_TYPE: %s, the supported SDK archive types are: zip, 7z, tar.xz, tar.zst" % d.getVar('SDK_ARCHIVE_TYPE'))
+ bb.fatal("Invalid SDK_ARCHIVE_TYPE: %s, the supported SDK archive types are: zip, 7zip, tar.xz, tar.zst" % d.getVar('SDK_ARCHIVE_TYPE'))
}
SDK_RDEPENDS = "${TOOLCHAIN_TARGET_TASK} ${TOOLCHAIN_HOST_TASK}"
--
2.43.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 2/2] oeqa/selftest/sdk: add install tests for all SDK_ARCHIVE_TYPE variants
2026-12-02 22:48 [PATCH 1/2] populate_sdk_base: fix typo in error message Ross Burton
@ 2026-12-02 22:48 ` Ross Burton
2026-12-03 18:39 ` [OE-core] " Mathieu Dubois-Briand
0 siblings, 1 reply; 4+ messages in thread
From: Ross Burton @ 2026-12-02 22:48 UTC (permalink / raw)
To: openembedded-core
Add tests to verify that the SDK installs correctly with each of the
archive types. The test is minimal: success is defined as the SDK
installing and an environment script being present.
The 7zip type has to be conditional on meta-oe being present, as 7zip is
in that layer.
Also check that the required host tools are present, so hosts with a
minimal set of tools don't fail.
Signed-off-by: Ross Burton <ross.burton@arm.com>
---
meta/lib/oeqa/selftest/cases/sdk.py | 43 ++++++++++++++++++++++++++++-
1 file changed, 42 insertions(+), 1 deletion(-)
diff --git a/meta/lib/oeqa/selftest/cases/sdk.py b/meta/lib/oeqa/selftest/cases/sdk.py
index ee1e4ca4200..cb31d8ec365 100644
--- a/meta/lib/oeqa/selftest/cases/sdk.py
+++ b/meta/lib/oeqa/selftest/cases/sdk.py
@@ -13,7 +13,7 @@ import select
from tempfile import TemporaryDirectory
from oeqa.selftest.case import OESelftestTestCase
-from oeqa.utils.commands import bitbake, get_bb_vars
+from oeqa.utils.commands import bitbake, get_bb_var, get_bb_vars
class SDKTests(OESelftestTestCase):
@@ -123,3 +123,44 @@ IMAGE_INSTALL:append = " selftest-hello"
self.logger.debug(f"runqemu works in SDK: {runqemu_works}\n{output}")
self.assertTrue(runqemu_works, f"runqemu does not work in SDK\n{output}")
+
+class SDKInstallTests(OESelftestTestCase):
+
+ def do_install_with_compression(self, compression):
+ image = "core-image-minimal"
+
+ self.write_config(f"""
+SDK_ARCHIVE_TYPE = "{compression}"
+""")
+ bitbake(f"{image} -c populate_sdk")
+
+ with TemporaryDirectory() as tmpdir:
+ vars = get_bb_vars(["SDK_DEPLOY", "TOOLCHAIN_OUTPUTNAME"], image)
+ sdk_installer = os.path.join(vars["SDK_DEPLOY"], vars["TOOLCHAIN_OUTPUTNAME"] + ".sh")
+ # Install the SDK
+ subprocess.check_call([sdk_installer, "-y", "-d", tmpdir])
+ # Verify that at least environment scripts were created
+ environment_scripts = glob.glob(os.path.join(tmpdir, "environment-setup-*"))
+ self.assertTrue(environment_scripts)
+
+ def test_sdk_install_7z(self):
+ if "openembedded-layer" not in get_bb_var('BBFILE_COLLECTIONS').split():
+ self.skipTest("Test needs meta-oe for 7zip")
+ if not shutil.which("7z"):
+ self.skipTest("Test needs 7z on the host")
+ self.do_install_with_compression("7z")
+
+ def test_sdk_install_tar_xz(self):
+ if not shutil.which("xz"):
+ self.skipTest("Test needs xz on the host")
+ self.do_install_with_compression("tar.xz")
+
+ def test_sdk_install_tar_zst(self):
+ if not shutil.which("zstd"):
+ self.skipTest("Test needs zstd on the host")
+ self.do_install_with_compression("tar.zst")
+
+ def test_sdk_install_zip(self):
+ if not shutil.which("unzip"):
+ self.skipTest("Test needs unzip on the host")
+ self.do_install_with_compression("zip")
--
2.43.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [OE-core] [PATCH 2/2] oeqa/selftest/sdk: add install tests for all SDK_ARCHIVE_TYPE variants
2026-12-02 22:48 ` [PATCH 2/2] oeqa/selftest/sdk: add install tests for all SDK_ARCHIVE_TYPE variants Ross Burton
@ 2026-12-03 18:39 ` Mathieu Dubois-Briand
2026-12-04 13:11 ` Ross Burton
0 siblings, 1 reply; 4+ messages in thread
From: Mathieu Dubois-Briand @ 2026-12-03 18:39 UTC (permalink / raw)
To: ross.burton, openembedded-core
On Wed Dec 2, 2026 at 11:48 PM CET, Ross Burton via openembedded-core wrote:
> Add tests to verify that the SDK installs correctly with each of the
> archive types. The test is minimal: success is defined as the SDK
> installing and an environment script being present.
>
> The 7zip type has to be conditional on meta-oe being present, as 7zip is
> in that layer.
>
> Also check that the required host tools are present, so hosts with a
> minimal set of tools don't fail.
>
> Signed-off-by: Ross Burton <ross.burton@arm.com>
> ---
Hi Ross,
Thanks for your patch.
> meta/lib/oeqa/selftest/cases/sdk.py | 43 ++++++++++++++++++++++++++++-
> 1 file changed, 42 insertions(+), 1 deletion(-)
>
> diff --git a/meta/lib/oeqa/selftest/cases/sdk.py b/meta/lib/oeqa/selftest/cases/sdk.py
> index ee1e4ca4200..cb31d8ec365 100644
> --- a/meta/lib/oeqa/selftest/cases/sdk.py
> +++ b/meta/lib/oeqa/selftest/cases/sdk.py
> @@ -13,7 +13,7 @@ import select
...
> +
> + def test_sdk_install_7z(self):
> + if "openembedded-layer" not in get_bb_var('BBFILE_COLLECTIONS').split():
I'm sorry, BBFILE_COLLECTIONS just got removed :)
This leads to:
2026-12-03 15:07:05,671 - oe-selftest - INFO - sdk.SDKInstallTests.test_sdk_install_7z (subunit.RemotedTestCase)
2026-12-03 15:07:05,672 - oe-selftest - INFO - ... ERROR
Stderr:
NOTE: Reconnecting to bitbake server...
2026-12-03 15:07:05,672 - oe-selftest - INFO - 2: 25/32 223/848 (0.77s) (1 failed) (sdk.SDKInstallTests.test_sdk_install_7z)
2026-12-03 15:07:05,673 - oe-selftest - INFO - testtools.testresult.real._StringException: Traceback (most recent call last):
File "/srv/pokybuild/yocto-worker/oe-selftest-debian/build/layers/openembedded-core/meta/lib/oeqa/selftest/cases/sdk.py", line 147, in test_sdk_install_7z
if "openembedded-layer" not in get_bb_var('BBFILE_COLLECTIONS').split():
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'split'
https://autobuilder.yoctoproject.org/valkyrie/#/builders/35/builds/5402
Thanks,
Mathieu
--
Mathieu Dubois-Briand, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [OE-core] [PATCH 2/2] oeqa/selftest/sdk: add install tests for all SDK_ARCHIVE_TYPE variants
2026-12-03 18:39 ` [OE-core] " Mathieu Dubois-Briand
@ 2026-12-04 13:11 ` Ross Burton
0 siblings, 0 replies; 4+ messages in thread
From: Ross Burton @ 2026-12-04 13:11 UTC (permalink / raw)
To: Mathieu Dubois-Briand; +Cc: openembedded-core@lists.openembedded.org
On 3 Dec 2026, at 18:39, Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> wrote:
>> + def test_sdk_install_7z(self):
>> + if "openembedded-layer" not in get_bb_var('BBFILE_COLLECTIONS').split():
>
> I'm sorry, BBFILE_COLLECTIONS just got removed :)
<shakes fist at RP>
Sorry to break your build, I should have remembered that was in there.
Ross
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2026-12-04 13:12 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-12-02 22:48 [PATCH 1/2] populate_sdk_base: fix typo in error message Ross Burton
2026-12-02 22:48 ` [PATCH 2/2] oeqa/selftest/sdk: add install tests for all SDK_ARCHIVE_TYPE variants Ross Burton
2026-12-03 18:39 ` [OE-core] " Mathieu Dubois-Briand
2026-12-04 13:11 ` Ross Burton
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.