This patch adds some log output to know when weston is ready
or when a timeout is reached.
Change-Id: I217aa26a0b9d3b46e73dc55bef8dbc3e673c53c4
Signed-off-by: Stephane Desneux <stephane.desneux@iot.bzh>
usage="Usage: weston-ready [-t timeout]"
timeout=0
usage="Usage: weston-ready [-t timeout]"
timeout=0
+function info() { echo "$@" >&2; }
+
if [ $# -eq 2 ]; then
if [ $1 = "-t" ]; then
timeout=$(($2 * 10))
if [ $# -eq 2 ]; then
if [ $1 = "-t" ]; then
timeout=$(($2 * 10))
+info "using timeout $timeout"
+
time=0
rc=1
while true; do
if [ $time -gt $timeout ]; then
time=0
rc=1
while true; do
if [ $time -gt $timeout ]; then
break
elif LayerManagerControl get screens >/dev/null 2>&1; then
break
elif LayerManagerControl get screens >/dev/null 2>&1; then
+ info "Weston is now ready"
if [ $timeout -gt 0 ]; then
usleep 500000
fi
if [ $timeout -gt 0 ]; then
usleep 500000
fi