summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJonny Lamb <jonny.lamb@collabora.co.uk>2011-04-14 08:31:53 +0100
committerJonny Lamb <jonny.lamb@collabora.co.uk>2011-04-14 08:37:15 +0100
commit45858050c710529f4e1e2fe287843646957c0d65 (patch)
tree4bf3cda2da2c401bbe034a802340fc9f1bc73303 /tests
parent2d4a80431798de35008ee20b0317d11377e8c21b (diff)
tests: add an exec-with-log script for running salut tests
Signed-off-by: Jonny Lamb <jonny.lamb@collabora.co.uk>
Diffstat (limited to 'tests')
-rw-r--r--tests/twisted/tools/Makefile.am10
-rw-r--r--tests/twisted/tools/org.freedesktop.Telepathy.ConnectionManager.salut.service.in2
-rw-r--r--tests/twisted/tools/run_and_bt.gdb3
-rwxr-xr-xtests/twisted/tools/salut-exec-with-log.sh.in31
4 files changed, 42 insertions, 4 deletions
diff --git a/tests/twisted/tools/Makefile.am b/tests/twisted/tools/Makefile.am
index faa58bb..0b3582e 100644
--- a/tests/twisted/tools/Makefile.am
+++ b/tests/twisted/tools/Makefile.am
@@ -12,17 +12,21 @@ conf_files = $(conf_in_files:.conf.in=.conf)
BUILT_SOURCES = \
$(service_files) \
$(conf_files) \
- exec-with-log.sh
+ exec-with-log.sh \
+ salut-exec-with-log.sh
EXTRA_DIST = \
$(service_in_files) \
$(conf_in_files) \
exec-with-log.sh.in \
+ salut-exec-with-log.sh.in \
fake-startup.sh \
valgrind.supp \
- with-session-bus.sh
+ with-session-bus.sh \
+ run_and_bt.gdb
CLEANFILES = \
$(BUILT_SOURCES) \
missioncontrol.log \
- missioncontrol-*.log
+ missioncontrol-*.log \
+ salut-testing.log
diff --git a/tests/twisted/tools/org.freedesktop.Telepathy.ConnectionManager.salut.service.in b/tests/twisted/tools/org.freedesktop.Telepathy.ConnectionManager.salut.service.in
index e9a6edf..5524a2a 100644
--- a/tests/twisted/tools/org.freedesktop.Telepathy.ConnectionManager.salut.service.in
+++ b/tests/twisted/tools/org.freedesktop.Telepathy.ConnectionManager.salut.service.in
@@ -1,3 +1,3 @@
[D-BUS Service]
Name=org.freedesktop.Telepathy.ConnectionManager.salut
-Exec=@SALUT_EXECUTABLE@
+Exec=/bin/sh @abs_top_builddir@/tests/twisted/tools/salut-exec-with-log.sh
diff --git a/tests/twisted/tools/run_and_bt.gdb b/tests/twisted/tools/run_and_bt.gdb
new file mode 100644
index 0000000..527fee3
--- /dev/null
+++ b/tests/twisted/tools/run_and_bt.gdb
@@ -0,0 +1,3 @@
+run
+bt full
+quit
diff --git a/tests/twisted/tools/salut-exec-with-log.sh.in b/tests/twisted/tools/salut-exec-with-log.sh.in
new file mode 100755
index 0000000..9584ea0
--- /dev/null
+++ b/tests/twisted/tools/salut-exec-with-log.sh.in
@@ -0,0 +1,31 @@
+#!/bin/sh
+
+cd "@abs_top_builddir@/tests/twisted/tools"
+
+export SALUT_DEBUG=all GIBBER_DEBUG=all WOCKY_DEBUG=all
+export G_SLICE=debug-blocks
+ulimit -c unlimited
+exec >> salut-testing.log 2>&1
+
+if test -n "$SALUT_TEST_VALGRIND"; then
+ export G_DEBUG=gc-friendly
+ export G_SLICE=always-malloc
+ SALUT_WRAPPER="valgrind --leak-check=full --num-callers=20"
+elif test -n "$SALUT_TEST_REFDBG"; then
+ if test -z "$REFDBG_OPTIONS" ; then
+ export REFDBG_OPTIONS="btnum=10"
+ fi
+ if test -z "$SALUT_WRAPPER" ; then
+ SALUT_WRAPPER="refdbg"
+ fi
+elif test -n "$SALUT_TEST_BACKTRACE"; then
+ SALUT_WRAPPER="gdb -q -x run_and_bt.gdb"
+fi
+
+if ! test -n "$SALUT_TEST_REAL_AVAHI"; then
+ # The bus-daemon that is activating us doesn't know it's also the system bus
+ export DBUS_SYSTEM_BUS_ADDRESS="$DBUS_SESSION_BUS_ADDRESS"
+fi
+
+export G_DEBUG=fatal-warnings" ${G_DEBUG}"
+exec @abs_top_builddir@/libtool --mode=execute $SALUT_WRAPPER @SALUT_EXECUTABLE@