diff mbox series

[meta-multimedia,2/2] wireplumber: only build the dbus tests when dbus-daemon is available

Message ID 20260923042910.1549997-2-khem.raj@oss.qualcomm.com
State New
Headers show
Series [meta-oe,1/2] floret: Do not use AUTOREV | expand

Commit Message

Khem Raj Sept. 23, 2026, 4:29 a.m. UTC
test-dbus-connection and test-reserve-device spawn a private bus through
GLib's GTestDBus, which executes dbus-daemon. When VIRTUAL-RUNTIME_dbus
is dbus-broker, dbus-daemon is not installable (dbus-broker RCONFLICTS
dbus) and both tests abort with:

  GLib-GIO-FATAL-ERROR: Error spawning dbus-daemon: Failed to spawn
  child process "dbus-daemon" (No such file or directory)

Enable the dbus-tests meson option only when dbus provides the message
bus, and make the ptest package depend on dbus in that case instead of
relying on it being pulled in indirectly.

AI-Generated: Uses Claude Code
Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
---
 .../recipes-multimedia/wireplumber/wireplumber_0.5.17.bb | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/meta-multimedia/recipes-multimedia/wireplumber/wireplumber_0.5.17.bb b/meta-multimedia/recipes-multimedia/wireplumber/wireplumber_0.5.17.bb
index 3dd58a70c4..bfe8137b0a 100644
--- a/meta-multimedia/recipes-multimedia/wireplumber/wireplumber_0.5.17.bb
+++ b/meta-multimedia/recipes-multimedia/wireplumber/wireplumber_0.5.17.bb
@@ -48,6 +48,11 @@  PACKAGECONFIG[systemd-user-service] = "-Dsystemd-user-service=true,-Dsystemd-use
 PACKAGECONFIG[dbus] = ""
 PACKAGECONFIG[test] = "-Dtests=true,-Dtests=false"

+# The dbus tests spawn a private bus through GTestDBus, which needs the
+# dbus-daemon binary. It is missing when dbus-broker provides the bus.
+WP_DBUS_TESTS = "${@'true' if d.getVar('VIRTUAL-RUNTIME_dbus') == 'dbus' else 'false'}"
+EXTRA_OEMESON += "-Ddbus-tests=${WP_DBUS_TESTS}"
+
 PACKAGESPLITFUNCS:prepend = " split_dynamic_packages "
 PACKAGESPLITFUNCS:append = " set_dynamic_metapkg_rdepends "

@@ -170,4 +175,6 @@  FILES:${PN}-modules = ""
 RRECOMMENDS:${PN}-modules += "${PN}-modules-meta"

 FILES:${PN}-ptest += "${datadir}/wireplumber/scripts/lib/test-utils.lua ${datadir}/wireplumber/scripts/testlib.lua"
-RDEPENDS:${PN}-ptest += "pipewire-modules-protocol-native ${PN}-scripts"
+RDEPENDS:${PN}-ptest += "pipewire-modules-protocol-native ${PN}-scripts \
+    ${@'dbus' if d.getVar('WP_DBUS_TESTS') == 'true' else ''} \
+"