change(test_apps): decouple g1_components from BUILD_COMPONENTS property

The BUILD_COMPONENTS build property only exists when building through the
Build system v1 compatibility shim. Query the executable library
interface's linked-components list instead, so the app does not depend on
compatibility-only properties.
This commit is contained in:
Sudeep Mohanty
2026-08-18 10:29:04 +02:00
parent 78d3f61757
commit d519de14d1

View File

@@ -126,7 +126,12 @@ set(expected_components
list(SORT expected_components)
idf_build_get_property(build_components BUILD_COMPONENTS)
if(IDF_BUILD_V2)
get_target_property(library ${project_elf} LIBRARY_INTERFACE)
idf_library_get_property(build_components "${library}" LIBRARY_COMPONENTS_LINKED)
else()
idf_build_get_property(build_components BUILD_COMPONENTS)
endif()
list(SORT build_components)
if(NOT "${expected_components}" STREQUAL "${build_components}")