ci(e2e): route matrix emulator + system-image install through the #389-hardened installer
The E2E (33) matrix leg deadlocked the merge queue for ~2h when android-emulator-runner's un-guarded "Create AVD and generate snapshot" step died with "Error on ZipFile unknown archive" installing a corrupt Android Emulator SDK zip. #389 hardened the platform/build-tools install (SHA-verify -> reject-corrupt -> purge -> re-download) but left the emulator + system-image install to the action, un-guarded. Pre-install "emulator" + "system-images;android-<api>;google_apis;x86_64" through setup_android_sdk.py before the emulator-runner steps, so a corrupt zip is self-healed here and the action then finds both packages already installed and skips its fragile fetch. Runs on both AVD-cache hit and miss (the emulator binary + image live under the SDK root, not the ~/.android AVD-snapshot cache, so they must be present for even a cached AVD to boot). Not added to the android-sdk-v1 cache (kept small); re-install is a fast sdkmanager no-op when already present. The e2e-preview (API 37) job already routes emulator + system image through the hardened installer, so no change there. setup_android_sdk.py already handles these package ids generically; add a unit assertion pinning the matrix's google_apis/x86_64 id to the correct purge path. Closes #443
This commit is contained in:
@@ -36,6 +36,13 @@ class PackageDirTests(unittest.TestCase):
|
||||
sdk.package_dir(root, "system-images;android-37.0;google_apis_ps16k;x86_64"),
|
||||
os.path.join(root, "system-images", "android-37.0", "google_apis_ps16k", "x86_64"),
|
||||
)
|
||||
# The matrix e2e legs (#443) pre-install the google_apis/x86_64 image for their API level
|
||||
# through this same installer, so a corrupt emulator/system-image zip is purged from the
|
||||
# right dir on retry — assert that (non-ps16k) id maps correctly too.
|
||||
self.assertEqual(
|
||||
sdk.package_dir(root, "system-images;android-33;google_apis;x86_64"),
|
||||
os.path.join(root, "system-images", "android-33", "google_apis", "x86_64"),
|
||||
)
|
||||
|
||||
def test_flat_ids_map_to_single_dir(self):
|
||||
root = os.path.join("opt", "sdk")
|
||||
|
||||
Reference in New Issue
Block a user