Skip to content

Commit

Permalink
Do not use tailf to wait for qemu
Browse files Browse the repository at this point in the history
The linux-runner hangs on travis, instead of using tailf to wait for
qemu, we grep the log directly. This stopped the hang.
  • Loading branch information
malbarbo committed Oct 9, 2018
1 parent bb071d0 commit 657aee7
Showing 1 changed file with 18 additions and 2 deletions.
20 changes: 18 additions & 2 deletions docker/linux-runner
Original file line number Diff line number Diff line change
Expand Up @@ -70,13 +70,29 @@ esac
fi

# wait for dropbear
tailf $LOG | grep -m1 "Not backgrounding" > /dev/null
for i in $(seq 240); do
if grep -q "Not backgrounding" $LOG; then
READY=1
break
fi
sleep 0.5s
done

if [ -z "$READY" ]; then
if [ -n "$CROSS_DEBUG" ]; then
echo "Not ready but continuing because CROSS_DEBUG is set"
else
echo "Qemu is not ready..."
echo "Set the environment variable CROSS_DEBUG=1 to debug"
exit 1
fi
fi

echo Booted in $(dbclient -K 1 -p 10022 -y -y root@localhost "cut -d' ' -f1 /proc/uptime") seconds

) 200>$LOCK

exec dbclient \
dbclient \
-t \
-p 10022 \
-y -y \
Expand Down

0 comments on commit 657aee7

Please sign in to comment.