Break down tests into categories.

Break down tests into categories to improve maintainability and test granularity. This makes it easier to execute unit tests in CI/CD pipelines.

Closes #1054.
This commit is contained in:
2025-07-21 15:37:49 +03:00
parent a9a8169710
commit a143484748
12 changed files with 1705 additions and 2272 deletions

View File

@@ -1,3 +1,20 @@
idf_component_register(SRCS "test_relay_chn.c"
INCLUDE_DIRS "."
REQUIRES unity relay_chn)
# === 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
WHOLE_ARCHIVE
)