summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon McVittie <smcv@collabora.com>2019-07-15 13:48:56 +0100
committerSimon McVittie <smcv@collabora.com>2019-07-15 15:51:05 +0100
commit5aa311eca9b3226e033030ce78a3d60abd4ea092 (patch)
tree5744f61c638950019cd4aabace5940b275a3f6cb
parent28734ae1661ea029fa2ed06fab6a4d6cf6ade098 (diff)
with-session-bus.sh: Remove unused script
Signed-off-by: Simon McVittie <smcv@collabora.com>
-rw-r--r--Makefile.am1
-rwxr-xr-xtest/with-session-bus.sh106
2 files changed, 0 insertions, 107 deletions
diff --git a/Makefile.am b/Makefile.am
index fd480d4..7057a99 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -255,7 +255,6 @@ dist_test_extra_scripts = \
test/cross-test-server.py \
test/test-service.py \
test/wait-for-name.py \
- test/with-session-bus.sh \
$(NULL)
if HAVE_PYTHON_3
diff --git a/test/with-session-bus.sh b/test/with-session-bus.sh
deleted file mode 100755
index 5abeed0..0000000
--- a/test/with-session-bus.sh
+++ /dev/null
@@ -1,106 +0,0 @@
-#!/bin/sh
-# with-session-bus.sh - run a program with a temporary D-Bus session daemon
-#
-# Copyright (C) 2007-2008 Collabora Ltd. <http://www.collabora.co.uk/>
-#
-# SPDX-License-Identifier: FSFAP
-#
-# Copying and distribution of this file, with or without modification,
-# are permitted in any medium without royalty provided the copyright
-# notice and this notice are preserved. This file is offered as-is,
-# without any warranty.
-
-set -e
-
-me=with-session-bus
-
-dbus_daemon_args="--print-address=5 --print-pid=6 --fork"
-sleep=0
-
-usage ()
-{
- echo "usage: $me [options] -- program [program_options]" >&2
- echo "Requires write access to the current directory." >&2
- echo "" >&2
- echo "If \$WITH_SESSION_BUS_FORK_DBUS_MONITOR is set, fork dbus-monitor" >&2
- echo "with the arguments in \$WITH_SESSION_BUS_FORK_DBUS_MONITOR_OPT." >&2
- echo "The output of dbus-monitor is saved in $me-<pid>.dbus-monitor-logs" >&2
- exit 2
-}
-
-while test "z$1" != "z--"; do
- case "$1" in
- --sleep=*)
- sleep="$1"
- sleep="${sleep#--sleep=}"
- shift
- ;;
- --session)
- dbus_daemon_args="$dbus_daemon_args --session"
- shift
- ;;
- --config-file=*)
- # FIXME: assumes config file doesn't contain any special characters
- dbus_daemon_args="$dbus_daemon_args $1"
- shift
- ;;
- *)
- usage
- ;;
- esac
-done
-shift
-if test "z$1" = "z"; then usage; fi
-
-exec 5> $me-$$.address
-exec 6> $me-$$.pid
-
-cleanup ()
-{
- pid=`head -n1 $me-$$.pid`
- if test -n "$pid" ; then
- if [ -n "$VERBOSE_TESTS" ]; then
- echo "Killing temporary bus daemon: $pid" >&2
- fi
- kill -INT "$pid"
- fi
- rm -f $me-$$.address
- rm -f $me-$$.pid
-}
-
-trap cleanup INT HUP TERM
-dbus-daemon $dbus_daemon_args
-
-if [ -n "$VERBOSE_TESTS" ]; then
- { echo -n "Temporary bus daemon is "; cat $me-$$.address; } >&2
- { echo -n "Temporary bus daemon PID is "; head -n1 $me-$$.pid; } >&2
-fi
-
-e=0
-
-# These might be non-null when run from e.g. gnome-terminal 3.8, which uses
-# an activatable service for its windows; we don't want to inherit them either
-unset DBUS_STARTER_ADDRESS
-unset DBUS_STARTER_BUS_TYPE
-
-DBUS_SESSION_BUS_ADDRESS="`cat $me-$$.address`"
-export DBUS_SESSION_BUS_ADDRESS
-DBUS_SESSION_BUS_PID="`cat $me-$$.pid`"
-export DBUS_SESSION_BUS_PID
-
-if [ -n "$WITH_SESSION_BUS_FORK_DBUS_MONITOR" ] ; then
- echo -n "Forking dbus-monitor $WITH_SESSION_BUS_FORK_DBUS_MONITOR_OPT" >&2
- dbus-monitor $WITH_SESSION_BUS_FORK_DBUS_MONITOR_OPT \
- > $me-$$.dbus-monitor-logs 2>&1 &
-fi
-
-"$@" || e=$?
-
-if test $sleep != 0; then
- sleep $sleep
-fi
-
-trap - INT HUP TERM
-cleanup
-
-exit $e