spaxel/firmware
jedarden 128024c415
Some checks are pending
CI Benchmark - Fusion Loop Timing / Fusion Loop Timing Benchmark (push) Waiting to run
test: add firmware host harness header — TEST() macro + assert macros
Child 1 of the bf-56v harness split (grandparent bf-4ne). Establishes
the public header API (firmware/test/test_runner.h) that every test unit
and the runner compile against:

- TEST(name): declares a void body plus a GCC constructor
  (__attribute__((constructor))) that self-registers it via
  test_register(name, fn) before main() runs — so a new test_*.c is
  picked up with zero SOURCES edits.
- ASSERT_EQ / ASSERT_TRUE / ASSERT_FALSE: on mismatch, call
  test_record_failure(file, line, fmt...) which longjmp()s back to the
  per-test setjmp (the live jmp target lives in test_runner.c, a later
  child) — aborting only the current test, not the whole suite.
- Prototypes for test_register(const char*, test_fn) and
  test_record_failure(...).

Header comment records the bf-21t decision (gcc host harness, not
ESP-IDF --target linux: csi.c/provision.c are blocked by esp_wifi.h /
driver/uart.h, which have no linux build, and main is one component)
and names the single run command ('make -C firmware/test test') that a
later child makes real.

Self-contained: only libc (setjmp.h, stdbool.h, stdint.h); no
firmware/main/* includes; no main(). A trivial includer using TEST(x){}
compiles cleanly with 'gcc -std=c11 -Wall -Wextra -c'.

test_runner.c, the Makefile, and the sanity test belong to sibling
beads and are intentionally not part of this commit.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-07-03 06:57:58 -04:00
..
main fix(provision): re-broadcast SPAXEL READY every 1s during window 2026-06-05 18:23:25 -04:00
test test: add firmware host harness header — TEST() macro + assert macros 2026-07-03 06:57:58 -04:00
CMakeLists.txt feat(firmware): OTA SHA-256 verification and captive portal URL decoding 2026-03-28 19:56:11 -04:00
dependencies.lock Fix ESP-IDF 5.x firmware compilation for ESP32-S3 build 2026-04-14 15:35:03 -04:00
partitions.csv fix(firmware): redesign partition table for 4MB flash; fix flash size in esptool.js 2026-04-17 10:40:58 -04:00
sdkconfig.defaults fix(firmware): redesign partition table for 4MB flash; fix flash size in esptool.js 2026-04-17 10:40:58 -04:00