Skip to content

Commit 37051d0

Browse files
author
Jake Perkins
committed
act
1 parent db78229 commit 37051d0

1 file changed

Lines changed: 13 additions & 8 deletions

File tree

.github/actions/setup-e2e-env/action.yml

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff 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+

0 commit comments

Comments
 (0)