diff options
-rw-r--r-- | test/name-test/.gitignore | 2 | ||||
-rwxr-xr-x | tools/run-with-tmp-session-bus.sh | 11 |
2 files changed, 10 insertions, 3 deletions
diff --git a/test/name-test/.gitignore b/test/name-test/.gitignore index 09f7ad36..2bf313a5 100644 --- a/test/name-test/.gitignore +++ b/test/name-test/.gitignore @@ -3,7 +3,7 @@ Makefile Makefile.in echo-error-output.tmp -run-with-tmp-session-bus.conf +tmp-session-bus.*.conf test-ids test-names test-pending-call-dispatch diff --git a/tools/run-with-tmp-session-bus.sh b/tools/run-with-tmp-session-bus.sh index 3245652e..94ae8fc8 100755 --- a/tools/run-with-tmp-session-bus.sh +++ b/tools/run-with-tmp-session-bus.sh @@ -4,9 +4,12 @@ SCRIPTNAME="$0" WRAPPED_SCRIPT="$1" shift +CONFIG_FILE=./tmp-session-bus.$$.conf + die () { echo "$SCRIPTNAME: $*" >&2 + rm -f "$CONFIG_FILE" exit 1 } @@ -14,7 +17,6 @@ if test -z "$DBUS_TOP_BUILDDIR" ; then die "Must set DBUS_TOP_BUILDDIR" fi -CONFIG_FILE=./run-with-tmp-session-bus.conf SERVICE_DIR="$DBUS_TOP_BUILDDIR/test/data/valid-service-files" ESCAPED_SERVICE_DIR=`echo $SERVICE_DIR | sed -e 's/\//\\\\\\//g'` echo "escaped service dir is: $ESCAPED_SERVICE_DIR" >&2 @@ -48,8 +50,13 @@ unset DBUS_SESSION_BUS_PID DBUS_USE_TEST_BINARY=1 export DBUS_USE_TEST_BINARY -exec $DBUS_TOP_BUILDDIR/tools/dbus-run-session \ +$DBUS_TOP_BUILDDIR/tools/dbus-run-session \ --config-file="$CONFIG_FILE" \ --dbus-daemon="$DBUS_TOP_BUILDDIR/bus/dbus-daemon" \ -- \ "$WRAPPED_SCRIPT" "$@" +error=$? + +# clean up +rm -f "$CONFIG_FILE" +exit $error |