Permalink
Browse files

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.
  • Loading branch information...
1 parent 07b342a commit 6cc8062cfb3f9410d54a27e7ccca77c103e441e8 @smcv smcv committed Jul 27, 2016
Showing with 8 additions and 1 deletion.
  1. +8 −1 tests/libtest.sh
View
@@ -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

0 comments on commit 6cc8062

Please sign in to comment.