esp_adc:Trim the build components

If we don't trim the build components, the build system will import all
components which will increase the load of Gitlab server.

Closes IDF-7459
This commit is contained in:
Chen Jichang 2023-06-09 16:42:20 +08:00
parent 3d110437b9
commit 6abdc9b76e
2 changed files with 4 additions and 0 deletions

View File

@ -3,6 +3,9 @@ cmake_minimum_required(VERSION 3.16)
set(EXTRA_COMPONENT_DIRS "$ENV{IDF_PATH}/tools/unit-test-app/components")
# "Trim" the build. Include the minimal set of components, main, and anything it depends on.
set(COMPONENTS main)
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(adc_test)

View File

@ -9,4 +9,5 @@ set(srcs "test_app_main.c"
# In order for the cases defined by `TEST_CASE` to be linked into the final elf,
# the component can be registered as WHOLE_ARCHIVE
idf_component_register(SRCS ${srcs}
PRIV_REQUIRES driver esp_wifi nvs_flash esp_adc test_utils
WHOLE_ARCHIVE)