refactor: mock serial platform backend in test_serial
test_serial mocked log_write.h, which serial.c never calls. Split celrs_serial into celrs_serial (platform-agnostic logic) and celrs_serial_platform (real Win/POSIX backend), matching the celrs_logger/celrs_log_write split. test_serial now mocks celrs/platform/serial_internal.h and links only celrs_serial, so the list-ports tests verify the max_ports clamping and pass-through logic without hitting the real registry or /dev.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
add_executable(telemetry telemetry.c)
|
||||
target_include_directories(telemetry PRIVATE "${CMAKE_SOURCE_DIR}")
|
||||
target_compile_features(telemetry PRIVATE c_std_23)
|
||||
target_link_libraries(telemetry PRIVATE celrs_crsf celrs_serial celrs_logger celrs_log_write)
|
||||
target_link_libraries(telemetry PRIVATE celrs_crsf celrs_serial celrs_serial_platform celrs_logger celrs_log_write)
|
||||
|
||||
Reference in New Issue
Block a user