Files
fantemp/test/CMakeLists.txt
T
BlackMarkandClaude Opus 5.5 c58ff23e90 console: each command carries its summary, and dispatch names it, -166 B
The help text was thirteen help_row(N) calls and the dispatch thirteen
case N labels, both counting positions in a list defined elsewhere. A
command is now one row of name and summary; the summaries become a second
NUL-separated flash blob printed in a loop, and every case label is
command_index("name"), which does not compile for a name the list lacks.
The help column derives from the longest name, the dotted padding is one
helper for labels and help rows alike, and the ADC scale, the monitor
interval and the uptime units are named. Output is unchanged; the image
goes from 8004 B to 7838 B, both modes byte-identical. The 32-bit
narrowing in dev/tasks.md is re-measured against the new image.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-23 21:50:01 +02:00

35 lines
1.6 KiB
CMake

libavr_format_test()
# The image must stay below the boot section at 0x7e00, and the README states
# what it measures; a library advance that moves it says nothing on its own.
libavr_size_claim_test(fantemp 7838)
# The README says the two modes emit the same image, and only a tree with
# both built can say whether they do.
libavr_mode_identity_test(fantemp)
# The battery is a compile: a static_assert that fails is the failure. It is a
# target rather than only a ctest so a plain build catches a regression too.
add_library(consteval_tests OBJECT consteval.cpp)
target_include_directories(consteval_tests PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../src)
target_link_libraries(consteval_tests PRIVATE libavr)
add_test(NAME fantemp.consteval
COMMAND ${CMAKE_COMMAND} --build ${CMAKE_BINARY_DIR} --target consteval_tests)
# The board has no reset line and no programming header, so the loader-entry
# route in the emitted image is the only thing standing between a firmware change
# and an unreflashable board.
# A check whose interpreter this host lacks is registered and *skips*, rather
# than leaving the suite a different size on a different machine - which is a
# suite nothing can be compared against. The launcher and the marker are
# libavr's (`cmake/checks.cmake`).
libavr_launcher(_python "${LIBAVR_NO_PYTHON}" ${Python3_EXECUTABLE})
add_test(NAME fantemp.reachability
COMMAND ${_python} ${CMAKE_CURRENT_SOURCE_DIR}/check_reachability.py
--objdump ${CMAKE_OBJDUMP} --elf $<TARGET_FILE:fantemp>
--image $<TARGET_FILE_DIR:fantemp>/fantemp.bin
--loader-base ${PUREBOOT_BASE_HEX})
libavr_skip_unverified()