diff --git a/components/driver/test_apps/legacy_i2c_driver/CMakeLists.txt b/components/driver/test_apps/legacy_i2c_driver/CMakeLists.txt index 1864548037b1..7f6a4ab7bc6e 100644 --- a/components/driver/test_apps/legacy_i2c_driver/CMakeLists.txt +++ b/components/driver/test_apps/legacy_i2c_driver/CMakeLists.txt @@ -5,6 +5,10 @@ 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. We also depend on esp_pm +# as we set CONFIG_PM_... options. +set(COMPONENTS main esp_pm) + include($ENV{IDF_PATH}/tools/cmake/project.cmake) project(legacy_i2c_test) diff --git a/components/driver/test_apps/legacy_i2c_driver/main/CMakeLists.txt b/components/driver/test_apps/legacy_i2c_driver/main/CMakeLists.txt index 23741b95bc2c..008413a56776 100644 --- a/components/driver/test_apps/legacy_i2c_driver/main/CMakeLists.txt +++ b/components/driver/test_apps/legacy_i2c_driver/main/CMakeLists.txt @@ -3,4 +3,5 @@ set(srcs "test_app_main.c" ) idf_component_register(SRCS ${srcs} + PRIV_REQUIRES unity test_utils driver WHOLE_ARCHIVE) diff --git a/components/driver/test_apps/legacy_i2c_driver/sdkconfig.ci.defaults b/components/driver/test_apps/legacy_i2c_driver/sdkconfig.ci.defaults index b308cb2ddda0..e69de29bb2d1 100644 --- a/components/driver/test_apps/legacy_i2c_driver/sdkconfig.ci.defaults +++ b/components/driver/test_apps/legacy_i2c_driver/sdkconfig.ci.defaults @@ -1,2 +0,0 @@ -CONFIG_FREERTOS_HZ=1000 -CONFIG_ESP_TASK_WDT=n diff --git a/components/esp_hw_support/test_apps/dma/CMakeLists.txt b/components/esp_hw_support/test_apps/dma/CMakeLists.txt index e87048a21165..42e63786a1c7 100644 --- a/components/esp_hw_support/test_apps/dma/CMakeLists.txt +++ b/components/esp_hw_support/test_apps/dma/CMakeLists.txt @@ -2,4 +2,9 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) + +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. We also depend on esp_psram +# as we set CONFIG_SPIRAM_... options. +set(COMPONENTS main esp_psram) + project(dma_test) diff --git a/components/esp_hw_support/test_apps/dma/main/CMakeLists.txt b/components/esp_hw_support/test_apps/dma/main/CMakeLists.txt index 0fb8a69f5093..4088442971ea 100644 --- a/components/esp_hw_support/test_apps/dma/main/CMakeLists.txt +++ b/components/esp_hw_support/test_apps/dma/main/CMakeLists.txt @@ -11,4 +11,5 @@ endif() # 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 unity WHOLE_ARCHIVE) diff --git a/components/esp_hw_support/test_apps/etm/CMakeLists.txt b/components/esp_hw_support/test_apps/etm/CMakeLists.txt index d5c75a52b3a0..0d009db6795f 100644 --- a/components/esp_hw_support/test_apps/etm/CMakeLists.txt +++ b/components/esp_hw_support/test_apps/etm/CMakeLists.txt @@ -2,4 +2,9 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) + +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. We also depend on esp_pm +# as we set CONFIG_PM_... options. +set(COMPONENTS main esp_pm) + project(etm_test) diff --git a/components/esp_hw_support/test_apps/etm/main/CMakeLists.txt b/components/esp_hw_support/test_apps/etm/main/CMakeLists.txt index e824508d65e6..14c910836c8e 100644 --- a/components/esp_hw_support/test_apps/etm/main/CMakeLists.txt +++ b/components/esp_hw_support/test_apps/etm/main/CMakeLists.txt @@ -24,4 +24,5 @@ endif() # 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 unity esp_timer driver WHOLE_ARCHIVE) diff --git a/components/esp_hw_support/test_apps/mspi/CMakeLists.txt b/components/esp_hw_support/test_apps/mspi/CMakeLists.txt index ecada2191feb..af6aff96e790 100644 --- a/components/esp_hw_support/test_apps/mspi/CMakeLists.txt +++ b/components/esp_hw_support/test_apps/mspi/CMakeLists.txt @@ -2,4 +2,9 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) + +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. We also depend on esp_psram +# as we set CONFIG_SPIRAM_... options. +set(COMPONENTS main esp_psram) + project(mspi_test_app) diff --git a/components/esp_hw_support/test_apps/mspi/main/CMakeLists.txt b/components/esp_hw_support/test_apps/mspi/main/CMakeLists.txt index 8d30280ddbb8..f2dc595cbc65 100644 --- a/components/esp_hw_support/test_apps/mspi/main/CMakeLists.txt +++ b/components/esp_hw_support/test_apps/mspi/main/CMakeLists.txt @@ -7,4 +7,5 @@ set(srcs # 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 unity esp_timer spi_flash esp_partition WHOLE_ARCHIVE) diff --git a/components/esp_hw_support/test_apps/mspi_psram_with_dfs/CMakeLists.txt b/components/esp_hw_support/test_apps/mspi_psram_with_dfs/CMakeLists.txt index 493e4aa2edd7..75826523ecfe 100644 --- a/components/esp_hw_support/test_apps/mspi_psram_with_dfs/CMakeLists.txt +++ b/components/esp_hw_support/test_apps/mspi_psram_with_dfs/CMakeLists.txt @@ -2,4 +2,12 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) + +list(APPEND EXTRA_COMPONENT_DIRS + "$ENV{IDF_PATH}/tools/unit-test-app/components") # For test_utils component + +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. We also depend on +# esptool_py and esp_psram as we set CONFIG_ESPTOOLPY_... and CONFIG_SPIRAM_... options. +set(COMPONENTS main esptool_py esp_psram) + project(mspi_psram_test_app) diff --git a/components/esp_hw_support/test_apps/mspi_psram_with_dfs/main/CMakeLists.txt b/components/esp_hw_support/test_apps/mspi_psram_with_dfs/main/CMakeLists.txt index a26b8b7aee67..1136a2b23788 100644 --- a/components/esp_hw_support/test_apps/mspi_psram_with_dfs/main/CMakeLists.txt +++ b/components/esp_hw_support/test_apps/mspi_psram_with_dfs/main/CMakeLists.txt @@ -6,4 +6,5 @@ set(srcs # 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 unity test_utils spi_flash esp_partition esp_pm WHOLE_ARCHIVE) diff --git a/components/esp_lcd/test_apps/i2c_lcd_legacy/CMakeLists.txt b/components/esp_lcd/test_apps/i2c_lcd_legacy/CMakeLists.txt index 9c62f764dc14..8c099ff31c5e 100644 --- a/components/esp_lcd/test_apps/i2c_lcd_legacy/CMakeLists.txt +++ b/components/esp_lcd/test_apps/i2c_lcd_legacy/CMakeLists.txt @@ -2,4 +2,8 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) + +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +set(COMPONENTS main) + project(legacy_i2c_lcd_panel_test) diff --git a/components/esp_lcd/test_apps/i2c_lcd_legacy/main/CMakeLists.txt b/components/esp_lcd/test_apps/i2c_lcd_legacy/main/CMakeLists.txt index b969d9dbf927..a168fe90a071 100644 --- a/components/esp_lcd/test_apps/i2c_lcd_legacy/main/CMakeLists.txt +++ b/components/esp_lcd/test_apps/i2c_lcd_legacy/main/CMakeLists.txt @@ -4,4 +4,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 unity driver esp_lcd WHOLE_ARCHIVE) diff --git a/components/esp_mm/test_apps/mm/CMakeLists.txt b/components/esp_mm/test_apps/mm/CMakeLists.txt index e349686fc1ff..3e976ca666de 100644 --- a/components/esp_mm/test_apps/mm/CMakeLists.txt +++ b/components/esp_mm/test_apps/mm/CMakeLists.txt @@ -3,6 +3,10 @@ cmake_minimum_required(VERSION 3.16) set(EXTRA_COMPONENT_DIRS "$ENV{IDF_PATH}/components/esp_mm/test_apps/components") +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. We also depend on esp_psram +# as we set CONFIG_SPIRAM_... options. +set(COMPONENTS main esp_psram) + include($ENV{IDF_PATH}/tools/cmake/project.cmake) project(mm_test) diff --git a/components/esp_mm/test_apps/mmap_hw/CMakeLists.txt b/components/esp_mm/test_apps/mmap_hw/CMakeLists.txt index d1e1dbc25f56..fac8366284bd 100644 --- a/components/esp_mm/test_apps/mmap_hw/CMakeLists.txt +++ b/components/esp_mm/test_apps/mmap_hw/CMakeLists.txt @@ -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(mmap_hw_test) diff --git a/components/esp_netif/test_apps/test_app_esp_netif/CMakeLists.txt b/components/esp_netif/test_apps/test_app_esp_netif/CMakeLists.txt index ff3764931cc8..c90b2d947cfb 100644 --- a/components/esp_netif/test_apps/test_app_esp_netif/CMakeLists.txt +++ b/components/esp_netif/test_apps/test_app_esp_netif/CMakeLists.txt @@ -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(esp_netif_test) diff --git a/components/esp_netif/test_apps/test_app_vfs_l2tap/CMakeLists.txt b/components/esp_netif/test_apps/test_app_vfs_l2tap/CMakeLists.txt index 859cfa803c98..e046158b4315 100644 --- a/components/esp_netif/test_apps/test_app_vfs_l2tap/CMakeLists.txt +++ b/components/esp_netif/test_apps/test_app_vfs_l2tap/CMakeLists.txt @@ -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(esp_vfs_l2tap_test) diff --git a/components/esp_psram/test_apps/psram/CMakeLists.txt b/components/esp_psram/test_apps/psram/CMakeLists.txt index 1cfb19641093..f358f3276dff 100644 --- a/components/esp_psram/test_apps/psram/CMakeLists.txt +++ b/components/esp_psram/test_apps/psram/CMakeLists.txt @@ -2,4 +2,8 @@ cmake_minimum_required(VERSION 3.5) include($ENV{IDF_PATH}/tools/cmake/project.cmake) + +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +set(COMPONENTS main) + project(psram_test) diff --git a/components/esp_psram/test_apps/psram/main/CMakeLists.txt b/components/esp_psram/test_apps/psram/main/CMakeLists.txt index f00ce1a11c2a..d19067a3854a 100644 --- a/components/esp_psram/test_apps/psram/main/CMakeLists.txt +++ b/components/esp_psram/test_apps/psram/main/CMakeLists.txt @@ -10,4 +10,5 @@ endif() # 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 unity esp_psram spi_flash driver esp_partition WHOLE_ARCHIVE) diff --git a/components/esp_wifi/test_apps/wifi_connect/CMakeLists.txt b/components/esp_wifi/test_apps/wifi_connect/CMakeLists.txt index cf8c41f302c9..4d7035c22bcd 100644 --- a/components/esp_wifi/test_apps/wifi_connect/CMakeLists.txt +++ b/components/esp_wifi/test_apps/wifi_connect/CMakeLists.txt @@ -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) if($ENV{CI_PIPELINE_ID}) diff --git a/components/esp_wifi/test_apps/wifi_function/CMakeLists.txt b/components/esp_wifi/test_apps/wifi_function/CMakeLists.txt index 7f6e55fa727f..1707a7102cc7 100644 --- a/components/esp_wifi/test_apps/wifi_function/CMakeLists.txt +++ b/components/esp_wifi/test_apps/wifi_function/CMakeLists.txt @@ -3,5 +3,8 @@ 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(wifi_test) diff --git a/components/freertos/test_apps/freertos/CMakeLists.txt b/components/freertos/test_apps/freertos/CMakeLists.txt index 3d41d57ac1e3..02b26ae0acdb 100644 --- a/components/freertos/test_apps/freertos/CMakeLists.txt +++ b/components/freertos/test_apps/freertos/CMakeLists.txt @@ -1,21 +1,21 @@ # This is the project CMakeLists.txt file for the test subproject cmake_minimum_required(VERSION 3.16) -# FreeRTOS tests of different types (e.g., kernel, port, performance etc.)are -# split into different directores in the test app's root directory. Each test -# type is treated as separate component -set(test_types - "kernel" - "misc" - "performance" - "port") +include($ENV{IDF_PATH}/tools/cmake/project.cmake) -list(APPEND EXTRA_COMPONENT_DIRS - ${test_types} # Add each test type as a component - "$ENV{IDF_PATH}/tools/unit-test-app/components") # For test_utils component +# Set extra component directories for +# - test_utils component +# - the different test types (e.g., kernel, port, performance, ...) that are organized as components +set(EXTRA_COMPONENT_DIRS + "$ENV{IDF_PATH}/tools/unit-test-app/components" + "./kernel" + "./misc" + "./performance" + "./port" +) -#"Trim" the build. Include the minimal set of components, main, and anything it depends on. -set(COMPONENTS main esp_psram ${test_types}) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. We also depend on esp_psram +# as we enable CONFIG_SPIRAM_... options. +set(COMPONENTS main esp_psram) -include($ENV{IDF_PATH}/tools/cmake/project.cmake) project(freertos_test) diff --git a/components/freertos/test_apps/freertos/main/CMakeLists.txt b/components/freertos/test_apps/freertos/main/CMakeLists.txt index 0d8828ca1435..f73b1906dbb6 100644 --- a/components/freertos/test_apps/freertos/main/CMakeLists.txt +++ b/components/freertos/test_apps/freertos/main/CMakeLists.txt @@ -1,2 +1,3 @@ idf_component_register(SRCS "test_freertos_main.c" - PRIV_REQUIRES unity test_utils driver) + # Pull in the components containing each type of FreeRTOS test + PRIV_REQUIRES unity test_utils kernel misc performance port) diff --git a/components/freertos/test_apps/freertos/misc/CMakeLists.txt b/components/freertos/test_apps/freertos/misc/CMakeLists.txt index cb1b5fdeb84e..40bb3aa087e4 100644 --- a/components/freertos/test_apps/freertos/misc/CMakeLists.txt +++ b/components/freertos/test_apps/freertos/misc/CMakeLists.txt @@ -3,5 +3,5 @@ # In order for the cases defined by `TEST_CASE` in "misc" to be linked into # the final elf, the component can be registered as WHOLE_ARCHIVE idf_component_register(SRC_DIRS "." - PRIV_REQUIRES test_utils + PRIV_REQUIRES unity test_utils WHOLE_ARCHIVE) diff --git a/components/freertos/test_apps/freertos/performance/CMakeLists.txt b/components/freertos/test_apps/freertos/performance/CMakeLists.txt index 2fc8feb7395f..d7be03bc1b38 100644 --- a/components/freertos/test_apps/freertos/performance/CMakeLists.txt +++ b/components/freertos/test_apps/freertos/performance/CMakeLists.txt @@ -3,5 +3,5 @@ # In order for the cases defined by `TEST_CASE` in "performance" to be linked into # the final elf, the component can be registered as WHOLE_ARCHIVE idf_component_register(SRC_DIRS "." - PRIV_REQUIRES test_utils + PRIV_REQUIRES unity test_utils WHOLE_ARCHIVE) diff --git a/components/freertos/test_apps/freertos/port/CMakeLists.txt b/components/freertos/test_apps/freertos/port/CMakeLists.txt index 04522f2caf7f..6eb7eb8d09bd 100644 --- a/components/freertos/test_apps/freertos/port/CMakeLists.txt +++ b/components/freertos/test_apps/freertos/port/CMakeLists.txt @@ -3,5 +3,5 @@ # In order for the cases defined by `TEST_CASE` in "port" to be linked into # the final elf, the component can be registered as WHOLE_ARCHIVE idf_component_register(SRC_DIRS "." - PRIV_REQUIRES test_utils + PRIV_REQUIRES unity test_utils WHOLE_ARCHIVE) diff --git a/components/ieee802154/test_apps/test_ieee802154/CMakeLists.txt b/components/ieee802154/test_apps/test_ieee802154/CMakeLists.txt index 6f32785a15e6..b7ca706cb4c9 100644 --- a/components/ieee802154/test_apps/test_ieee802154/CMakeLists.txt +++ b/components/ieee802154/test_apps/test_ieee802154/CMakeLists.txt @@ -2,4 +2,8 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) + +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +set(COMPONENTS main) + project(test_ieee802154) diff --git a/components/ieee802154/test_apps/test_ieee802154/main/CMakeLists.txt b/components/ieee802154/test_apps/test_ieee802154/main/CMakeLists.txt index d0a58e94a05b..625a6175c9e1 100644 --- a/components/ieee802154/test_apps/test_ieee802154/main/CMakeLists.txt +++ b/components/ieee802154/test_apps/test_ieee802154/main/CMakeLists.txt @@ -8,4 +8,5 @@ set(include "." # the component can be registered as WHOLE_ARCHIVE idf_component_register(SRCS ${srcs} INCLUDE_DIRS include + PRIV_REQUIRES ieee802154 console fatfs nvs_flash esp_phy WHOLE_ARCHIVE) diff --git a/components/spi_flash/test_apps/esp_flash/CMakeLists.txt b/components/spi_flash/test_apps/esp_flash/CMakeLists.txt index b18abb0cd0ad..91389d9e265e 100644 --- a/components/spi_flash/test_apps/esp_flash/CMakeLists.txt +++ b/components/spi_flash/test_apps/esp_flash/CMakeLists.txt @@ -3,6 +3,10 @@ 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. We also depend on +# esptool_py as we set CONFIG_ESPTOOLPY_... options. +set(COMPONENTS main esptool_py) + include($ENV{IDF_PATH}/tools/cmake/project.cmake) project(test_esp_flash_drv) diff --git a/components/spi_flash/test_apps/esp_flash/main/CMakeLists.txt b/components/spi_flash/test_apps/esp_flash/main/CMakeLists.txt index f5377211c607..9e4bf2b0153e 100644 --- a/components/spi_flash/test_apps/esp_flash/main/CMakeLists.txt +++ b/components/spi_flash/test_apps/esp_flash/main/CMakeLists.txt @@ -5,4 +5,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 unity test_utils spi_flash esp_timer driver bootloader_support WHOLE_ARCHIVE) diff --git a/components/spi_flash/test_apps/esp_flash_stress/CMakeLists.txt b/components/spi_flash/test_apps/esp_flash_stress/CMakeLists.txt index e5572915823d..b650bb10c9cd 100644 --- a/components/spi_flash/test_apps/esp_flash_stress/CMakeLists.txt +++ b/components/spi_flash/test_apps/esp_flash_stress/CMakeLists.txt @@ -3,6 +3,10 @@ cmake_minimum_required(VERSION 3.16) set(EXTRA_COMPONENT_DIRS "$ENV{IDF_PATH}/components/spi_flash/test_apps/components") +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. We also depend on esp_psram +# and esptool_py as we set CONFIG_SPIRAM_... and CONFIG_ESPTOOLPY_... options. +set(COMPONENTS main esp_psram esptool_py) + include($ENV{IDF_PATH}/tools/cmake/project.cmake) project(test_esp_flash_stress) diff --git a/components/spi_flash/test_apps/flash_encryption/CMakeLists.txt b/components/spi_flash/test_apps/flash_encryption/CMakeLists.txt index 6f1f01789378..941d38b996d9 100644 --- a/components/spi_flash/test_apps/flash_encryption/CMakeLists.txt +++ b/components/spi_flash/test_apps/flash_encryption/CMakeLists.txt @@ -2,4 +2,9 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) + +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. We also depend on esp_psram +# and esptool_py as we set CONFIG_SPIRAM_... and CONFIG_ESPTOOLPY_... options. +set(COMPONENTS main esp_psram esptool_py) + project(test_flash_encryption) diff --git a/components/spi_flash/test_apps/flash_encryption/main/CMakeLists.txt b/components/spi_flash/test_apps/flash_encryption/main/CMakeLists.txt index df989b727475..491d7e107dea 100644 --- a/components/spi_flash/test_apps/flash_encryption/main/CMakeLists.txt +++ b/components/spi_flash/test_apps/flash_encryption/main/CMakeLists.txt @@ -2,5 +2,6 @@ set(srcs "test_app_main.c" "test_flash_encryption.c") idf_component_register(SRCS ${srcs} + PRIV_REQUIRES unity spi_flash bootloader_support esp_partition WHOLE_ARCHIVE) target_compile_options(${COMPONENT_LIB} PRIVATE "-Wno-format") diff --git a/components/spi_flash/test_apps/flash_mmap/CMakeLists.txt b/components/spi_flash/test_apps/flash_mmap/CMakeLists.txt index 0bd6bf580223..716f502a8324 100644 --- a/components/spi_flash/test_apps/flash_mmap/CMakeLists.txt +++ b/components/spi_flash/test_apps/flash_mmap/CMakeLists.txt @@ -3,5 +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. We also depend on esp_psram +# as we set CONFIG_SPIRAM_... options. +set(COMPONENTS main esp_psram) + include($ENV{IDF_PATH}/tools/cmake/project.cmake) project(test_flash_mmap) diff --git a/components/spi_flash/test_apps/flash_mmap/main/CMakeLists.txt b/components/spi_flash/test_apps/flash_mmap/main/CMakeLists.txt index c75f516f7c41..903367c6e101 100644 --- a/components/spi_flash/test_apps/flash_mmap/main/CMakeLists.txt +++ b/components/spi_flash/test_apps/flash_mmap/main/CMakeLists.txt @@ -4,4 +4,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 unity test_utils spi_flash bootloader_support esp_partition WHOLE_ARCHIVE) diff --git a/components/spi_flash/test_apps/flash_suspend/CMakeLists.txt b/components/spi_flash/test_apps/flash_suspend/CMakeLists.txt index 46da0ba372b4..03504ecd6a21 100644 --- a/components/spi_flash/test_apps/flash_suspend/CMakeLists.txt +++ b/components/spi_flash/test_apps/flash_suspend/CMakeLists.txt @@ -3,5 +3,8 @@ 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(test_flash_suspend) diff --git a/components/spi_flash/test_apps/flash_suspend/main/CMakeLists.txt b/components/spi_flash/test_apps/flash_suspend/main/CMakeLists.txt index e017e8371ec0..3423bf3e020b 100644 --- a/components/spi_flash/test_apps/flash_suspend/main/CMakeLists.txt +++ b/components/spi_flash/test_apps/flash_suspend/main/CMakeLists.txt @@ -4,4 +4,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 unity test_utils spi_flash driver esp_partition WHOLE_ARCHIVE) diff --git a/components/spi_flash/test_apps/mspi_test/CMakeLists.txt b/components/spi_flash/test_apps/mspi_test/CMakeLists.txt index be1acb2a34da..4f1700109548 100644 --- a/components/spi_flash/test_apps/mspi_test/CMakeLists.txt +++ b/components/spi_flash/test_apps/mspi_test/CMakeLists.txt @@ -1,6 +1,10 @@ # This is the project CMakeLists.txt file for the test subproject cmake_minimum_required(VERSION 3.16) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. We also depend on esp_psram +# as we set CONFIG_SPIRAM_... options. +set(COMPONENTS main esp_psram) + include($ENV{IDF_PATH}/tools/cmake/project.cmake) project(mspi_test) diff --git a/components/spi_flash/test_apps/mspi_test/main/CMakeLists.txt b/components/spi_flash/test_apps/mspi_test/main/CMakeLists.txt index cfbf0f1b399e..4e1e8bed59c0 100644 --- a/components/spi_flash/test_apps/mspi_test/main/CMakeLists.txt +++ b/components/spi_flash/test_apps/mspi_test/main/CMakeLists.txt @@ -5,4 +5,5 @@ set(srcs "test_cache_disabled.c" "test_app_main.c") idf_component_register(SRCS ${srcs} + PRIV_REQUIRES unity spi_flash driver esp_partition bootloader_support app_update WHOLE_ARCHIVE) diff --git a/components/ulp/test_apps/lp_core/CMakeLists.txt b/components/ulp/test_apps/lp_core/CMakeLists.txt index 2a29e3574d38..5a16c97e491c 100644 --- a/components/ulp/test_apps/lp_core/CMakeLists.txt +++ b/components/ulp/test_apps/lp_core/CMakeLists.txt @@ -7,5 +7,8 @@ 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(lp_core_test) diff --git a/components/ulp/test_apps/ulp_riscv/CMakeLists.txt b/components/ulp/test_apps/ulp_riscv/CMakeLists.txt index eba0bce55842..a01a17012050 100644 --- a/components/ulp/test_apps/ulp_riscv/CMakeLists.txt +++ b/components/ulp/test_apps/ulp_riscv/CMakeLists.txt @@ -3,5 +3,8 @@ cmake_minimum_required(VERSION 3.16) list(PREPEND SDKCONFIG_DEFAULTS "$ENV{IDF_PATH}/tools/test_apps/configs/sdkconfig.debug_helpers" "sdkconfig.defaults") +# "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(ulp_riscv_test) diff --git a/components/usb/test_apps/hcd/CMakeLists.txt b/components/usb/test_apps/hcd/CMakeLists.txt index e0c09e311323..3294266f463b 100644 --- a/components/usb/test_apps/hcd/CMakeLists.txt +++ b/components/usb/test_apps/hcd/CMakeLists.txt @@ -2,5 +2,10 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) + set(EXTRA_COMPONENT_DIRS "../common") + +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +set(COMPONENTS main) + project(test_app_usb_host) diff --git a/components/usb/test_apps/usb_host/CMakeLists.txt b/components/usb/test_apps/usb_host/CMakeLists.txt index e0c09e311323..3294266f463b 100644 --- a/components/usb/test_apps/usb_host/CMakeLists.txt +++ b/components/usb/test_apps/usb_host/CMakeLists.txt @@ -2,5 +2,10 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) + set(EXTRA_COMPONENT_DIRS "../common") + +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +set(COMPONENTS main) + project(test_app_usb_host)