9 echo "$SCRIPTNAME: $*" >&2
13 if test -z "$DBUS_TOP_BUILDDIR" ; then
14 die "Must set DBUS_TOP_BUILDDIR"
17 CONFIG_FILE=./run-with-tmp-session-bus.conf
18 SERVICE_DIR="$DBUS_TOP_BUILDDIR/test/data/valid-service-files"
19 ESCAPED_SERVICE_DIR=`echo $SERVICE_DIR | sed -e 's/\//\\\\\\//g'`
20 echo "escaped service dir is: $ESCAPED_SERVICE_DIR" >&2
22 if test -z "$SOURCE_CONFIG_FILE"; then
23 SOURCE_CONFIG_FILE="$DBUS_TOP_BUILDDIR/bus/session.conf";
25 ## create a configuration file based on the standard session.conf
26 cat $SOURCE_CONFIG_FILE | \
27 sed -e 's/<standard_session_servicedirs.*$/<servicedir>'$ESCAPED_SERVICE_DIR'<\/servicedir>/g' | \
28 sed -e 's/<include.*$//g' \
31 echo "Created configuration file $CONFIG_FILE" >&2
33 if ! test -e "$DBUS_TOP_BUILDDIR"/bus/dbus-daemon ; then
34 die "$DBUS_TOP_BUILDDIR/bus/dbus-daemon does not exist"
37 PATH="$DBUS_TOP_BUILDDIR"/bus:$PATH
40 ## the libtool script found by the path search should already do this, but
41 LD_LIBRARY_PATH=$DBUS_TOP_BUILDDIR/dbus/.libs:$LD_LIBRARY_PATH
42 export LD_LIBRARY_PATH
43 unset DBUS_SESSION_BUS_ADDRESS
44 unset DBUS_SESSION_BUS_PID
46 # this does not actually affect dbus-run-session any more, but could be
47 # significant for dbus-launch as used by the autolaunch test
48 DBUS_USE_TEST_BINARY=1
49 export DBUS_USE_TEST_BINARY
51 exec $DBUS_TOP_BUILDDIR/tools/dbus-run-session \
52 --config-file="$CONFIG_FILE" \
53 --dbus-daemon="$DBUS_TOP_BUILDDIR/bus/dbus-daemon" \
55 "$WRAPPED_SCRIPT" "$@"