You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 96f7576
Browse filesBrowse the repository at this point in the historyBrowse files
test(dart): narrow the Android e2e helper to what the Flutter tool does not already do (#790)
From the scoped review of #883:
- `adb forward --remove-all` is host-wide (killforward-all drops every
device's listeners), so it took other tools' forwards with it. The helper
now removes only this emulator's entries from `adb forward --list`.
- `flutter run` force-stops, builds and installs on every launch
(android_device.dart startApp → stopApp, installApp), and
`flutter build apk --debug` builds three ABIs while `flutter run` builds
the device's, so the warm-up used to be replaced by the first launch.
The prebuild now targets the device's ABI (ro.product.cpu.abi); the
docstring, guide, KNOWN_ISSUES and spike notes say what it buys — a warm
Gradle cache and the first install — instead of describing it as a fix,
and the once-seen "ended without a stop" is labelled as seen once.
- `adb` errors now carry stderr (install failures report their reason),
and an incompatible installed APK is uninstalled once and retried, the
way flutter_tools does.
- adb discovery covers Android Studio's default SDK paths on macOS and
Linux; the emulator gate consults Flutter's device list before starting
an adb server.
- Both Flutter suites wait for a stop in `wait_for_stop` slices of at most
45 s: the MCP client caps a request at 60 s, and one long server-side
wait failed on the client side when a build kept the first stop away
for 63 s (seen on the emulator's integration case).
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: docs/dart/spike-notes.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -355,10 +355,10 @@ Measured through `dist/index.js` with `tests/e2e/mcp-server-smoke-flutter-androi
355
355
| Case | Result |
356
356
|---|---|
357
357
|`flutter run -d emulator-5554`, breakpoint in `build()`|`pending: true` at 2.5 s; the breakpoint at **21.3 s**; `_ProbeAppState.build`, `counter` → `0`; `continue` keeps it running; `close_debug_session` terminates the app |
358
-
| the same, first launch right after a fresh APK install | ended at 27.9 s with "The program ended without reporting an exit code" and no stop (once; the next launch was fine) — hence the up-front install and the force-stop before every launch|
358
+
| the same, first launch right after a fresh APK install | ended at 27.9 s with "The program ended without reporting an exit code" and no stop (once; the next launch was fine) — hence the helper's warm prebuild for the device's ABI and first install ahead of the timed cases; `flutter run` itself stops and reinstalls the app every time|
359
359
|`integration_test` on the emulator | test breakpoint at **28.3 s**, the app's `increment()` breakpoint at **28.7 s** on the test's tap, `counter` → `0`, `✓ device increment`, end `stopped` at 31.6 s |
360
360
361
361
-`flutter build apk --debug` on the fresh example with warm Gradle caches: **45 s**.
362
-
- Before each launch: `adb shell am force-stop com.example.flutter_probe`, `adb forward --remove-all`.
362
+
- Before each launch the helper force-stops a leftover instance and removes this emulator's own adb forwards (from `adb forward --list`; `adb forward --remove-all` is host-wide). Whether a stale forward ever caused the "device offline" failure is not established — the force-stop may be all that mattered.
363
363
- The proxy log records output events by shape only (issue #852): to read the device's output
364
364
after the fact, `get_output` before the session closes.
0 commit comments