tests: use dbus-run-session instead of dbus-launch
authorMichael Biebl <biebl@debian.org>
Thu, 21 Jan 2016 22:11:29 +0000 (23:11 +0100)
committerThomas Haller <thaller@redhat.com>
Fri, 22 Jan 2016 15:52:41 +0000 (16:52 +0100)
The dbus-run-session utility was designed to run a process within a
D-Bus session, specifically for running regressions tests and is much
better suited then dbus-launch. As an additional benefit, this avoids
any X dependencies.

https://mail.gnome.org/archives/networkmanager-list/2016-January/msg00023.html

libnm-glib/tests/libnm-glib-test-launch.sh
libnm/tests/libnm-test-launch.sh

index 980f834..1064e41 100755 (executable)
@@ -1,7 +1,3 @@
 #!/bin/sh
 
-# Spawn DBus
-eval `dbus-launch --sh-syntax`
-trap "kill $DBUS_SESSION_BUS_PID" EXIT
-
-"$@"
+dbus-run-session -- "$@"
index 980f834..1064e41 100755 (executable)
@@ -1,7 +1,3 @@
 #!/bin/sh
 
-# Spawn DBus
-eval `dbus-launch --sh-syntax`
-trap "kill $DBUS_SESSION_BUS_PID" EXIT
-
-"$@"
+dbus-run-session -- "$@"