[Telepathy-commits] [telepathy-glib/master] with-session-bus.sh: optionally sleep after running the test

Simon McVittie simon.mcvittie at collabora.co.uk
Tue Jan 20 09:55:58 PST 2009


This is useful for the telepathy-gabble tests, to let Gabble exit
gracefully rather than being killed by libdbus when dbus-daemon exits;
exiting gracefully means that coverage data gets saved.
---
 tools/with-session-bus.sh |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/tools/with-session-bus.sh b/tools/with-session-bus.sh
index 519b9b1..9e3ecbe 100644
--- a/tools/with-session-bus.sh
+++ b/tools/with-session-bus.sh
@@ -15,6 +15,7 @@ set -e
 me=with-session-bus
 
 dbus_daemon_args="--print-address=5 --print-pid=6 --fork"
+sleep=0
 
 usage ()
 {
@@ -29,6 +30,11 @@ usage ()
 
 while test "z$1" != "z--"; do
   case "$1" in
+  --sleep=*)
+    sleep="$1"
+    sleep="${sleep#--sleep=}"
+    shift
+    ;;
   --session)
     dbus_daemon_args="$dbus_daemon_args --session"
     shift
@@ -78,6 +84,10 @@ fi
 
 "$@" || e=$?
 
+if test $sleep != 0; then
+  sleep $sleep
+fi
+
 trap - INT HUP TERM
 cleanup
 
-- 
1.5.6.5




More information about the Telepathy-commits mailing list