run-test.sh revision 163f42a8b14491ea6f70a20a8d93f580d43f6c40
1#! /bin/sh
2
3ie()
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
15SCRIPTNAME=$0
16MODE=$1
17
18## so the tests can complain if you fail to use the script to launch them
19export DBUS_TEST_NAME_RUN_TEST_SCRIPT=1
20
21# Rerun ourselves with tmp session bus if we're not already
22if test -z "$DBUS_TEST_NAME_IN_RUN_TEST"; then
23  DBUS_TEST_NAME_IN_RUN_TEST=1
24  export DBUS_TEST_NAME_IN_RUN_TEST
25  exec $DBUS_TOP_SRCDIR/tools/run-with-tmp-session-bus.sh $SCRIPTNAME $MODE
26fi 
27echo "running test-names"
28libtool --mode=execute $DEBUG $DBUS_TOP_BUILDDIR/test/name-test/test-names || die "test-client failed"
29
30echo "running test-pending-call-dispatch"
31libtool --mode=execute $DEBUG $DBUS_TOP_BUILDDIR/test/name-test/test-pending-call-dispatch || die "test-client failed"
32
33echo "running test-threads-init"
34libtool --mode=execute $DEBUG $DBUS_TOP_BUILDDIR/test/name-test/test-threads-init || die "test-client failed"
35