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"
9 echo "$SCRIPTNAME: $*" >&2
13 if test -z "$PYTHON"; then
14 echo "Warning: \$PYTHON not set, assuming 'python'" >&2
18 if test -z "$DBUS_TOP_SRCDIR" ; then
19 die
"Must set DBUS_TOP_SRCDIR"
22 if test -z "$DBUS_TOP_BUILDDIR" ; then
23 die
"Must set DBUS_TOP_BUILDDIR"
28 ## so the tests can complain if you fail to use the script to launch them
29 export DBUS_TEST_PYTHON_RUN_TEST_SCRIPT
=1
30 # Rerun ourselves with tmp session bus if we're not already
31 if test -z "$DBUS_TEST_PYTHON_IN_RUN_TEST"; then
32 DBUS_TEST_PYTHON_IN_RUN_TEST
=1
33 export DBUS_TEST_PYTHON_IN_RUN_TEST
34 exec "$DBUS_TOP_SRCDIR"/test
/run-with-tmp-session-bus.sh
$SCRIPTNAME
36 echo "running test-standalone.py"
37 $PYTHON "$DBUS_TOP_SRCDIR"/test
/test-standalone.py || die
"test-standalone.py failed"
38 echo "running test-client.py"
39 $PYTHON "$DBUS_TOP_SRCDIR"/test
/test-client.py || die
"test-client.py failed"
40 echo "running test-signals.py"
41 $PYTHON "$DBUS_TOP_SRCDIR"/test
/test-signals.py || die
"test-signals.py failed"
43 echo "running cross-test (for better diagnostics use mjj29's dbus-test)"
45 ${MAKE:-make} -s cross-test-server
> "$DBUS_TOP_BUILDDIR"/test
/cross-server.log
&
47 ${MAKE:-make} -s cross-test-client
> "$DBUS_TOP_BUILDDIR"/test
/cross-client.log
49 if grep .
"$DBUS_TOP_BUILDDIR"/test
/cross-client.log
>/dev
/null
; then
52 die
"cross-test client produced no output"
54 if grep .
"$DBUS_TOP_BUILDDIR"/test
/cross-server.log
>/dev
/null
; then
57 die
"cross-test server produced no output"
60 if grep fail
"$DBUS_TOP_BUILDDIR"/test
/cross-client.log
; then
61 die
"^^^ Cross-test client reports failures, see test/cross-client.log"
63 echo " - cross-test client reported no failures"
65 if grep untested
"$DBUS_TOP_BUILDDIR"/test
/cross-server.log
; then
66 die
"^^^ Cross-test server reports incomplete test coverage"
68 echo " - cross-test server reported no untested functions"
71 rm -f "$DBUS_TOP_BUILDDIR"/test
/test-service.log
72 rm -f "$DBUS_TOP_BUILDDIR"/test
/cross-client.log
73 rm -f "$DBUS_TOP_BUILDDIR"/test
/cross-server.log