dbus/test/glib run-test.sh,1.8,1.9 .cvsignore,1.4,1.5
Colin Walters
walters at freedesktop.org
Sat Mar 12 08:33:02 PST 2005
- Previous message: dbus ChangeLog, 1.632.2.11, 1.632.2.12 NEWS, 1.18.2.3,
1.18.2.4 configure.in, 1.102.2.3, 1.102.2.4
- Next message: dbus/glib Makefile.am,1.14,1.15 .cvsignore,1.6,1.7
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvs/dbus/dbus/test/glib
In directory gabe:/tmp/cvs-serv7493/test/glib
Modified Files:
run-test.sh .cvsignore
Log Message:
2005-03-11 Colin Walters <walters at verbum.org>
* glib/Makefile.am: Generate dbus-glib-bindings.h and
install it.
* bus/print-introspect.c: New file; prints introspection
data for a given name and object path.
* bus/run-with-tmp-session-bus.sh: New file, refactored
from test/glib/run-test.sh. Creates a temporary session
bus and runs another program.
* test/glib/run-test.sh: Refactor to invoke
run-with-tmp-session-bus.sh.
* bus/driver.c (bus_driver_handle_introspect): Fix to print new
introspection format. Also change to use DBUS_TYPE_x_AS_STRING
macros instead of hardcoding.
* glib/.cvsignore, bus/.cvsignore, test/glib/.cvsignore: Update.
Index: run-test.sh
===================================================================
RCS file: /cvs/dbus/dbus/test/glib/run-test.sh,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- run-test.sh 30 Jan 2005 07:44:08 -0000 1.8
+++ run-test.sh 12 Mar 2005 16:33:00 -0000 1.9
@@ -3,59 +3,16 @@
SCRIPTNAME=$0
MODE=$1
-function die()
-{
- if ! test -z "$DBUS_SESSION_BUS_PID" ; then
- echo "killing message bus "$DBUS_SESSION_BUS_PID
- kill -9 $DBUS_SESSION_BUS_PID
- fi
- echo $SCRIPTNAME: $* >&2
- exit 1
-}
-
-if test -z "$DBUS_TOP_BUILDDIR" ; then
- die "Must set DBUS_TOP_BUILDDIR"
-fi
-
-## convenient to be able to ctrl+C without leaking the message bus process
-trap 'die "Received SIGINT"' SIGINT
-
-CONFIG_FILE=./run-test.conf
-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"
-
-## create a configuration file based on the standard session.conf
-cat $DBUS_TOP_BUILDDIR/bus/session.conf | \
- sed -e 's/<servicedir>.*$/<servicedir>'$ESCAPED_SERVICE_DIR'<\/servicedir>/g' | \
- sed -e 's/<include.*$//g' \
- > $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
-
-unset DBUS_SESSION_BUS_ADDRESS
-unset DBUS_SESSION_BUS_PID
-
-echo "Using daemon "`type dbus-daemon`
-
-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"
-
## so the tests can complain if you fail to use the script to launch them
export DBUS_TEST_GLIB_RUN_TEST_SCRIPT=1
+# 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
+ exec $DBUS_TOP_BUILDDIR/bus/run-with-tmp-session-bus.sh $SCRIPTNAME $MODE
+fi
+
if test x$MODE = xprofile ; then
echo "profiling type $PROFILE_TYPE"
sleep 2 ## this lets the bus get started so its startup time doesn't affect the profile too much
@@ -77,14 +34,3 @@
echo "running test-dbus-glib"
libtool --mode=execute $DEBUG $DBUS_TOP_BUILDDIR/test/glib/test-dbus-glib || die "test-dbus-glib failed"
fi
-
-## 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
Index: .cvsignore
===================================================================
RCS file: /cvs/dbus/dbus/test/glib/.cvsignore,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- .cvsignore 17 Feb 2005 21:25:49 -0000 1.4
+++ .cvsignore 12 Mar 2005 16:33:00 -0000 1.5
@@ -10,3 +10,4 @@
run-test.conf
test-service-glib-bindings.h
test-service-glib-glue.h
+run-with-tmp-session-bus.conf
- Previous message: dbus ChangeLog, 1.632.2.11, 1.632.2.12 NEWS, 1.18.2.3,
1.18.2.4 configure.in, 1.102.2.3, 1.102.2.4
- Next message: dbus/glib Makefile.am,1.14,1.15 .cvsignore,1.6,1.7
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the dbus-commit
mailing list