# === These files must be included in any case ===
set(srcs "test_common.c"
         "test_app_main.c"
         "test_relay_chn_core.c"
         "test_relay_chn_listener.c")

if(CONFIG_RELAY_CHN_ENABLE_TILTING)
    list(APPEND srcs "test_relay_chn_tilt.c")
endif()

message(STATUS "srcs=${srcs}")

# In order for the cases defined by `TEST_CASE` to be linked into the final elf,
# the component can be registered as WHOLE_ARCHIVE
idf_component_register(
    SRCS ${srcs}
    INCLUDE_DIRS "."
    REQUIRES unity relay_chn app_trace
    WHOLE_ARCHIVE
)

set_source_files_properties(
    "test_common.c"
    "test_app_main.c"
    "test_relay_chn_core.c"
    "test_relay_chn_listener.c"
    PROPERTIES COMPILE_FLAGS --coverage)