summaryrefslogtreecommitdiff
path: root/ci/wait_for_emulator.sh
diff options
context:
space:
mode:
Diffstat (limited to 'ci/wait_for_emulator.sh')
-rw-r--r--ci/wait_for_emulator.sh17
1 files changed, 17 insertions, 0 deletions
diff --git a/ci/wait_for_emulator.sh b/ci/wait_for_emulator.sh
new file mode 100644
index 000000000..317883878
--- /dev/null
+++ b/ci/wait_for_emulator.sh
@@ -0,0 +1,17 @@
+#!/bin/bash
+
+bootanim=""
+failcounter=0
+until [[ "$bootanim" =~ "stopped" ]]; do
+ bootanim=`adb -e shell getprop init.svc.bootanim 2>&1`
+ echo "$bootanim"
+ if [[ "$bootanim" =~ "not found" ]]; then
+ let "failcounter += 1"
+ if [[ $failcounter -gt 3 ]]; then
+ echo "Failed to start emulator"
+ exit 1
+ fi
+ fi
+ sleep 1
+done
+echo "Done"