Skip to content

Commit d25c21a

Browse files
committed
Merge pull request google#18 from tjohns/master
Restore scripts/wait_for_emulator.sh
2 parents b963114 + b514916 commit d25c21a

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)