1 #! /bin/sh 2 3 die() 4 { 5 if ! test -z "$DBUS_SESSION_BUS_PID" ; then 6 echo "killing message bus "$DBUS_SESSION_BUS_PID >&2 7 kill -9 $DBUS_SESSION_BUS_PID 8 fi 9 echo $SCRIPTNAME: $* >&2 10 11 exit 1 12 } 13 14 15 SCRIPTNAME=$0 16 MODE=$1 17 18 ## so the tests can complain if you fail to use the script to launch them 19 DBUS_TEST_NAME_RUN_TEST_SCRIPT=1 20 export DBUS_TEST_NAME_RUN_TEST_SCRIPT 21 22 # Rerun ourselves with tmp session bus if we're not already 23 if test -z "$DBUS_TEST_NAME_IN_RUN_TEST"; then 24 DBUS_TEST_NAME_IN_RUN_TEST=1 25 export DBUS_TEST_NAME_IN_RUN_TEST 26 exec $DBUS_TOP_SRCDIR/tools/run-with-tmp-session-bus.sh $SCRIPTNAME $MODE 27 fi 28 29 if test -n "$DBUS_TEST_MONITOR"; then 30 dbus-monitor --session & 31 fi 32 33 echo "running test-ids" 34 ${DBUS_TOP_BUILDDIR}/libtool --mode=execute $DEBUG $DBUS_TOP_BUILDDIR/test/name-test/test-ids || die "test-ids failed" 35 36 echo "running test-pending-call-dispatch" 37 ${DBUS_TOP_BUILDDIR}/libtool --mode=execute $DEBUG $DBUS_TOP_BUILDDIR/test/name-test/test-pending-call-dispatch || die "test-pending-call-dispatch failed" 38 39 echo "running test-pending-call-timeout" 40 ${DBUS_TOP_BUILDDIR}/libtool --mode=execute $DEBUG $DBUS_TOP_BUILDDIR/test/name-test/test-pending-call-timeout || die "test-pending-call-timeout failed" 41 42 echo "running test-threads-init" 43 ${DBUS_TOP_BUILDDIR}/libtool --mode=execute $DEBUG $DBUS_TOP_BUILDDIR/test/name-test/test-threads-init || die "test-threads-init failed" 44 45 echo "running test-privserver-client" 46 ${DBUS_TOP_BUILDDIR}/libtool --mode=execute $DEBUG $DBUS_TOP_BUILDDIR/test/name-test/test-privserver-client || die "test-privserver-client failed" 47 48 echo "running test-shutdown" 49 ${DBUS_TOP_BUILDDIR}/libtool --mode=execute $DEBUG $DBUS_TOP_BUILDDIR/test/name-test/test-shutdown || die "test-shutdown failed" 50 51 echo "running test activation forking" 52 if ! python $DBUS_TOP_SRCDIR/test/name-test/test-activation-forking.py; then 53 echo "Failed test-activation-forking" 54 exit 1 55 fi 56