Skip to content

Android emulator tests: notice the emulator exiting, bound every wait, keep its log - #827

Merged
ASDAlexander77 merged 1 commit into
mainfrom
android-emulator-start-diag
Nov 12, 2026
Merged

ASDAlexander77 merged 1 commit into
mainfrom
android-emulator-start-diag

Conversation

@ASDAlexander77

Copy link
Copy Markdown
Owner

Release run 43225036000 (alpha125, attempt 2) sat in Run Android tests → Start the emulator for 25 minutes until I cancelled it.

What happened

The step's log stops after * daemon started successfully. At cleanup the runner killed two orphan adb processes but no emulator. So the emulator exited soon after it started, and adb wait-for-device, which has no time limit, waited for a device that would never come. Its reason is in emulator.log, which the job didn't print or keep.

Change

Start the emulator now:

  • prints /dev/kvm and emulator -accel-check first;
  • starts the adb server on its own, and the emulator with stdin from /dev/null;
  • every 5 s checks the emulator process is still alive, then asks for sys.boot_completed under a 10 s timeout. There is no unbounded wait-for-device any more;
  • if the emulator exits, prints its exit code and the whole emulator.log and fails. After 10 minutes it prints adb devices and the log's tail and fails.

emulator.log is also uploaded with the results.

Testing

This PR changes the workflow, so its own CI runs it against the newest published release's package. That run shows the real reason the emulator exits; a follow-up commit here fixes it.

🤖 Generated with Claude Code

…, keep its log

The alpha125 release run sat in "Start the emulator" for 25 minutes: the
emulator had exited (no emulator among the orphans at cleanup, only adb),
and `adb wait-for-device` has no limit. The step now polls the emulator
process and boot_completed with time limits, prints the emulator's log and
the KVM state when it fails, and the job keeps emulator.log.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ASDAlexander77
ASDAlexander77 merged commit 6599905 into main Nov 12, 2026
0 of 9 checks passed
@ASDAlexander77
ASDAlexander77 deleted the android-emulator-start-diag branch November 12, 2026 15:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant