2003-10-12 15:35:23 +00:00
|
|
|
#! /bin/bash
|
|
|
|
|
|
|
|
|
|
SCRIPTNAME=$0
|
|
|
|
|
|
|
|
|
|
function die()
|
|
|
|
|
{
|
2003-10-16 Havoc Pennington <hp@redhat.com>
* bus/connection.c (bus_pending_reply_expired): either cancel or
execute, not both
(bus_connections_check_reply): use unlink, not remove_link, as we
don't want to free the link; fixes double free mess
* dbus/dbus-pending-call.c (dbus_pending_call_block): fix in case
where no reply was received
* dbus/dbus-connection.c (_dbus_pending_call_complete_and_unlock):
fix a refcount leak
* bus/signals.c (match_rule_matches): add special cases for the
bus driver, so you can match on sender/destination for it.
* dbus/dbus-sysdeps.c (_dbus_abort): print backtrace if
DBUS_PRINT_BACKTRACE is set
* dbus/dbus-internals.c: add pid to assertion failure messages
* dbus/dbus-connection.c: add message type code to the debug spew
* glib/dbus-gproxy.c (gproxy_get_match_rule): match rules want
sender=foo not service=foo
* dbus/dbus-bus.c (dbus_bus_get): if the activation bus is the
session bus but DBUS_SESSION_BUS_ADDRESS isn't set, use
DBUS_ACTIVATION_ADDRESS instead
* bus/activation.c: set DBUS_SESSION_BUS_ADDRESS,
DBUS_SYSTEM_BUS_ADDRESS if appropriate
* bus/bus.c (bus_context_new): handle OOM copying bus type into
context struct
* dbus/dbus-message.c (dbus_message_iter_get_object_path): new function
(dbus_message_iter_get_object_path_array): new function (half
finished, disabled for the moment)
* glib/dbus-gproxy.c (dbus_gproxy_end_call): properly handle
DBUS_MESSAGE_TYPE_ERROR
* tools/dbus-launch.c (babysit): support DBUS_DEBUG_OUTPUT to
avoid redirecting stderr to /dev/null
(babysit): close stdin if not doing the "exit_with_session" thing
* dbus/dbus-sysdeps.c (_dbus_become_daemon): delete some leftover
debug code; change DBUS_DEBUG_OUTPUT to only enable stderr, not
stdout/stdin, so things don't get confused
* bus/system.conf.in: fix to allow replies, I modified .conf
instead of .conf.in again.
2003-10-16 06:34:51 +00:00
|
|
|
if ! test -z "$DBUS_SESSION_BUS_PID" ; then
|
2003-10-21 05:46:52 +00:00
|
|
|
echo "killing message bus"
|
2003-10-16 Havoc Pennington <hp@redhat.com>
* bus/connection.c (bus_pending_reply_expired): either cancel or
execute, not both
(bus_connections_check_reply): use unlink, not remove_link, as we
don't want to free the link; fixes double free mess
* dbus/dbus-pending-call.c (dbus_pending_call_block): fix in case
where no reply was received
* dbus/dbus-connection.c (_dbus_pending_call_complete_and_unlock):
fix a refcount leak
* bus/signals.c (match_rule_matches): add special cases for the
bus driver, so you can match on sender/destination for it.
* dbus/dbus-sysdeps.c (_dbus_abort): print backtrace if
DBUS_PRINT_BACKTRACE is set
* dbus/dbus-internals.c: add pid to assertion failure messages
* dbus/dbus-connection.c: add message type code to the debug spew
* glib/dbus-gproxy.c (gproxy_get_match_rule): match rules want
sender=foo not service=foo
* dbus/dbus-bus.c (dbus_bus_get): if the activation bus is the
session bus but DBUS_SESSION_BUS_ADDRESS isn't set, use
DBUS_ACTIVATION_ADDRESS instead
* bus/activation.c: set DBUS_SESSION_BUS_ADDRESS,
DBUS_SYSTEM_BUS_ADDRESS if appropriate
* bus/bus.c (bus_context_new): handle OOM copying bus type into
context struct
* dbus/dbus-message.c (dbus_message_iter_get_object_path): new function
(dbus_message_iter_get_object_path_array): new function (half
finished, disabled for the moment)
* glib/dbus-gproxy.c (dbus_gproxy_end_call): properly handle
DBUS_MESSAGE_TYPE_ERROR
* tools/dbus-launch.c (babysit): support DBUS_DEBUG_OUTPUT to
avoid redirecting stderr to /dev/null
(babysit): close stdin if not doing the "exit_with_session" thing
* dbus/dbus-sysdeps.c (_dbus_become_daemon): delete some leftover
debug code; change DBUS_DEBUG_OUTPUT to only enable stderr, not
stdout/stdin, so things don't get confused
* bus/system.conf.in: fix to allow replies, I modified .conf
instead of .conf.in again.
2003-10-16 06:34:51 +00:00
|
|
|
kill -9 $DBUS_SESSION_BUS_PID
|
|
|
|
|
fi
|
2003-10-12 15:35:23 +00:00
|
|
|
echo $SCRIPTNAME: $* >&2
|
|
|
|
|
exit 1
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if test -z "$DBUS_TOP_BUILDDIR" ; then
|
|
|
|
|
die "Must set DBUS_TOP_BUILDDIR"
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
CONFIG_FILE=./run-test.conf
|
2003-10-16 Havoc Pennington <hp@redhat.com>
* bus/connection.c (bus_pending_reply_expired): either cancel or
execute, not both
(bus_connections_check_reply): use unlink, not remove_link, as we
don't want to free the link; fixes double free mess
* dbus/dbus-pending-call.c (dbus_pending_call_block): fix in case
where no reply was received
* dbus/dbus-connection.c (_dbus_pending_call_complete_and_unlock):
fix a refcount leak
* bus/signals.c (match_rule_matches): add special cases for the
bus driver, so you can match on sender/destination for it.
* dbus/dbus-sysdeps.c (_dbus_abort): print backtrace if
DBUS_PRINT_BACKTRACE is set
* dbus/dbus-internals.c: add pid to assertion failure messages
* dbus/dbus-connection.c: add message type code to the debug spew
* glib/dbus-gproxy.c (gproxy_get_match_rule): match rules want
sender=foo not service=foo
* dbus/dbus-bus.c (dbus_bus_get): if the activation bus is the
session bus but DBUS_SESSION_BUS_ADDRESS isn't set, use
DBUS_ACTIVATION_ADDRESS instead
* bus/activation.c: set DBUS_SESSION_BUS_ADDRESS,
DBUS_SYSTEM_BUS_ADDRESS if appropriate
* bus/bus.c (bus_context_new): handle OOM copying bus type into
context struct
* dbus/dbus-message.c (dbus_message_iter_get_object_path): new function
(dbus_message_iter_get_object_path_array): new function (half
finished, disabled for the moment)
* glib/dbus-gproxy.c (dbus_gproxy_end_call): properly handle
DBUS_MESSAGE_TYPE_ERROR
* tools/dbus-launch.c (babysit): support DBUS_DEBUG_OUTPUT to
avoid redirecting stderr to /dev/null
(babysit): close stdin if not doing the "exit_with_session" thing
* dbus/dbus-sysdeps.c (_dbus_become_daemon): delete some leftover
debug code; change DBUS_DEBUG_OUTPUT to only enable stderr, not
stdout/stdin, so things don't get confused
* bus/system.conf.in: fix to allow replies, I modified .conf
instead of .conf.in again.
2003-10-16 06:34:51 +00:00
|
|
|
SERVICE_DIR="$DBUS_TOP_BUILDDIR/test/data/valid-service-files"
|
|
|
|
|
ESCAPED_SERVICE_DIR=`echo $SERVICE_DIR | sed -e 's/\//\\\\\\//g'`
|
|
|
|
|
echo "escaped service dir is: $ESCAPED_SERVICE_DIR"
|
2003-10-12 15:35:23 +00:00
|
|
|
|
|
|
|
|
## create a configuration file based on the standard session.conf
|
|
|
|
|
cat $DBUS_TOP_BUILDDIR/bus/session.conf | \
|
2003-10-16 Havoc Pennington <hp@redhat.com>
* bus/connection.c (bus_pending_reply_expired): either cancel or
execute, not both
(bus_connections_check_reply): use unlink, not remove_link, as we
don't want to free the link; fixes double free mess
* dbus/dbus-pending-call.c (dbus_pending_call_block): fix in case
where no reply was received
* dbus/dbus-connection.c (_dbus_pending_call_complete_and_unlock):
fix a refcount leak
* bus/signals.c (match_rule_matches): add special cases for the
bus driver, so you can match on sender/destination for it.
* dbus/dbus-sysdeps.c (_dbus_abort): print backtrace if
DBUS_PRINT_BACKTRACE is set
* dbus/dbus-internals.c: add pid to assertion failure messages
* dbus/dbus-connection.c: add message type code to the debug spew
* glib/dbus-gproxy.c (gproxy_get_match_rule): match rules want
sender=foo not service=foo
* dbus/dbus-bus.c (dbus_bus_get): if the activation bus is the
session bus but DBUS_SESSION_BUS_ADDRESS isn't set, use
DBUS_ACTIVATION_ADDRESS instead
* bus/activation.c: set DBUS_SESSION_BUS_ADDRESS,
DBUS_SYSTEM_BUS_ADDRESS if appropriate
* bus/bus.c (bus_context_new): handle OOM copying bus type into
context struct
* dbus/dbus-message.c (dbus_message_iter_get_object_path): new function
(dbus_message_iter_get_object_path_array): new function (half
finished, disabled for the moment)
* glib/dbus-gproxy.c (dbus_gproxy_end_call): properly handle
DBUS_MESSAGE_TYPE_ERROR
* tools/dbus-launch.c (babysit): support DBUS_DEBUG_OUTPUT to
avoid redirecting stderr to /dev/null
(babysit): close stdin if not doing the "exit_with_session" thing
* dbus/dbus-sysdeps.c (_dbus_become_daemon): delete some leftover
debug code; change DBUS_DEBUG_OUTPUT to only enable stderr, not
stdout/stdin, so things don't get confused
* bus/system.conf.in: fix to allow replies, I modified .conf
instead of .conf.in again.
2003-10-16 06:34:51 +00:00
|
|
|
sed -e 's/<servicedir>.*$/<servicedir>'$ESCAPED_SERVICE_DIR'<\/servicedir>/g' | \
|
|
|
|
|
sed -e 's/<include.*$//g' \
|
2003-10-12 15:35:23 +00:00
|
|
|
> $CONFIG_FILE
|
|
|
|
|
|
|
|
|
|
echo "Created configuration file $CONFIG_FILE"
|
|
|
|
|
|
|
|
|
|
export PATH=$DBUS_TOP_BUILDDIR/bus:$PATH
|
|
|
|
|
## the libtool script found by the path search should already do this, but
|
|
|
|
|
export LD_LIBRARY_PATH=$DBUS_TOP_BUILDDIR/dbus/.libs:$LD_LIBRARY_PATH
|
|
|
|
|
|
|
|
|
|
## will only do anything on Linux
|
|
|
|
|
export MALLOC_CHECK_=2
|
|
|
|
|
|
|
|
|
|
echo "Using daemon "`type dbus-daemon-1`
|
|
|
|
|
|
|
|
|
|
eval `$DBUS_TOP_BUILDDIR/tools/dbus-launch --sh-syntax --config-file=$CONFIG_FILE`
|
|
|
|
|
|
|
|
|
|
if test -z "$DBUS_SESSION_BUS_PID" ; then
|
|
|
|
|
die "Failed to launch message bus for tests to run"
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
echo "Started test bus pid $DBUS_SESSION_BUS_PID at $DBUS_SESSION_BUS_ADDRESS"
|
|
|
|
|
|
2003-10-21 05:46:52 +00:00
|
|
|
$DEBUG $DBUS_TOP_BUILDDIR/test/glib/test-dbus-glib || die "test-dbus-glib failed"
|
2003-10-12 15:35:23 +00:00
|
|
|
|
|
|
|
|
## we kill -TERM so gcov data can be written out
|
|
|
|
|
|
|
|
|
|
kill -TERM $DBUS_SESSION_BUS_PID || die "Message bus vanished! should not have happened" && echo "Killed daemon $DBUS_SESSION_BUS_PID"
|
|
|
|
|
|
|
|
|
|
sleep 2
|
|
|
|
|
|
|
|
|
|
## be sure it really died
|
|
|
|
|
kill -9 $DBUS_SESSION_BUS_PID > /dev/null 2>&1 || true
|
|
|
|
|
|
|
|
|
|
exit 0
|