2003-10-12 15:35:23 +00:00
|
|
|
#! /bin/bash
|
|
|
|
|
|
|
|
|
|
SCRIPTNAME=$0
|
2004-11-27 02:18:36 +00:00
|
|
|
MODE=$1
|
2003-10-12 15:35:23 +00:00
|
|
|
|
2004-11-27 02:18:36 +00:00
|
|
|
## so the tests can complain if you fail to use the script to launch them
|
|
|
|
|
export DBUS_TEST_GLIB_RUN_TEST_SCRIPT=1
|
|
|
|
|
|
2005-03-12 16:33:01 +00:00
|
|
|
# Rerun ourselves with tmp session bus if we're not already
|
|
|
|
|
if test -z "$DBUS_TEST_GLIB_IN_RUN_TEST"; then
|
|
|
|
|
DBUS_TEST_GLIB_IN_RUN_TEST=1
|
|
|
|
|
export DBUS_TEST_GLIB_IN_RUN_TEST
|
2005-03-17 17:48:29 +00:00
|
|
|
exec $DBUS_TOP_BUILDDIR/tools/run-with-tmp-session-bus.sh $SCRIPTNAME $MODE
|
2005-03-12 16:33:01 +00:00
|
|
|
fi
|
|
|
|
|
|
2004-11-27 02:18:36 +00:00
|
|
|
if test x$MODE = xprofile ; then
|
2005-01-30 05:18:44 +00:00
|
|
|
echo "profiling type $PROFILE_TYPE"
|
2004-11-27 02:18:36 +00:00
|
|
|
sleep 2 ## this lets the bus get started so its startup time doesn't affect the profile too much
|
|
|
|
|
if test x$PROFILE_TYPE = x ; then
|
|
|
|
|
PROFILE_TYPE=all
|
|
|
|
|
fi
|
2005-01-15 Havoc Pennington <hp@redhat.com>
* Land the new message args API and type system.
This patch is huge, but the public API change is not
really large. The set of D-BUS types has changed somewhat,
and the arg "getters" are more geared toward language bindings;
they don't make a copy, etc.
There are also some known issues. See these emails for details
on this huge patch:
http://lists.freedesktop.org/archives/dbus/2004-December/001836.html
http://lists.freedesktop.org/archives/dbus/2005-January/001922.html
* dbus/dbus-marshal-*: all the new stuff
* dbus/dbus-message.c: basically rewritten
* dbus/dbus-memory.c (check_guards): with "guards" enabled, init
freed blocks to be all non-nul bytes so using freed memory is less
likely to work right
* dbus/dbus-internals.c (_dbus_test_oom_handling): add
DBUS_FAIL_MALLOC=N environment variable, so you can do
DBUS_FAIL_MALLOC=0 to skip the out-of-memory checking, or
DBUS_FAIL_MALLOC=10 to make it really, really, really slow and
thorough.
* qt/message.cpp: port to the new message args API
(operator<<): use str.utf8() rather than str.unicode()
(pretty sure this is right from the Qt docs?)
* glib/dbus-gvalue.c: port to the new message args API
* bus/dispatch.c, bus/driver.c: port to the new message args API
* dbus/dbus-string.c (_dbus_string_init_const_len): initialize the
"locked" flag to TRUE and align_offset to 0; I guess we never
looked at these anyhow, but seems cleaner.
* dbus/dbus-string.h (_DBUS_STRING_ALLOCATION_PADDING):
move allocation padding macro to this header; use it to implement
(_DBUS_STRING_STATIC): ability to declare a static string.
* dbus/dbus-message.c (_dbus_message_has_type_interface_member):
change to return TRUE if the interface is not set.
* dbus/dbus-string.[hc]: move the D-BUS specific validation stuff
to dbus-marshal-validate.[hc]
* dbus/dbus-marshal-basic.c (_dbus_type_to_string): move here from
dbus-internals.c
* dbus/Makefile.am: cut over from dbus-marshal.[hc]
to dbus-marshal-*.[hc]
* dbus/dbus-object-tree.c (_dbus_decompose_path): move this
function here from dbus-marshal.c
2005-01-15 07:15:38 +00:00
|
|
|
libtool --mode=execute $DEBUG $DBUS_TOP_BUILDDIR/test/glib/test-profile $PROFILE_TYPE || die "test-profile failed"
|
2005-01-30 05:18:44 +00:00
|
|
|
elif test x$MODE = xviewer ; then
|
|
|
|
|
echo "Launching dbus-viewer"
|
|
|
|
|
ARGS=
|
|
|
|
|
if test x$DEBUG = x ; then
|
2005-01-30 07:44:08 +00:00
|
|
|
ARGS="--services org.freedesktop.DBus org.freedesktop.DBus.TestSuiteGLibService"
|
2005-01-30 05:18:44 +00:00
|
|
|
fi
|
|
|
|
|
libtool --mode=execute $DEBUG $DBUS_TOP_BUILDDIR/tools/dbus-viewer $ARGS || die "could not run dbus-viewer"
|
2005-01-30 07:44:08 +00:00
|
|
|
elif test x$MODE = xwait ; then
|
|
|
|
|
echo "Waiting DBUS_SESSION_BUS_ADDRESS=$DBUS_SESSION_BUS_ADDRESS"
|
|
|
|
|
sleep 86400
|
2004-11-27 02:18:36 +00:00
|
|
|
else
|
2005-01-30 05:18:44 +00:00
|
|
|
echo "running test-dbus-glib"
|
2005-01-15 Havoc Pennington <hp@redhat.com>
* Land the new message args API and type system.
This patch is huge, but the public API change is not
really large. The set of D-BUS types has changed somewhat,
and the arg "getters" are more geared toward language bindings;
they don't make a copy, etc.
There are also some known issues. See these emails for details
on this huge patch:
http://lists.freedesktop.org/archives/dbus/2004-December/001836.html
http://lists.freedesktop.org/archives/dbus/2005-January/001922.html
* dbus/dbus-marshal-*: all the new stuff
* dbus/dbus-message.c: basically rewritten
* dbus/dbus-memory.c (check_guards): with "guards" enabled, init
freed blocks to be all non-nul bytes so using freed memory is less
likely to work right
* dbus/dbus-internals.c (_dbus_test_oom_handling): add
DBUS_FAIL_MALLOC=N environment variable, so you can do
DBUS_FAIL_MALLOC=0 to skip the out-of-memory checking, or
DBUS_FAIL_MALLOC=10 to make it really, really, really slow and
thorough.
* qt/message.cpp: port to the new message args API
(operator<<): use str.utf8() rather than str.unicode()
(pretty sure this is right from the Qt docs?)
* glib/dbus-gvalue.c: port to the new message args API
* bus/dispatch.c, bus/driver.c: port to the new message args API
* dbus/dbus-string.c (_dbus_string_init_const_len): initialize the
"locked" flag to TRUE and align_offset to 0; I guess we never
looked at these anyhow, but seems cleaner.
* dbus/dbus-string.h (_DBUS_STRING_ALLOCATION_PADDING):
move allocation padding macro to this header; use it to implement
(_DBUS_STRING_STATIC): ability to declare a static string.
* dbus/dbus-message.c (_dbus_message_has_type_interface_member):
change to return TRUE if the interface is not set.
* dbus/dbus-string.[hc]: move the D-BUS specific validation stuff
to dbus-marshal-validate.[hc]
* dbus/dbus-marshal-basic.c (_dbus_type_to_string): move here from
dbus-internals.c
* dbus/Makefile.am: cut over from dbus-marshal.[hc]
to dbus-marshal-*.[hc]
* dbus/dbus-object-tree.c (_dbus_decompose_path): move this
function here from dbus-marshal.c
2005-01-15 07:15:38 +00:00
|
|
|
libtool --mode=execute $DEBUG $DBUS_TOP_BUILDDIR/test/glib/test-dbus-glib || die "test-dbus-glib failed"
|
2004-11-27 02:18:36 +00:00
|
|
|
fi
|