Skip to content

Commit 4167ace

Browse files
committed
test: require self-healing Android lab adb bootstrap
1 parent c2beb66 commit 4167ace

1 file changed

Lines changed: 13 additions & 7 deletions

File tree

tests/native_android_avd_cache_contract_test.py

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,9 @@
66
prime = (ROOT / "scripts/prime_android_lab_adb.sh").read_text(encoding="utf-8")
77

88
# The emulator image/snapshot is a Lab infrastructure artifact. It must not be
9-
# invalidated whenever an official Nuvio app commit advances; the app is built
10-
# and installed after the AVD is available.
9+
# invalidated whenever an official Nuvio app commit advances; the guest userdata
10+
# is deliberately retained so a warm Lab can reuse the installed client/profile
11+
# and provider cache instead of recreating the device on every run.
1112
assert "avd-v3-${{ runner.os }}-mobile-api35-google_apis-x86_64-pixel_2" in workflow
1213
assert "avd-v3-${{ runner.os }}-tv-api31-android-tv-x86-tv_1080p" in workflow
1314
for line in workflow.splitlines():
@@ -16,11 +17,16 @@
1617
assert "needs.resolve.outputs.tv_sha" not in line
1718
assert "needs.resolve.outputs.runtime_fingerprint" not in line
1819

19-
# Every Android emulator path primes adb before the emulator action. The
20-
# preflight repairs common hosted-runner ADB state, but it is intentionally not
21-
# an acceptance gate: ReactiveCircus is still allowed to launch the AVD and
22-
# establish its own bridge when host-side adb priming is transiently degraded.
20+
# Every Android emulator path primes adb before the emulator action. GitHub's
21+
# hosted image can expose sdkmanager while platform-tools/adb is still absent,
22+
# so the preflight must install platform-tools itself before QEMU is launched.
23+
# This remains Lab-only and best-effort: a transient host-side failure does not
24+
# mutate Nuvio and the emulator action still gets a chance to establish ADB.
2325
assert workflow.count("bash niakvio/scripts/prime_android_lab_adb.sh") >= 3
26+
assert "sdkmanager" in prime
27+
assert "--install platform-tools" in prime
28+
assert "ANDROID_SDK_ROOT" in prime
29+
assert "ANDROID_HOME" in prime
2430
assert "unset ADB_SERVER_SOCKET" in prime
2531
assert "adb kill-server" in prime
2632
assert "adb start-server" in prime
@@ -29,4 +35,4 @@
2935
assert "status=degraded" in prime
3036
assert "runtime_mutation=false" in prime
3137

32-
print("native Android AVD cache + resilient adb bootstrap contract passed")
38+
print("native Android AVD persistence + resilient adb bootstrap contract passed")

0 commit comments

Comments
 (0)