Skip to content

Commit

Permalink
Merge branch 'bugfix/exclude_component_dirs_pacman' into 'master'
Browse files Browse the repository at this point in the history
build: fix excluded components being passed to component manager

Closes PACMAN-422

See merge request espressif/esp-idf!19443
  • Loading branch information
igrr committed Aug 10, 2022
2 parents 03bce37 + 3b7eee3 commit afc6fba
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
8 changes: 8 additions & 0 deletions tools/ci/test_build_system_cmake.sh
Expand Up @@ -936,6 +936,14 @@ endmenu\n" >> ${IDF_PATH}/Kconfig
mv CMakeLists.bak CMakeLists.txt # revert previous modifications
rm -rf extra_dir components

print_status "Components in EXCLUDE_COMPONENTS not passed to idf_component_manager"
clean_build_dir
idf.py create-component -C components/ to_be_excluded || failure "Failed to create a component"
echo "invalid syntax..." > components/to_be_excluded/idf_component.yml
! idf.py reconfigure || failure "Build should have failed due to invalid syntax in idf_component.yml"
idf.py -DEXCLUDE_COMPONENTS=to_be_excluded reconfigure || failure "Build should have succeeded when the component is excluded"
rm -rf components/to_be_excluded

print_status "Create project using idf.py and build it"
echo "Trying to create project."
(idf.py -C projects create-project temp_test_project) || failure "Failed to create the project."
Expand Down
6 changes: 2 additions & 4 deletions tools/cmake/build.cmake
Expand Up @@ -494,10 +494,8 @@ macro(idf_build_process target)
set(local_components_list_file ${build_dir}/local_components_list.temp.yml)

set(__contents "components:\n")
idf_build_get_property(__component_targets __COMPONENT_TARGETS)
foreach(__component_target ${__component_targets})
__component_get_property(__component_name ${__component_target} COMPONENT_NAME)
__component_get_property(__component_dir ${__component_target} COMPONENT_DIR)
foreach(__component_name ${components})
idf_component_get_property(__component_dir ${__component_name} COMPONENT_DIR)
set(__contents "${__contents} - name: \"${__component_name}\"\n path: \"${__component_dir}\"\n")
endforeach()

Expand Down

0 comments on commit afc6fba

Please sign in to comment.