diff options
| author | Michael Biebl <biebl@debian.org> | 2016-03-01 16:55:22 +0100 |
|---|---|---|
| committer | Michael Biebl <biebl@debian.org> | 2016-03-01 16:55:22 +0100 |
| commit | c2de0d98ba39e0a1a970d066fd19be786092f376 (patch) | |
| tree | 3838363c06a6019db6cf1f882ea34ebded63c38b /tools/run-test-valgrind.sh | |
| parent | 494f296a3baab08522617b24b1f126d8f9a17502 (diff) | |
Imported Upstream version 1.1.91 upstream/1.1.91
Diffstat (limited to 'tools/run-test-valgrind.sh')
| -rwxr-xr-x | tools/run-test-valgrind.sh | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/tools/run-test-valgrind.sh b/tools/run-test-valgrind.sh index 4dc092a0..f2eeefcd 100755 --- a/tools/run-test-valgrind.sh +++ b/tools/run-test-valgrind.sh @@ -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 \ |