tests: use dbus-run-session for tools/run-test-valgrind.sh

This commit is contained in:
Thomas Haller 2016-01-22 15:57:46 +01:00
parent fb1da0eab2
commit f74a9000b1

View file

@ -80,10 +80,14 @@ else
fi
fi
NMTST_DBUS_RUN_SESSION=()
if [ "$NMTST_LAUNCH_DBUS" == "yes" ]; then
# Spawn DBus
eval `dbus-launch --sh-syntax`
trap "kill $DBUS_SESSION_BUS_PID" EXIT
if ! which dbus-run-session &>/dev/null ; then
eval `dbus-launch --sh-syntax`
trap "kill $DBUS_SESSION_BUS_PID" EXIT
else
NMTST_DBUS_RUN_SESSION=(dbus-run-session --)
fi
fi
if [ "$NMTST_NO_VALGRIND" != "" ]; then
@ -95,6 +99,7 @@ LOGFILE="${TEST}.valgrind-log"
export G_SLICE=always-malloc
export G_DEBUG=gc-friendly
"${NMTST_DBUS_RUN_SESSION[@]}" \
"${NMTST_LIBTOOL[@]}" "$NMTST_VALGRIND" \
--quiet \
--error-exitcode=$VALGRIND_ERROR \