Move the board profile tests into the native Unity suite

The board tests ran through tools/test-board-profile.sh with their own stubs, assert() and a script that copied nine method bodies out of Transceiver.cpp, so they were outside pio test -e native and the coverage report.

Pure decisions now live in units the native env builds: BoardProfile::usesPin is constexpr, RadioReadiness decides register validity, the receive-state outcome (ready, retry or unavailable, with one try today) and whether a queued job may transmit, and ShadeGpioGuard decides whether a shade's outputs touch a board pad. Transceiver and ShadeGpio call them with identical behaviour. New Unity suites cover the generic and LILYGO profiles (reserved pads, startup order, radio bring-up) and the readiness unit; the old harness, its script, CI step and stubs are deleted.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
R. Sid Shaytay 2026-11-14 18:46:33 -08:00
parent 2b3d556729
commit 28af01195a
No known key found for this signature in database
27 changed files with 595 additions and 517 deletions

14
src/ShadeGpioGuard.h Normal file
View file

@ -0,0 +1,14 @@
#ifndef SHADE_GPIO_GUARD_H
#define SHADE_GPIO_GUARD_H
#include "BoardProfile.h"
#include "SomfyFrame.h"
// A backup may carry GPIO assignments from another board. Whether a shade's
// outputs would drive a pad the board's own hardware uses. Header only so the
// native tests can build it for a given board; free of the shade model.
inline bool shadeOutputsUseBoardPins(radio_proto proto, uint8_t up, uint8_t down, uint8_t my) {
if(proto != radio_proto::GP_Relay && proto != radio_proto::GP_Remote) return false;
return BoardProfile::usesPin(up) || BoardProfile::usesPin(down) ||
(proto == radio_proto::GP_Remote && BoardProfile::usesPin(my));
}
#endif