test: add sim-yellow and sim-red envs for visual border verification
Two pio envs that build a tiny sketch reading /img.bin from LittleFS and calling epd_draw_image_with_border with the chosen color. Lets us verify the actual on-device pixel composition of the sync-fail (yellow) and no-WiFi (red) borders without standing up a server failure or pulling the WiFi cable. Each sim sets NVS err_border=1 before halting, so flashing back to the normal env afterwards exercises the 304 → clean repaint recovery path end-to-end. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -31,3 +31,36 @@ lib_deps =
|
||||
throwtheswitch/Unity@^2.6
|
||||
build_flags = -DUNIT_TEST -std=c++17 -iquote test/mocks -iquote test -Itest/mocks -Itest
|
||||
test_build_src = no
|
||||
|
||||
; Visual hardware tests for the sync-fail / no-WiFi border. Reads the cached
|
||||
; /img.bin from LittleFS and draws it with a yellow / red border. Sets
|
||||
; NVS err_border=1 so the next normal-firmware boot exercises the recovery
|
||||
; redraw via 304. Flow:
|
||||
; 1. pio run -e sim-yellow --target upload (see yellow border on hardware)
|
||||
; 2. pio run -e sim-red --target upload (see red border on hardware)
|
||||
; 3. pio run -e esp32dev --target upload (back to normal; verifies 304 recovery)
|
||||
[env:sim-yellow]
|
||||
platform = espressif32
|
||||
board = esp32dev
|
||||
framework = arduino
|
||||
monitor_speed = 115200
|
||||
upload_port = /dev/ttyUSB0
|
||||
monitor_port = /dev/ttyUSB0
|
||||
board_build.filesystem = littlefs
|
||||
build_flags = -DSIM_BORDER -DSIM_BORDER_COLOR=COLOR_YELLOW
|
||||
build_src_filter = +<epd.cpp> +<sim_border.cpp>
|
||||
lib_deps =
|
||||
ricmoo/QRCode@^0.0.1
|
||||
|
||||
[env:sim-red]
|
||||
platform = espressif32
|
||||
board = esp32dev
|
||||
framework = arduino
|
||||
monitor_speed = 115200
|
||||
upload_port = /dev/ttyUSB0
|
||||
monitor_port = /dev/ttyUSB0
|
||||
board_build.filesystem = littlefs
|
||||
build_flags = -DSIM_BORDER -DSIM_BORDER_COLOR=COLOR_RED
|
||||
build_src_filter = +<epd.cpp> +<sim_border.cpp>
|
||||
lib_deps =
|
||||
ricmoo/QRCode@^0.0.1
|
||||
|
||||
Reference in New Issue
Block a user