Skip to content

Retry the release smoke test if ADB drops the emulator - #117

Merged
float3 merged 1 commit into
mainfrom
fix-release-smoke-test
Nov 4, 2026
Merged

float3 merged 1 commit into
mainfrom
fix-release-smoke-test

Conversation

@float3

@float3 float3 commented Nov 4, 2026

Copy link
Copy Markdown
Owner

What failed

"Android Emulator Test (36, x86_64, google_apis, 600, 0)" fails in the Run Release Smoke Test step on several PRs, after the main instrumented tests pass, e.g. #113 and the first attempt of #111 (it passed on rerun):

Failed to uninstall package com.ichi2.anki. Output:
 Error Output: adb: device 'emulator-5554' not found
> Task :baselineprofile:connectedBenchmarkBenchmarkAndroidTest FAILED
> There were failing tests.

Cause

Not the AnkiQuest branding: ReleaseSmokeTest reads the package from targetAppId, and the step passes on most PRs. ADB loses the emulator partway through the run, so the test never finishes and AGP reports it as failed. Upstream fixed this in ankidroid/Anki-Android@621a94b946 ("ci(emulator): retry the smoke test if ADB drops") with .github/run_release_smoke_test.py. It retries once, and only when ADB reconnected and the test reported no result. A real test failure is never retried, and a run that passes without any test result now fails.

The daily upstream sync brings that script and the change to tests_emulator.yml, but our copy, ankiquest_tests_emulator.yml, still calls Gradle directly.

Fix

  • Add .github/run_release_smoke_test.py, byte-identical to upstream, so the next sync merges cleanly.
  • Run it from ankiquest_tests_emulator.yml the way upstream's workflow does.

No upstream files change.

The release smoke step fails when ADB loses the emulator mid-run
("adb: device 'emulator-5554' not found"), although the app is fine.
Upstream fixed this in 621a94b by running the test through
.github/run_release_smoke_test.py, which retries once only if ADB
reconnected and the test never reported a result.

The upstream sync brings the script but not the change to our copy of
the emulator workflow, so add the script unchanged and call it from
ankiquest_tests_emulator.yml.
@float3
float3 merged commit 3c6dea6 into main Nov 4, 2026
39 checks passed
@float3
float3 deleted the fix-release-smoke-test branch November 4, 2026 15:27
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