Skip to content

Commit b514916

Browse files
committed
Restore scripts/wait_for_emulator.sh
This script is used as part of our test suite for Travis CI, and is needed to prevent the build from failing. (Or to be more accurate, to allow the tests to run at all.)
1 parent d1b59bf commit b514916

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

scripts/wait_for_emulator.sh

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#!/bin/bash
2+
3+
bootanim=""
4+
failcounter=0
5+
until [[ "$bootanim" =~ "stopped" ]]; do
6+
bootanim=`adb -e shell getprop init.svc.bootanim 2>&1`
7+
echo "$bootanim"
8+
if [[ "$bootanim" =~ "not found" ]]; then
9+
let "failcounter += 1"
10+
if [[ $failcounter -gt 3 ]]; then
11+
echo "Failed to start emulator"
12+
exit 1
13+
fi
14+
fi
15+
sleep 1
16+
done
17+
echo "Done"

0 commit comments

Comments
 (0)