e9f2ec0629
Extract the pre-first-image retry from normal_operation() into a templated bootstrap_loop() helper in operation.h so the loop body becomes unit-testable. Add four tests against it: two that verify the X-Panel-Id header is sent on every poll and matches the compile-time PANEL_ID (a silent server-side mis-routing risk if dropped), and two that exercise the loop's exit-on-deep-sleep vs. iterate-while-204 behaviour. Wire --coverage into env:native-test (compile + link via a post-script) so `gcovr -r . --filter src/` produces a real number, and ignore the stray *.gcov files gcovr drops at the repo root. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
7 lines
337 B
Python
7 lines
337 B
Python
# Adds --coverage to the link step for env:native-test, so gcov's runtime
|
|
# (libgcov) gets linked alongside the instrumented objects. build_flags
|
|
# already pushes --coverage through compile; the linker needs it too or
|
|
# the program fails with undefined references to __gcov_init / etc.
|
|
Import("env")
|
|
env.Append(LINKFLAGS=["--coverage"])
|