From 6cc8062cfb3f9410d54a27e7ccca77c103e441e8 Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Wed, 27 Jul 2016 23:23:11 +0100 Subject: [PATCH] libtest: replace dbus-launch with dbus-daemon dbus-launch is X11-specific and contains a lot of legacy code to support X11 autolaunching. It should not be part of the Wayland (and/or Mir) future. Start a dbus-daemon directly instead. --- tests/libtest.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/tests/libtest.sh b/tests/libtest.sh index b723fc016..9dbcc115d 100644 --- a/tests/libtest.sh +++ b/tests/libtest.sh @@ -231,7 +231,14 @@ skip_without_bwrap () { } sed s#@testdir@#${test_builddir}# ${test_srcdir}/session.conf.in > session.conf -eval `dbus-launch --config-file=session.conf --sh-syntax` +dbus-daemon --fork --config-file=session.conf --print-address=3 --print-pid=4 \ + 3> dbus-session-bus-address 4> dbus-session-bus-pid +export DBUS_SESSION_BUS_ADDRESS="$(cat dbus-session-bus-address)" +DBUS_SESSION_BUS_PID="$(cat dbus-session-bus-pid)" + +if ! /bin/kill -0 "$DBUS_SESSION_BUS_PID"; then + assert_not_reached "Failed to start dbus-daemon" +fi cleanup () { /bin/kill $DBUS_SESSION_BUS_PID