libavr's guidance binds this repo too, and until now nothing here checked it - `ctest` runs `libavr_format_test()` over this tree's own sources now (rules 11 and 33), skipping rather than passing where clang-format is absent. It caught drift on its first run: a file written this week and edited after formatting. Where the README states a measured size, `libavr_size_claim_test()` holds it to the image and holds the image to the prose: advancing the library pin moved three of these across the fleet with nothing saying so, and re-recording one now requires the sentence that quotes it to move too. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
24 lines
1.1 KiB
CMake
24 lines
1.1 KiB
CMake
libavr_format_test()
|
|
|
|
# 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.
|
|
find_package(Python3 COMPONENTS Interpreter)
|
|
if(Python3_FOUND)
|
|
add_test(NAME fantemp.reachability
|
|
COMMAND ${Python3_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/check_reachability.py
|
|
--objdump ${CMAKE_OBJDUMP} --elf $<TARGET_FILE:fantemp>
|
|
--image $<TARGET_FILE_DIR:fantemp>/fantemp.bin)
|
|
else()
|
|
message(STATUS "Python not found - the reachability check is skipped")
|
|
endif()
|