NetDeck: headless test runner — unit + integration suites, E2E as separate build
- emulator/tests/: harness.h (TEST/EXPECT framework, input + serial + framebuffer helpers), shim_globals.cpp (shim externs for test binaries, replacing main.cpp ownership) - unit_tests.h (14): map/door/LOS/BFS/cover/link state machine/trace/ spike/reinforcement/win/loss/reset — deterministic fixed-seed, sim stepped tick by tick - integration_tests.h (7): keyboard->pollKeyboard->handleKey pipeline, beacon clicks -> squad movement, full network journey via clicks, hover-sever (incl. safe sever during trace), daemon gating - e2e_tests.cpp (separate NetDeck-e2e build): real setup()/loop() journeys with device-pipeline input injection (boot grace, 0x55 keyboard, GT911 tap, trackball ISRs), transcript + pixel assertions (HUD, freeze tint) - shim SerialSim: opt-in transcript ring for test assertions (off by default, interactive emulator unchanged) - make netdeck-test / -unit / -e2e (root) and make test / test-unit / test-e2e (emulator/); tests/README.md documents the structure - STATUS.md: test-structure note Verified: make netdeck-test -> 14 unit + 7 integration + 3 E2E, 0 failures
This commit is contained in:
@@ -134,6 +134,16 @@ squad through) completes in M4; until then the loss path + reset are the
|
||||
verifiable branches. On-device check still pending (inherits the M1
|
||||
checklist in §M1 above).
|
||||
|
||||
### Headless test structure
|
||||
|
||||
Tests live in `emulator/tests/` (see its README): **unit** +
|
||||
**integration** suites share one fast deterministic binary
|
||||
(`NetDeck-tests` — 21 tests, single-TU sketch inclusion, sim stepped tick by
|
||||
tick), and **E2E** is a separate build (`NetDeck-e2e`) driving the real
|
||||
`loop()` through the device input pipeline with transcript + pixel
|
||||
assertions. One command from the repo root: `make netdeck-test`
|
||||
(`make netdeck` builds both firmware + emulator).
|
||||
|
||||
### Source layout (this commit)
|
||||
|
||||
The sketch moved from `examples/NetDeck/NetDeck.ino` to
|
||||
|
||||
Reference in New Issue
Block a user