[tracker/functional-test-improvements: 1/5] functional-tests: Run tests inside an isolated DBus instance



commit f7e82e33e0876c31471769ff9442a1c6f61884fb
Author: Sam Thursfield <samthursfield codethink co uk>
Date:   Thu Aug 4 17:43:40 2011 +0100

    functional-tests: Run tests inside an isolated DBus instance

 tests/functional-tests/test-runner.sh |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/tests/functional-tests/test-runner.sh b/tests/functional-tests/test-runner.sh
index d240f16..c6d7846 100755
--- a/tests/functional-tests/test-runner.sh
+++ b/tests/functional-tests/test-runner.sh
@@ -2,11 +2,19 @@
 #
 # Test runner script for Tracker's functional tests
 
+DBUS_SESSION_BUS_PID=
+
 if test -h /targets/links/scratchbox.config ; then
     export SBOX_REDIRECT_IGNORE=/usr/bin/python ;
 
     meego-run $@
 else
+    eval `dbus-launch --sh-syntax`
+
+    trap "/bin/kill $DBUS_SESSION_BUS_PID; exit" INT
+
     echo "Running $@"
     $@
+
+    kill $DBUS_SESSION_BUS_PID
 fi ;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]