diff mbox series

[2/3] oeqa/selftest/pkgdata: add multilib LICENSE consistency test

Message ID 20260429143104.684760-3-jaeyoon.jung@lge.com
State Changes Requested
Headers show
Series Fix multilib package variable propagation | expand

Commit Message

From: Jaeyoon Jung <jaeyoon.jung@lge.com>

Add a selftest to verify that pkgdata variables such as LICENSE
are identical between base and multilib variants (e.g. lib32).

Signed-off-by: Jaeyoon Jung <jaeyoon.jung@lge.com>
---
 meta/lib/oeqa/selftest/cases/pkgdata.py | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

Comments

Mathieu Dubois-Briand April 30, 2026, 11 a.m. UTC | #1
On Wed Apr 29, 2026 at 4:31 PM CEST, Jaeyoon Jung (LGE) via lists.openembedded.org wrote:
> From: Jaeyoon Jung <jaeyoon.jung@lge.com>
>
> Add a selftest to verify that pkgdata variables such as LICENSE
> are identical between base and multilib variants (e.g. lib32).
>
> Signed-off-by: Jaeyoon Jung <jaeyoon.jung@lge.com>
> ---

Hi Jaeyoon,

Thanks for your patch.

It looks like the new test is failing on the autobuilder:

2026-04-30 08:14:06,391 - oe-selftest - INFO - pkgdata.OePkgdataUtilTests.test_multilib_variables (subunit.RemotedTestCase)
2026-04-30 08:14:06,391 - oe-selftest - INFO -  ... FAIL
...
2026-04-30 08:13:46,986 - oe-selftest - INFO - Build with multilib lib32 enabled
2026-04-30 08:14:06,391 - oe-selftest - INFO - 13: 19/53 356/686 (19.41s) (2 failed) (pkgdata.OePkgdataUtilTests.test_multilib_variables)
2026-04-30 08:14:06,391 - oe-selftest - INFO - testtools.testresult.real._StringException: Traceback (most recent call last):
  File "/srv/pokybuild/yocto-worker/oe-selftest-fedora/build/layers/openembedded-core/meta/lib/oeqa/selftest/cases/pkgdata.py", line 237, in test_multilib_variables
    bitbake('systemd lib32-systemd')
    ~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/srv/pokybuild/yocto-worker/oe-selftest-fedora/build/layers/openembedded-core/meta/lib/oeqa/utils/commands.py", line 236, in bitbake
    return runCmd(cmd, ignore_status, timeout, output_log=output_log, **options)
  File "/srv/pokybuild/yocto-worker/oe-selftest-fedora/build/layers/openembedded-core/meta/lib/oeqa/utils/commands.py", line 214, in runCmd
    raise AssertionError("Command '%s' returned non-zero exit status %d:\n%s" % (command, result.status, exc_output))
AssertionError: Command 'bitbake  systemd lib32-systemd' returned non-zero exit status 1:
NOTE: Reconnecting to bitbake server...
Loading cache...done.
Loaded 0 entries from dependency cache.
Parsing recipes...done.
Parsing of 1031 .bb files complete (0 cached, 1031 parsed). 3100 targets, 145 skipped, 0 masked, 0 errors.
Removing 18 recipes from the allarch sysroot...done.
Removing 18 recipes from the qemux86_64 sysroot...done.
ERROR: Nothing PROVIDES 'systemd'
systemd was skipped: using DISTRO 'poky', which is missing required DISTRO_FEATURES: 'systemd usrmerge'
systemd was skipped: using DISTRO 'poky', which is missing required DISTRO_FEATURES: 'systemd usrmerge'

https://autobuilder.yoctoproject.org/valkyrie/#/builders/48/builds/3649
https://autobuilder.yoctoproject.org/valkyrie/#/builders/35/builds/3770
https://autobuilder.yoctoproject.org/valkyrie/#/builders/23/builds/3880

Can you have a look at the issue?

Thanks,
Mathieu
diff mbox series

Patch

diff --git a/meta/lib/oeqa/selftest/cases/pkgdata.py b/meta/lib/oeqa/selftest/cases/pkgdata.py
index d786c33018..d3d38e7419 100644
--- a/meta/lib/oeqa/selftest/cases/pkgdata.py
+++ b/meta/lib/oeqa/selftest/cases/pkgdata.py
@@ -225,3 +225,18 @@  class OePkgdataUtilTests(OESelftestTestCase):
         self.assertEqual(result.status, 2, "Status different than 2. output: %s" % result.output)
         currpos = result.output.find('usage: oe-pkgdata-util')
         self.assertTrue(currpos != -1, msg = "Test is Failed. Help is not Displayed in %s" % result.output)
+
+    def test_multilib_variables(self):
+        self.write_config("""
+MACHINE = "qemux86-64"
+require conf/multilib.conf
+MULTILIBS = "multilib:lib32"
+DEFAULTTUNE:virtclass-multilib-lib32 = "x86"
+""")
+        self.logger.info("Build with multilib lib32 enabled")
+        bitbake('systemd lib32-systemd')
+        pkg = runCmd('oe-pkgdata-util lookup-pkg libsystemd').output
+        pkg_lib32 = runCmd('oe-pkgdata-util lookup-pkg lib32-libsystemd').output
+        license = runCmd('oe-pkgdata-util read-value LICENSE %s' % pkg).output
+        license_lib32 = runCmd('oe-pkgdata-util read-value LICENSE %s' % pkg_lib32).output
+        self.assertEqual(license, license_lib32)