mirror of
https://github.com/espressif/esp-idf.git
synced 2026-10-02 11:10:54 +03:00
fix(cmakev2/test): correct indentation in testing CMakeLists.txt
Fixes: 3488300671da ("feat(cmakev2/test): add simple test for toolchain set..")
Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
This commit is contained in:
@@ -24,41 +24,41 @@ function(test_component_priority)
|
|||||||
|
|
||||||
# Check that idf component is between discovered components.
|
# Check that idf component is between discovered components.
|
||||||
__get_component_interface(COMPONENT "${component_name}"
|
__get_component_interface(COMPONENT "${component_name}"
|
||||||
OUTPUT component_interface)
|
OUTPUT component_interface)
|
||||||
if("${component_interface}" STREQUAL "NOTFOUND")
|
if("${component_interface}" STREQUAL "NOTFOUND")
|
||||||
idf_die("Component '${component_name}' not found")
|
idf_die("Component '${component_name}' not found")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Check that idf component has "idf_components" as source.
|
# Check that idf component has "idf_components" as source.
|
||||||
idf_component_get_property(component_source
|
idf_component_get_property(component_source
|
||||||
${component_interface}
|
${component_interface}
|
||||||
COMPONENT_SOURCE)
|
COMPONENT_SOURCE)
|
||||||
if(NOT "${component_source}" STREQUAL "idf_components")
|
if(NOT "${component_source}" STREQUAL "idf_components")
|
||||||
idf_die("Unexpected idf component '${component_name}' source '${component_source}'")
|
idf_die("Unexpected idf component '${component_name}' source '${component_source}'")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Create fake component with same name as idf component.
|
# Create fake component with same name as idf component.
|
||||||
set(component_dir "${CMAKE_CURRENT_BINARY_DIR}/${component_name}")
|
set(component_dir "${CMAKE_CURRENT_BINARY_DIR}/${component_name}")
|
||||||
file(MAKE_DIRECTORY "${component_dir}")
|
file(MAKE_DIRECTORY "${component_dir}")
|
||||||
file(TOUCH "${component_dir}/CMakeLists.txt")
|
file(TOUCH "${component_dir}/CMakeLists.txt")
|
||||||
|
|
||||||
# Initialize fake component with higher "project_components" priority.
|
# Initialize fake component with higher "project_components" priority.
|
||||||
idf_build_get_property(component_prefix PREFIX)
|
idf_build_get_property(component_prefix PREFIX)
|
||||||
__init_component(DIRECTORY "${component_dir}"
|
__init_component(DIRECTORY "${component_dir}"
|
||||||
PREFIX "${component_prefix}"
|
PREFIX "${component_prefix}"
|
||||||
SOURCE "project_components")
|
SOURCE "project_components")
|
||||||
|
|
||||||
# Check that the idf component was replaced with fake component.
|
# Check that the idf component was replaced with fake component.
|
||||||
idf_component_get_property(component_source
|
idf_component_get_property(component_source
|
||||||
${component_interface}
|
${component_interface}
|
||||||
COMPONENT_SOURCE)
|
COMPONENT_SOURCE)
|
||||||
if(NOT "${component_source}" STREQUAL "project_components")
|
if(NOT "${component_source}" STREQUAL "project_components")
|
||||||
idf_die("Unexpected fake component '${component_name}' source '${component_source}'")
|
idf_die("Unexpected fake component '${component_name}' source '${component_source}'")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
idf_component_get_property(component_dir
|
idf_component_get_property(component_dir
|
||||||
${component_interface}
|
${component_interface}
|
||||||
COMPONENT_DIR)
|
COMPONENT_DIR)
|
||||||
if(NOT "${component_dir}" STREQUAL "${CMAKE_CURRENT_BINARY_DIR}/${component_name}")
|
if(NOT "${component_dir}" STREQUAL "${CMAKE_CURRENT_BINARY_DIR}/${component_name}")
|
||||||
idf_die("Unexpected fake component '${component_name}' directory '${component_dir}'")
|
idf_die("Unexpected fake component '${component_name}' directory '${component_dir}'")
|
||||||
endif()
|
endif()
|
||||||
|
|||||||
Reference in New Issue
Block a user