tests: always spawn private d-bus

Parallel test runs would not be possible without this.
This commit is contained in:
Lubomir Rintel 2015-05-14 14:39:23 +02:00
parent f627d6db8e
commit d0e25ac8be
3 changed files with 9 additions and 15 deletions

View file

@ -1,9 +1,7 @@
#!/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
# Spawn DBus
eval `dbus-launch --sh-syntax`
trap "kill $DBUS_SESSION_BUS_PID" EXIT
"$@"

View file

@ -1,9 +1,7 @@
#!/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
# Spawn DBus
eval `dbus-launch --sh-syntax`
trap "kill $DBUS_SESSION_BUS_PID" EXIT
"$@"

View file

@ -4,11 +4,9 @@ LIBTOOL="$1"; shift
VALGRIND="$1"; shift
SUPPRESSIONS="$1"; shift
if [ "$1" = "--launch-dbus" ]; then
# 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
# Spawn DBus
eval `dbus-launch --sh-syntax`
trap "kill $DBUS_SESSION_BUS_PID" EXIT
shift
fi
TEST="$1"; shift