blob: 832ce0a5428e3cbfebf02aa1bafcb6a28cc21a02 [file] [log] [blame]
Emeric Vigier2f625822012-08-06 11:09:52 -04001#! /bin/sh
2
3die()
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
19DBUS_TEST_NAME_RUN_TEST_SCRIPT=1
20export DBUS_TEST_NAME_RUN_TEST_SCRIPT
21
22# Rerun ourselves with tmp session bus if we're not already
23if 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
27fi
28
29if test -n "$DBUS_TEST_MONITOR"; then
30 dbus-monitor --session &
31fi
32
33echo "running test-ids"
34${DBUS_TOP_BUILDDIR}/libtool --mode=execute $DEBUG $DBUS_TOP_BUILDDIR/test/name-test/test-ids || die "test-ids failed"
35
36echo "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
39echo "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
42echo "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
45echo "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
48echo "running test-shutdown"
49${DBUS_TOP_BUILDDIR}/libtool --mode=execute $DEBUG $DBUS_TOP_BUILDDIR/test/name-test/test-shutdown || die "test-shutdown failed"
50
51echo "running test activation forking"
52if ! python $DBUS_TOP_SRCDIR/test/name-test/test-activation-forking.py; then
53 echo "Failed test-activation-forking"
54 exit 1
55fi