File tree Expand file tree Collapse file tree
.github/actions/setup-e2e-env Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -326,22 +326,27 @@ runs:
326326 - name : Wait for Android Emulator to Boot
327327 if : ${{ inputs.platform == 'android' }}
328328 run : |
329+ echo "Waiting for emulator to be ready..."
329330 adb wait-for-device
331+
330332 bootanim=""
331333 timeout=300 # 5 minutes in seconds
332334 elapsed=0
333335
334- until [[ "$bootanim" == *"stopped"* || "$ elapsed" -ge "$timeout" ]]; do
335- bootanim=$(adb shell getprop init.svc.bootanim 2>/dev/null)
336+ while [[ "$elapsed" -lt "$timeout" ]]; do
337+ bootanim=$(adb shell getprop init.svc.bootanim 2>/dev/null || echo "unknown" )
336338 echo "Waiting for emulator... ($bootanim) (${elapsed}s elapsed)"
339+
340+ if [[ "$bootanim" == *"stopped"* ]]; then
341+ echo "✅ Emulator booted successfully"
342+ exit 0
343+ fi
344+
337345 sleep 5
338346 elapsed=$((elapsed + 5))
339347 done
340348
341- if [[ "$bootanim" != *"stopped"* ]]; then
342- echo "❌ Timeout waiting for emulator to boot"
343- exit 1
344- fi
345-
346- echo "✅ Emulator booted successfully"
349+ echo "❌ Timeout waiting for emulator to boot"
350+ exit 1
347351 shell : bash
352+
You can’t perform that action at this time.
0 commit comments