Files
lilygo-t-deck/Makefile
T
Dejvino a1d0730124 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
2026-11-14 13:02:41 +01:00

41 lines
1.5 KiB
Makefile

# T-Deck workspace — one common build command per app that builds BOTH
# targets (SDL2 emulator + ESP32-S3 firmware), so a change can never leave
# one of them silently broken.
#
# make netdeck build the NetDeck emulator AND the T-Deck firmware
# make netdeck-test run the full headless test suite:
# unit + integration (fast, deterministic)
# + E2E journeys (separate build, real loop(),
# ~1-2 min wall time)
# make netdeck-test-unit fast layer only
# make netdeck-test-e2e E2E layer only
#
# Firmware builds need platformio: either `pio` on PATH or the default
# ~/.platformio/penv/bin/pio install.
PIO := $(shell command -v pio 2>/dev/null || echo $(HOME)/.platformio/penv/bin/pio)
ifeq ($(wildcard $(PIO)),)
$(error pio not found — put it on PATH or install to ~/.platformio)
endif
netdeck:
@echo "=== [1/2] NetDeck firmware (ESP32-S3, pio) ==="
$(PIO) run -d examples/NetDeck
@echo "=== [2/2] NetDeck emulator (SDL2) ==="
$(MAKE) --no-print-directory -C emulator APP=NetDeck
@echo "=== both NetDeck targets built OK ==="
netdeck-test:
@echo "=== NetDeck tests: unit + integration + E2E ==="
$(MAKE) --no-print-directory -C emulator APP=NetDeck test
$(MAKE) --no-print-directory -C emulator APP=NetDeck test-e2e
netdeck-test-unit:
$(MAKE) --no-print-directory -C emulator APP=NetDeck test
netdeck-test-e2e:
$(MAKE) --no-print-directory -C emulator APP=NetDeck test-e2e
.PHONY: netdeck netdeck-test netdeck-test-unit netdeck-test-e2e