From 9eb6f68454ab5bcc945810abaec5cffef3088cdb Mon Sep 17 00:00:00 2001 From: Frantisek Hrbata Date: Fri, 28 Feb 2025 12:30:57 +0100 Subject: [PATCH] fix(build): include test components in the minimal build When minimal build is enabled, it only includes the main component and its dependencies. This leads to test components specified through TEST_COMPONENTS being ignored, meaning no tests are executed. The issue arises because test components are also checked against the COMPONENTS variable, and if they aren't listed there, they are disregarded. To fix this, explicitly add TEST_COMPONENTS to COMPONENTS when the minimal build is enabled. Closes https://github.com/espressif/esp-idf/issues/15485 Signed-off-by: Frantisek Hrbata --- tools/cmake/project.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/cmake/project.cmake b/tools/cmake/project.cmake index cfb95b95ce..a8f3cea063 100644 --- a/tools/cmake/project.cmake +++ b/tools/cmake/project.cmake @@ -504,7 +504,7 @@ function(__project_init components_var test_components_var) message(WARNING "The MINIMAL_BUILD property is disregarded because the COMPONENTS variable is defined.") set(minimal_build OFF) else() - set(COMPONENTS main) + set(COMPONENTS main ${TEST_COMPONENTS}) set(minimal_build ON) endif() else()