summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Ohly <patrick.ohly@intel.com>2015-03-03 00:49:25 -0800
committerPatrick Ohly <patrick.ohly@intel.com>2015-03-03 10:15:44 +0100
commitf192b140eb800aee5f80c9a5163356a6b2dec980 (patch)
treed4160f25d55005d7561b5b102b364adf877b9cde
parentf7b19f645ed6c3b28fd694a400799b71361c4300 (diff)
wrappercheck.sh: add --wait-for-dbus-daemon
EDS 3.12 on Ubuntu Vivid no longer prints the message about obtaining the D-Bus name. Instead we need to wait for it to show up on the session bus.
-rwxr-xr-xtest/wrappercheck.sh13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/wrappercheck.sh b/test/wrappercheck.sh
index b1ae1032..e2f7c070 100755
--- a/test/wrappercheck.sh
+++ b/test/wrappercheck.sh
@@ -20,6 +20,7 @@ trap "[ \"$PIDS\" ] && kill -INT $PIDS" INT
DAEMON_LOG=
WAIT_FOR_DAEMON_OUTPUT=
+WAIT_FOR_DBUS_DAEMON=
declare -a BACKGROUND
declare -a ENV
@@ -30,6 +31,10 @@ while [ $# -gt 1 ] && [ "$1" != "--" ] ; do
shift
DAEMON_LOG="$1"
;;
+ --wait-for-dbus-daemon)
+ shift
+ WAIT_FOR_DBUS_DAEMON="$1"
+ ;;
--wait-for-daemon-output)
shift
WAIT_FOR_DAEMON_OUTPUT="$1"
@@ -78,6 +83,14 @@ if [ "$DAEMON_LOG" ] && [ "$WAIT_FOR_DAEMON_OUTPUT" ]; then
)
fi
+if [ "$WAIT_FOR_DBUS_DAEMON" ]; then
+ ( set +x; echo >&2 "*** waiting for daemon to connect to D-Bus as '$WAIT_FOR_DBUS_DAEMON'"
+ while ! (dbus-send --session --print-reply --dest=org.freedesktop.DBus /org/freedesktop/DBus org.freedesktop.DBus.ListNames | grep -q "$WAIT_FOR_DBUS_DAEMON"); do
+ sleep 1
+ done
+ )
+fi
+
if kill -0 $BACKGROUND_PID 2>/dev/null; then
set +e
if [ "$DAEMON_SLEEP" ]; then