From 69f74c34a262485490cced31dc0875ceb7d2a81b Mon Sep 17 00:00:00 2001 From: Ivan Grokhotkov Date: Wed, 25 Sep 2024 12:50:23 +0200 Subject: [PATCH] fix(examples): remove stray EXTRA_COMPONENT_DIRS, fix check --- examples/storage/sd_card/sdspi/CMakeLists.txt | 1 - examples/storage/sd_card/sdspi/main/idf_component.yml | 3 +++ tools/ci/check_examples_extra_component_dirs.sh | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) create mode 100644 examples/storage/sd_card/sdspi/main/idf_component.yml diff --git a/examples/storage/sd_card/sdspi/CMakeLists.txt b/examples/storage/sd_card/sdspi/CMakeLists.txt index d41a683007..e140d48625 100644 --- a/examples/storage/sd_card/sdspi/CMakeLists.txt +++ b/examples/storage/sd_card/sdspi/CMakeLists.txt @@ -2,7 +2,6 @@ # in this exact order for cmake to work correctly cmake_minimum_required(VERSION 3.16) -list(APPEND EXTRA_COMPONENT_DIRS "$ENV{IDF_PATH}/examples/storage/sd_card/sdmmc/components/sd_card") set(COMPONENTS main) include($ENV{IDF_PATH}/tools/cmake/project.cmake) diff --git a/examples/storage/sd_card/sdspi/main/idf_component.yml b/examples/storage/sd_card/sdspi/main/idf_component.yml new file mode 100644 index 0000000000..b755a62b14 --- /dev/null +++ b/examples/storage/sd_card/sdspi/main/idf_component.yml @@ -0,0 +1,3 @@ +dependencies: + sd_card: + path: ${IDF_PATH}/examples/storage/sd_card/sdmmc/components/sd_card diff --git a/tools/ci/check_examples_extra_component_dirs.sh b/tools/ci/check_examples_extra_component_dirs.sh index 207efff7f4..ac71e5975a 100755 --- a/tools/ci/check_examples_extra_component_dirs.sh +++ b/tools/ci/check_examples_extra_component_dirs.sh @@ -5,7 +5,7 @@ set -uo pipefail # Examples shouldn't use EXTRA_COMPONENT_DIRS, instead the dependencies should be specified in idf_component.yml files output=$(find ${IDF_PATH}/examples -name "CMakeLists.txt" -not -path "**/managed_components/**" -not -path "**/build/**") -files=$(egrep "set\(EXTRA_COMPONENT_DIRS" ${output} | cut -d ":" -f 1) +files=$(egrep "EXTRA_COMPONENT_DIRS" ${output} | cut -d ":" -f 1) found_issues=0 for file in ${files} do