#!/bin/sh
# Simple wrapper that runs the bzr-dbus testsuite with a new DBus
# session and tears it down when its done.
#
# Unlike the build time tests, we don't need to set BZR_PLUGINS_AT

DBUS_SESSION_BUS_PID=
killdbus() {
	echo "killing dbus process $DBUS_SESSION_BUS_PID"
	kill $DBUS_SESSION_BUS_PID
}
trap killdbus EXIT QUIT INT STOP TERM
eval `dbus-launch --sh-syntax`
dbus-launch /usr/bin/bzr selftest -s bp.dbus
