Add bench UART ports and cold-start reset to goTool autotest.

Bench configs define command and console serial paths; scenarios can
reset nodes via esptool before tests. Smoke resets all nodes then waits
for ESP-NOW join.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-05-18 23:44:58 +02:00
co-authored by Cursor
parent d24b0cb5c3
commit 0299ba44fd
10 changed files with 268 additions and 45 deletions
+6 -5
View File
@@ -31,15 +31,16 @@ go run . -port /dev/ttyUSB0 clients
### Automated tests
Bench **configs** (`testdata/configs/`) list master/slave MACs. **Scenarios** (`testdata/scenarios/`) run a sequence of the same UART commands with `input` / `expect` checks.
Bench **configs** (`testdata/configs/`) list network, MACs, and serial ports (`uart.master` for commands, `*_console` for esptool reset). **Scenarios** run UART commands plus optional `reset` steps.
```bash
go run . -port /dev/ttyUSB0 test -list-configs
go run . -port /dev/ttyUSB0 test -list-scenarios
go run . -port /dev/ttyUSB0 test -config example-lab -scenario smoke
go run . -port /dev/ttyUSB0 test -config testdata/configs/my-lab.json -scenario smoke -v
go run . test -list-configs
go run . test -config example-lab -scenario smoke
go run . test -config my-lab -scenario smoke -port /dev/ttyUSB1 -v
```
With a complete bench config, `-port` is optional for `test` (uses `uart.master` from JSON).
See [`testdata/README.md`](testdata/README.md) for the JSON schema.
```bash