diff --git a/scripts/e2e-test.sh b/scripts/e2e-test.sh index 46de4a2..98da824 100755 --- a/scripts/e2e-test.sh +++ b/scripts/e2e-test.sh @@ -68,11 +68,18 @@ start_emulator() { -gpu swiftshader_indirect \ -no-snapshot \ & + EMU_PID=$! + + sleep 5 + if ! kill -0 "$EMU_PID" 2>/dev/null; then + echo "ERROR: Emulator process died during startup" + exit 1 + fi } wait_for_emulator() { echo "--- Waiting for emulator boot ---" - adb wait-for-device + timeout 60 adb wait-for-device timeout 240 bash -c ' while [ "$(adb shell getprop sys.boot_completed 2>/dev/null | tr -d "\r")" != "1" ]; do sleep 2