test-infra: reliable local instrumented-test helper (connectedDebugAndroidTest + emulator hygiene) #280

Merged
JMR-dev merged 3 commits from test-infra-269-local-instrumented-helper into main 2026-07-04 04:29:07 +00:00
3 Commits
Author SHA1 Message Date
Jason Ross fc78d81886 Merge main into test-infra-269-local-instrumented-helper 2026-07-03 23:10:33 -05:00
Jason Ross 633b3a94e2 Merge main into test-infra-269-local-instrumented-helper 2026-07-03 22:56:08 -05:00
JMR-devandClaude Opus 4.8 e006600424 test-infra: reliable local instrumented-test helper (connectedDebugAndroidTest + emulator hygiene)
Local Gradle Managed Device tasks (apiXXDebugAndroidTest) fail on this machine:
GMD's AVD snapshot step times out under AEHD 2.2
(AvdSnapshotHandler$EmulatorSnapshotCannotCreatedException), though the emulator
itself boots fine. CI is unaffected (it uses connectedDebugAndroidTest, not GMD).

Add .claude/skills/preflight/local_instrumented.sh, which cold-boots ONE emulator
by hand (-no-snapshot, no GMD) and runs :app:connectedDebugAndroidTest filtered to
a targeted set of test classes -- the same technique CI and api37_e2e.py already use.

The helper is deliberately targeted (the full ~114-test suite tends to wedge mid-run
on this box) and enforces emulator hygiene: it force-kills stray qemu/emulator
processes before booting, tears the emulator down afterward, and exits non-zero if an
orphaned qemu-system-x86_64-headless.exe survives -- accumulated orphans have frozen
this machine. Ships with a documented header and a short sibling README.

Closes #269

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-03 22:54:37 -05:00