diff options
| author | Michael Biebl <biebl@debian.org> | 2016-03-01 16:56:10 +0100 |
|---|---|---|
| committer | Michael Biebl <biebl@debian.org> | 2016-03-01 16:56:10 +0100 |
| commit | e62b307a9dd108e664aa507355ed3dd15a9c6d67 (patch) | |
| tree | 2957d1a0dde11be8bd9f506f8b075d21b85da2d0 /tools | |
| parent | de39787fedbff438bd933c30675fc5c026db6aa0 (diff) | |
| parent | c2de0d98ba39e0a1a970d066fd19be786092f376 (diff) | |
Merge tag 'upstream/1.1.91'
Upstream version 1.1.91
Diffstat (limited to 'tools')
| -rw-r--r-- | tools/Makefile.am | 1 | ||||
| -rw-r--r-- | tools/Makefile.in | 1 | ||||
| -rwxr-xr-x | tools/run-test-dbus-session.sh | 10 | ||||
| -rwxr-xr-x | tools/run-test-valgrind.sh | 11 |
4 files changed, 20 insertions, 3 deletions
diff --git a/tools/Makefile.am b/tools/Makefile.am index f008956d..27d6bcc4 100644 --- a/tools/Makefile.am +++ b/tools/Makefile.am @@ -3,5 +3,6 @@ EXTRA_DIST = \ debug-helper.py \ doc-generator.xsl \ run-test-valgrind.sh \ + run-test-dbus-session.sh \ test-networkmanager-service.py \ test-sudo-wrapper.sh diff --git a/tools/Makefile.in b/tools/Makefile.in index 0c4078a3..585a0503 100644 --- a/tools/Makefile.in +++ b/tools/Makefile.in @@ -399,6 +399,7 @@ EXTRA_DIST = \ debug-helper.py \ doc-generator.xsl \ run-test-valgrind.sh \ + run-test-dbus-session.sh \ test-networkmanager-service.py \ test-sudo-wrapper.sh diff --git a/tools/run-test-dbus-session.sh b/tools/run-test-dbus-session.sh new file mode 100755 index 00000000..0235d65b --- /dev/null +++ b/tools/run-test-dbus-session.sh @@ -0,0 +1,10 @@ +#!/bin/sh + +if ! which dbus-run-session &>/dev/null; then + eval `dbus-launch --sh-syntax` + trap "kill $DBUS_SESSION_BUS_PID" EXIT + "$@" + exit $? +fi + +dbus-run-session -- "$@" 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 \ |