NetworkManager/libnm-glib/tests/libnm-glib-test-launch.sh
Lubomir Rintel e9bfd0e29c tests: Don't run session-long dbus daemons for tests
They require a tty or X11 displays, thus are not suitable for headless runs
(such as in mock). Furthermore, they die with the tty or X11 session, which
is somehow late -- a lot of them may accumulate. Let's kill them right away.
2014-10-24 19:16:33 +02:00

9 lines
171 B
Bash
Executable file

#!/bin/sh
# Spawn DBus if there's none
if [ -z "$DBUS_SESSION_BUS_ADDRESS" ]; then
eval `dbus-launch --sh-syntax`
trap "kill $DBUS_SESSION_BUS_PID" EXIT
fi
"$@"