Extend autotest to cover all UART commands except OTA upload.

Add led_ring, find_me, restart, and ota_progress steps plus uart_cmds scenario.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-05-19 22:41:23 +02:00
co-authored by Cursor
parent a9e08107b4
commit 95d5a9747a
7 changed files with 390 additions and 1 deletions
+20 -1
View File
@@ -44,6 +44,19 @@ Ordered steps: UART commands, delays, or esptool reset.
**unicast_test**`input`: `slave` or `client_id`, `seq`
`expect`: `success`, `seq`
**led_ring**`input`: `mode` (`clear`, `progress`, `digit`, `blink`, `find_me`), `progress`, `digit`, `r`/`g`/`b`, `intensity`, `blink_ms`, `blink_count`
`expect`: `success`, `mode`, `progress`, `digit`
**find_me**`input`: `client` / `client_id` or `slave` (`0` = master ring)
`expect`: `success`
**restart**`input`: `client` / `client_id` or `slave` (prefer slave in tests so UART stays up)
`expect`: `success`
**ota_progress** — query `OTA_SLAVE_PROGRESS` (no firmware upload)
`input`: optional `client_id` / `slave`
`expect`: `active` (typically `false` when idle)
**reset** — esptool hard-reset via console port from bench config (no `expect`).
`input`: `target` (`master`) or `slave` (`pod-1`), or `all: true`; optional `wait_ms` after each reset (default 2000).
@@ -56,13 +69,19 @@ Example reset steps:
Requires `python -m esptool` or `esptool.py` on PATH (ESP-IDF).
The `smoke` scenario resets every node with a configured `console` port, waits **10 s** for boot and ESP-NOW join, then runs the UART checks.
The `smoke` scenario resets every node with a configured `console` port, waits **10 s** for boot and ESP-NOW join, then runs a short UART smoke test.
The **`uart_cmds`** scenario covers all implemented UART commands **except OTA upload** (`OTA_START` / `OTA_PAYLOAD` / `OTA_END` / `OTA_START_ESPNOW`). It ends with a slave **restart** (master UART stays connected).
`CLIENT_INPUT` is not tested (not implemented in firmware).
### Example
```bash
cd goTool
go run . test -config example-lab -scenario smoke
go run . test -config example-lab -scenario uart_cmds
go run . test -config my-lab -scenario smoke -port /dev/ttyUSB1
go run . test -list-configs
go run . test -list-scenarios
```