build(gmd): cap managed-device emulators to 1 concurrent (serial) to avoid local VT-x contention
The e2e Gradle Managed Device group spans api29-36 and org.gradle.parallel=true is set, so a local e2eGroupDebugAndroidTest (or preflight's api36DebugAndroidTest) can launch several emulators at once. They contend for the same VT-x/HAXM virtualization slot on a single machine and hang at 0% CPU with "another emulator instance is running". Set android.experimental.testOptions.managedDevices.maxConcurrentDevices=1 in gradle.properties to force GMD emulator runs serial locally. CI is unaffected: its e2e matrix boots one emulator per API level on separate GitHub Actions runners via reactivecircus/android-emulator-runner and connectedDebugAndroidTest, not these Gradle Managed Device tasks, so the cap doesn't apply there regardless. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -9,3 +9,14 @@ android.useAndroidX=true
|
|||||||
# Kotlin (built-in Kotlin is enabled by default in AGP 9; the Kotlin version is set
|
# Kotlin (built-in Kotlin is enabled by default in AGP 9; the Kotlin version is set
|
||||||
# via the buildscript classpath in the root build.gradle.kts).
|
# via the buildscript classpath in the root build.gradle.kts).
|
||||||
kotlin.code.style=official
|
kotlin.code.style=official
|
||||||
|
|
||||||
|
# Gradle Managed Devices (app/build.gradle.kts `testOptions.managedDevices`): cap the number
|
||||||
|
# of emulators Gradle boots at once to 1. The `e2e` device group spans api29-36 and
|
||||||
|
# org.gradle.parallel=true is on, so without this cap a local `e2eGroupDebugAndroidTest` (or
|
||||||
|
# the /preflight skill) can launch several emulators concurrently; they contend for the same
|
||||||
|
# hardware VT-x/HAXM virtualization slot and hang at 0% CPU ("another emulator instance is
|
||||||
|
# running"). This forces GMD emulator runs to be serial on a single machine. Does not affect
|
||||||
|
# CI: the `e2e` matrix in .github/workflows/ci.yml runs each API level's emulator on its own
|
||||||
|
# GitHub Actions runner via reactivecircus/android-emulator-runner + connectedDebugAndroidTest,
|
||||||
|
# not via these Gradle Managed Device tasks, so this cap has no effect there either way.
|
||||||
|
android.experimental.testOptions.managedDevices.maxConcurrentDevices=1
|
||||||
|
|||||||
Reference in New Issue
Block a user