diff options
author | Thomas Haller <thaller@redhat.com> | 2016-01-22 15:57:46 +0100 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2016-01-22 16:54:32 +0100 |
commit | f74a9000b1ebd2cc1bf373e10ad87039b9fd73f4 (patch) | |
tree | fb5705c8ff1a5bf27cebaecc07bd287b87b6d650 /tools | |
parent | fb1da0eab211fc50eb9a39fa24c63f7fdd2d7fc4 (diff) | |
download | NetworkManager-f74a9000b1ebd2cc1bf373e10ad87039b9fd73f4.tar.gz |
tests: use dbus-run-session for tools/run-test-valgrind.sh
Diffstat (limited to 'tools')
-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 4dc092a093..f2eeefcd02 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 \ |