diff options
| author | cirakg <cirakg@cirakg.xyz> | 2026-10-26 14:52:06 +0100 |
|---|---|---|
| committer | cirakg <cirakg@cirakg.xyz> | 2026-10-26 14:52:06 +0100 |
| commit | 5913e3c104c2aa34cc1eb21523419edb437373c4 (patch) | |
| tree | 662f1aadf820df7f1fad234388eac4d851feb3ea | |
| parent | 096eebab2add4faba4cd04ab81d325deca17af15 (diff) | |
build: test on the Forerunner 70 only by default; ALL=1 for every device
Unit tests, perf, memory, lint builds, screenshots and the watchdog test
run on the owner's Forerunner 70 alone unless ALL=1 is given, which
keeps runs and screenshot reviews short (8 instead of 65 minutes for
the screenshots). make build defaults to the Forerunner 70 too.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
| -rw-r--r-- | Makefile | 20 | ||||
| -rw-r--r-- | README.md | 4 | ||||
| -rw-r--r-- | docs/DEVELOPER_GUIDE.md | 6 | ||||
| -rw-r--r-- | docs/TESTING.md | 2 |
4 files changed, 21 insertions, 11 deletions
@@ -33,16 +33,26 @@ UV_VERSION := 0.13.1 # Connect IQ SDK installed by `make sdk`. SDK_VERSION ?= 9.2.0 # Device for `make build` and `make sim`. -DEVICE ?= fr255s -# Simulator test devices: weakest round MIP (buttons only), rectangular AMOLED, -# your Forerunner 70, and a large round AMOLED. +DEVICE ?= fr70 +# Test devices. By default only the owner's Forerunner 70: unit tests, perf, +# memory, lint builds, screenshots and the watchdog test all run on it alone, +# which keeps runs (and screenshot reviews) short. `make <target> ALL=1` uses +# the full set below, for example before a release. +ALL ?= +ifeq ($(ALL),1) +# Weakest round MIP (buttons only), rectangular AMOLED, the Forerunner 70, +# and a large round AMOLED. TEST_DEVICES ?= fr255s venusq2 fr70 fr965 # Extra screenshot-only devices (README 14): MIP with touch and buttons, # buttons-only AMOLED, the largest rectangle. SPOT_DEVICES ?= fenix7 instinct3amoled45mm venux1 -# `make watchdog`: one device per watchdog class (120,000 and 240,000 -# bytecodes per event). +# One device per watchdog class (120,000 and 240,000 bytecodes per event). WATCHDOG_DEVICES ?= fr255s fr70 +else +TEST_DEVICES ?= fr70 +SPOT_DEVICES ?= +WATCHDOG_DEVICES ?= fr70 +endif # `make lock` only uses package releases published before this moment. LOCK_CUTOFF ?= 2026-10-01T00:00:00Z # Set to `nuke` to skip the confirmation prompt of `make nuke`. @@ -688,7 +688,7 @@ stateDiagram-v2 - **Manifest**: type `watch-app`, `minApiLevel` 5.0.0, no permissions, English. - **Products**: generated in M0 from the downloaded device definitions: every watch with API 5.0 or newer and at least 512 KB for watch apps. That includes fēnix 7, 8 and E; epix 2; Forerunner 165, 255, 265, 570, 955, 965 and 970; Venu 2, 3, 4, Sq 2 and X1; vívoactive 5 and 6; Instinct 3 AMOLED; Enduro 3; and related MARQ, quatix, tactix, D2, Descent and Approach models. -- **Simulator test devices** (`TEST_DEVICES` in the Makefile): +- **Simulator test devices**: by default every test target runs on the Forerunner 70 only (the owner's watch), to keep runs and screenshot reviews short. `make <target> ALL=1` uses the full set below (`TEST_DEVICES`, `SPOT_DEVICES` and `WATCHDOG_DEVICES` in the Makefile), for example before a release: - Forerunner 255S: the weakest target (218 px round MIP, buttons only, 512 KB). - Venu Sq 2: rectangular AMOLED with touch. - Forerunner 70: your watch (390 px round AMOLED, touch and buttons). @@ -737,7 +737,7 @@ The Garmin SDK and device files are never baked into an image (Garmin's licence) | `make image` | Build the Docker images | yes | | `make sdk` | Licence, login, download the SDK and device files | yes (Garmin only) | | `make key` | Generate the developer key (never overwrites an existing one) | no | -| `make build` | Debug build for `DEVICE` (default `fr255s`) | no | +| `make build` | Debug build for `DEVICE` (default `fr70`) | no | | `make test` | Unit tests in the headless simulator on the 3 test devices | no | | `make sim` | Run the app in the simulator; view it at http://127.0.0.1:6080/vnc.html | localhost only | | `make screenshots` | Scripted UI flow with a screenshot of every screen on `TEST_DEVICES` and `SPOT_DEVICES` (barcode decoding from M6) | no | diff --git a/docs/DEVELOPER_GUIDE.md b/docs/DEVELOPER_GUIDE.md index a100404..74eff63 100644 --- a/docs/DEVELOPER_GUIDE.md +++ b/docs/DEVELOPER_GUIDE.md @@ -31,7 +31,7 @@ Everything runs in Docker through the `Makefile`; the host needs only Docker and | Everything, in order | `make ci` | | A shell in the container | `make shell` | -Use other devices with `TEST_DEVICES="fr70 venu3"` on any target that takes a device list. Every target runs serially, even under `make -j`. +By default every target that takes a device list runs on the Forerunner 70 only (`DEVICE`, `TEST_DEVICES` and `WATCHDOG_DEVICES` are `fr70`, `SPOT_DEVICES` is empty). Add `ALL=1` for the full set (Forerunner 255S, Venu Sq 2, Forerunner 70 and 965, plus fēnix 7, Instinct 3 AMOLED and Venu X1 for screenshots, and the 255S for the watchdog), or name devices with `TEST_DEVICES="fr70 venu3"`. The goldens of the other watches are only refreshed by an `ALL=1` run, so they may lag behind the Forerunner 70's. Every target runs serially, even under `make -j`. ## Repository layout @@ -111,7 +111,7 @@ The simulator is a GTK program. The scripts start it on a virtual display (Xvfb ### Screenshots and the UI flow -`make screenshots` builds both UI-test variants and runs `tools/ui_flow.py` on every device in `TEST_DEVICES` and `SPOT_DEVICES`: the main flow, the glance with its code, the extra scenario, then the glance without a code. All seven watches take about 65 minutes; the Forerunner 70 alone (`make screenshots TEST_DEVICES=fr70 SPOT_DEVICES=`) about 8. +`make screenshots` builds both UI-test variants and runs `tools/ui_flow.py` on every device in `TEST_DEVICES` and `SPOT_DEVICES`: the main flow, the glance with its code, the extra scenario, then the glance without a code. The Forerunner 70 alone (the default) takes about 8 minutes; all seven watches (`ALL=1`) about 65. 1. **Input.** The flow clicks the buttons where the device's `simulator.json` draws them. It taps and swipes on touch screens, and long-presses for the menu where there's no MENU button. 2. **Waiting.** After each input it waits for the screen's `DIAG shown <screen>` line. The list and the OTP screen print it only once every visible code is drawn. @@ -137,7 +137,7 @@ Debug builds print `DIAG first_frame startup_ms=... mem_used=... mem_total=...` ## Adding things - **A device**: add `<iq:product id="..."/>` to `manifest.xml`, then `make sdk` (downloads its files), `make icons` and `make products` (checks it meets the target rule: a watch, API 5.0 or newer, at least 512 KB, and the watchdog the job runner assumes for its memory). -- **A test device**: add it to `TEST_DEVICES` (unit tests, perf and screenshots) or `SPOT_DEVICES` (screenshots only) in the `Makefile`. Then run `make screenshots`, review `build/screenshots/<device>/`, and run `make screenshots-approve`. +- **A test device**: add it to the `ALL=1` lists of `TEST_DEVICES` (unit tests, perf and screenshots) or `SPOT_DEVICES` (screenshots only) in the `Makefile`. Then run `make screenshots`, review `build/screenshots/<device>/`, and run `make screenshots-approve`. - **A screen in the UI flow**: print `Diag.shown("<name>")` after its first complete draw, add the steps to `run_flow` in `tools/ui_flow.py`, and approve the new goldens after reviewing them. - **Import inputs**: new parser cases go into `test/import/` (fixtures are built in `ImportSupport.mc`, all fake). To widen the fuzz corpus, change the seeds or mutations in `tools/gen_fuzz_corpus.py` and run `make corpus`. The Python tests check that the committed corpus matches the generator. - **A settings form or field**: diff --git a/docs/TESTING.md b/docs/TESTING.md index 40c6925..4443a90 100644 --- a/docs/TESTING.md +++ b/docs/TESTING.md @@ -18,7 +18,7 @@ The full test plan is in [README section 17](../README.md#17-test-plan). This do | Packaging | `make package` | The signed `.iq` builds for all 72 products with zero warnings | | Docs | `make docs` | No broken links or anchors, no Markdown lint issues, every Mermaid diagram renders | -Test devices (`TEST_DEVICES`): Forerunner 255S (weakest: 218 px round MIP, buttons only, 512 KB), Venu Sq 2 (rectangular AMOLED), Forerunner 70 (your watch) and Forerunner 965 (454 px round AMOLED). +Test devices: the Forerunner 70 by default; with `ALL=1` (`TEST_DEVICES`): Forerunner 255S (weakest: 218 px round MIP, buttons only, 512 KB), Venu Sq 2 (rectangular AMOLED), Forerunner 70 (your watch) and Forerunner 965 (454 px round AMOLED). ## Test vectors |
