android-test: headless emulator default for GUI smokes
Default EMULATOR_HEADLESS=1 (-no-window, QT offscreen) while guest GLES still runs via SwiftShader. Auto-start AVD when no adb device; WINDOWED=1 for a host window on laptops.
This commit is contained in:
parent
a935f69582
commit
91b79ab807
8 changed files with 320 additions and 59 deletions
|
|
@ -120,6 +120,39 @@ Automation can run on hosts that support **Android only**, **GUI tooling only**
|
|||
| `AUTO_ANDROID` | `0` / `1` | Run Android wallet automation (adb, APK, emulator/device) |
|
||||
| `AUTO_GUI` | `0` / `1` | Drive **graphical** UI (uiautomator taps, multi-round). If `0`, deep-link/CLI-only install smoke. |
|
||||
| `AUTO_PLATFORM` | `auto` / `linux` / `macos` / `ios` | Host family (optional override) |
|
||||
| `EMULATOR_HEADLESS` | **`1` (default)** / `0` | No host window (`-no-window`). Server/CI-safe. |
|
||||
| `WINDOWED` | `0` / `1` | Shortcut: `WINDOWED=1` ⇒ show emulator window (`EMULATOR_HEADLESS=0`) |
|
||||
| `EMULATOR_GPU` | default **`swiftshader_indirect`** | Guest GLES still runs headless (layout/taps/screenshots). Override `host` only if windowed + real GPU. |
|
||||
| `AUTO_START_EMULATOR` | **`1` (default)** / `0` | If no adb device, start AVD via `start-android-emulator.sh --wait` |
|
||||
|
||||
---
|
||||
|
||||
## Headless mode (default)
|
||||
|
||||
**Default for all GUI / pay smokes:** no window on the host. Opening an emulator
|
||||
GUI on servers (or headless CI) is wrong; these scripts therefore start the AVD
|
||||
with **`-no-window`** and still keep **graphics logic** in the guest:
|
||||
|
||||
| Piece | Headless default |
|
||||
|-------|------------------|
|
||||
| Host window | **off** (`-no-window`, `QT_QPA_PLATFORM=offscreen`, no `DISPLAY`) |
|
||||
| Guest GLES | **on** via **SwiftShader** (`-gpu swiftshader_indirect`) |
|
||||
| UI automation | **on** — `uiautomator` dump/tap + `screencap` (no X11 needed) |
|
||||
| Audio / boot anim | off (`-no-audio -no-boot-anim`) |
|
||||
|
||||
```bash
|
||||
# explicit (same as default)
|
||||
./start-android-emulator.sh --wait
|
||||
|
||||
# or let smoke auto-start headless AVD when no phone is plugged in
|
||||
STACK=goa ./run-android-gui-smoke.sh
|
||||
|
||||
# laptop: show the emulator window
|
||||
WINDOWED=1 ./start-android-emulator.sh --wait
|
||||
# or: EMULATOR_HEADLESS=0 EMULATOR_GPU=host ./start-android-emulator.sh --wait
|
||||
```
|
||||
|
||||
Shared code: `lib_android_env.sh` + `start-android-emulator.sh`.
|
||||
|
||||
**Semantics:**
|
||||
|
||||
|
|
@ -203,6 +236,8 @@ Scripts **today** implement Android only; they should honour:
|
|||
| `run-android-gui-smoke.sh` | Multi-round GUI drive |
|
||||
| `run-goa-gui-chain.sh` | Multi mint/withdraw/pay (gui-workflows port) |
|
||||
| `run-android-build-and-smoke.sh` | Build inference fix branch + smoke (`GUI=1` optional) |
|
||||
| `start-android-emulator.sh` | Start AVD (**headless default**, SwiftShader) |
|
||||
| `lib_android_env.sh` | Flags, PATH, `android_ensure_device` |
|
||||
| `lib_ui.py` | Dump/tap/ANR helpers |
|
||||
|
||||
---
|
||||
|
|
@ -233,6 +268,7 @@ Scripts **today** implement Android only; they should honour:
|
|||
- [x] Minimalvariante: was geht / was nicht (Beschränkungen)
|
||||
- [x] Two stacks (goa / stage)
|
||||
- [x] Flags design (`AUTO_ANDROID` / `AUTO_GUI` / platform defaults)
|
||||
- [x] **Headless emulator default** (`EMULATOR_HEADLESS=1`, SwiftShader)
|
||||
- [x] Linux default = Android suite only
|
||||
- [x] Inference-branch policy
|
||||
- [ ] Wrapper enforces flags in every entry script (incremental)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue