Parcourir la source

Merge branch 'feature/trim_the_build_of_test_apps_of_esp_adc' into 'master'

Trim the build components

Closes IDF-7459

See merge request espressif/esp-idf!24143
morris il y a 2 ans
Parent
commit
f38945ea18
64 fichiers modifiés avec 130 ajouts et 7 suppressions
  1. 3 0
      components/driver/test_apps/analog_comparator/CMakeLists.txt
  2. 1 0
      components/driver/test_apps/analog_comparator/main/CMakeLists.txt
  3. 3 0
      components/driver/test_apps/dac_test_apps/dac/CMakeLists.txt
  4. 1 0
      components/driver/test_apps/dac_test_apps/dac/main/CMakeLists.txt
  5. 3 0
      components/driver/test_apps/dac_test_apps/legacy_dac_driver/CMakeLists.txt
  6. 1 0
      components/driver/test_apps/dac_test_apps/legacy_dac_driver/main/CMakeLists.txt
  7. 1 3
      components/driver/test_apps/dac_test_apps/legacy_dac_driver/main/test_legacy_dac.c
  8. 3 0
      components/driver/test_apps/gpio/CMakeLists.txt
  9. 1 0
      components/driver/test_apps/gpio/main/CMakeLists.txt
  10. 3 0
      components/driver/test_apps/gpio_extensions/CMakeLists.txt
  11. 1 0
      components/driver/test_apps/gpio_extensions/main/CMakeLists.txt
  12. 3 0
      components/driver/test_apps/gptimer/CMakeLists.txt
  13. 1 0
      components/driver/test_apps/gptimer/main/CMakeLists.txt
  14. 3 0
      components/driver/test_apps/i2c/CMakeLists.txt
  15. 1 0
      components/driver/test_apps/i2c/main/CMakeLists.txt
  16. 3 0
      components/driver/test_apps/i2s_test_apps/i2s/CMakeLists.txt
  17. 1 0
      components/driver/test_apps/i2s_test_apps/i2s/main/CMakeLists.txt
  18. 3 0
      components/driver/test_apps/i2s_test_apps/i2s_tdm/CMakeLists.txt
  19. 1 0
      components/driver/test_apps/i2s_test_apps/i2s_tdm/main/CMakeLists.txt
  20. 3 0
      components/driver/test_apps/i2s_test_apps/legacy_i2s_adc_dac/CMakeLists.txt
  21. 1 0
      components/driver/test_apps/i2s_test_apps/legacy_i2s_adc_dac/main/CMakeLists.txt
  22. 0 2
      components/driver/test_apps/i2s_test_apps/legacy_i2s_adc_dac/main/test_i2s_adc.c
  23. 0 2
      components/driver/test_apps/i2s_test_apps/legacy_i2s_adc_dac/main/test_i2s_dac.c
  24. 3 0
      components/driver/test_apps/i2s_test_apps/legacy_i2s_driver/CMakeLists.txt
  25. 1 0
      components/driver/test_apps/i2s_test_apps/legacy_i2s_driver/main/CMakeLists.txt
  26. 3 0
      components/driver/test_apps/ledc/CMakeLists.txt
  27. 1 0
      components/driver/test_apps/ledc/main/CMakeLists.txt
  28. 3 0
      components/driver/test_apps/legacy_adc_driver/CMakeLists.txt
  29. 1 0
      components/driver/test_apps/legacy_adc_driver/main/CMakeLists.txt
  30. 3 0
      components/driver/test_apps/legacy_mcpwm_driver/CMakeLists.txt
  31. 1 0
      components/driver/test_apps/legacy_mcpwm_driver/main/CMakeLists.txt
  32. 3 0
      components/driver/test_apps/legacy_pcnt_driver/CMakeLists.txt
  33. 1 0
      components/driver/test_apps/legacy_pcnt_driver/main/CMakeLists.txt
  34. 3 0
      components/driver/test_apps/legacy_rmt_driver/CMakeLists.txt
  35. 1 0
      components/driver/test_apps/legacy_rmt_driver/main/CMakeLists.txt
  36. 3 0
      components/driver/test_apps/legacy_rtc_temp_driver/CMakeLists.txt
  37. 1 0
      components/driver/test_apps/legacy_rtc_temp_driver/main/CMakeLists.txt
  38. 3 0
      components/driver/test_apps/legacy_timer_driver/CMakeLists.txt
  39. 1 0
      components/driver/test_apps/legacy_timer_driver/main/CMakeLists.txt
  40. 3 0
      components/driver/test_apps/mcpwm/CMakeLists.txt
  41. 1 0
      components/driver/test_apps/mcpwm/main/CMakeLists.txt
  42. 3 0
      components/driver/test_apps/parlio/CMakeLists.txt
  43. 1 0
      components/driver/test_apps/parlio/main/CMakeLists.txt
  44. 3 0
      components/driver/test_apps/pulse_cnt/CMakeLists.txt
  45. 1 0
      components/driver/test_apps/pulse_cnt/main/CMakeLists.txt
  46. 3 0
      components/driver/test_apps/rmt/CMakeLists.txt
  47. 1 0
      components/driver/test_apps/rmt/main/CMakeLists.txt
  48. 3 0
      components/driver/test_apps/rs485/CMakeLists.txt
  49. 3 0
      components/driver/test_apps/sdio/CMakeLists.txt
  50. 3 0
      components/driver/test_apps/spi/master/CMakeLists.txt
  51. 3 0
      components/driver/test_apps/spi/param/CMakeLists.txt
  52. 3 0
      components/driver/test_apps/spi/slave/CMakeLists.txt
  53. 3 0
      components/driver/test_apps/spi/slave_hd/CMakeLists.txt
  54. 3 0
      components/driver/test_apps/temperature_sensor/CMakeLists.txt
  55. 1 0
      components/driver/test_apps/temperature_sensor/main/CMakeLists.txt
  56. 3 0
      components/driver/test_apps/touch_sensor_v1/CMakeLists.txt
  57. 1 0
      components/driver/test_apps/touch_sensor_v1/main/CMakeLists.txt
  58. 3 0
      components/driver/test_apps/touch_sensor_v2/CMakeLists.txt
  59. 1 0
      components/driver/test_apps/touch_sensor_v2/main/CMakeLists.txt
  60. 3 0
      components/driver/test_apps/twai/CMakeLists.txt
  61. 1 0
      components/driver/test_apps/twai/main/CMakeLists.txt
  62. 3 0
      components/driver/test_apps/uart/CMakeLists.txt
  63. 3 0
      components/esp_adc/test_apps/adc/CMakeLists.txt
  64. 1 0
      components/esp_adc/test_apps/adc/main/CMakeLists.txt

+ 3 - 0
components/driver/test_apps/analog_comparator/CMakeLists.txt

@@ -1,6 +1,9 @@
 # This is the project CMakeLists.txt file for the test subproject
 # This is the project CMakeLists.txt file for the test subproject
 cmake_minimum_required(VERSION 3.16)
 cmake_minimum_required(VERSION 3.16)
 
 
+# "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)
 include($ENV{IDF_PATH}/tools/cmake/project.cmake)
 project(test_ana_cmpr)
 project(test_ana_cmpr)
 
 

+ 1 - 0
components/driver/test_apps/analog_comparator/main/CMakeLists.txt

@@ -8,4 +8,5 @@ endif()
 
 
 idf_component_register(SRCS ${srcs}
 idf_component_register(SRCS ${srcs}
                        INCLUDE_DIRS "."
                        INCLUDE_DIRS "."
+                       PRIV_REQUIRES unity driver
                        WHOLE_ARCHIVE)
                        WHOLE_ARCHIVE)

+ 3 - 0
components/driver/test_apps/dac_test_apps/dac/CMakeLists.txt

@@ -1,6 +1,9 @@
 # This is the project CMakeLists.txt file for the test subproject
 # This is the project CMakeLists.txt file for the test subproject
 cmake_minimum_required(VERSION 3.16)
 cmake_minimum_required(VERSION 3.16)
 
 
+# "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)
 include($ENV{IDF_PATH}/tools/cmake/project.cmake)
 project(dac_test)
 project(dac_test)
 
 

+ 1 - 0
components/driver/test_apps/dac_test_apps/dac/main/CMakeLists.txt

@@ -8,4 +8,5 @@ endif()
 # In order for the cases defined by `TEST_CASE` to be linked into the final elf,
 # In order for the cases defined by `TEST_CASE` to be linked into the final elf,
 # the component can be registered as WHOLE_ARCHIVE
 # the component can be registered as WHOLE_ARCHIVE
 idf_component_register(SRCS ${srcs}
 idf_component_register(SRCS ${srcs}
+                       PRIV_REQUIRES unity driver esp_adc
                        WHOLE_ARCHIVE)
                        WHOLE_ARCHIVE)

+ 3 - 0
components/driver/test_apps/dac_test_apps/legacy_dac_driver/CMakeLists.txt

@@ -1,6 +1,9 @@
 # This is the project CMakeLists.txt file for the test subproject
 # This is the project CMakeLists.txt file for the test subproject
 cmake_minimum_required(VERSION 3.16)
 cmake_minimum_required(VERSION 3.16)
 
 
+# "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)
 include($ENV{IDF_PATH}/tools/cmake/project.cmake)
 project(dac_legacy_test)
 project(dac_legacy_test)
 
 

+ 1 - 0
components/driver/test_apps/dac_test_apps/legacy_dac_driver/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,
 # In order for the cases defined by `TEST_CASE` to be linked into the final elf,
 # the component can be registered as WHOLE_ARCHIVE
 # the component can be registered as WHOLE_ARCHIVE
 idf_component_register(SRCS ${srcs}
 idf_component_register(SRCS ${srcs}
+                       PRIV_REQUIRES unity driver esp_event esp_adc
                        WHOLE_ARCHIVE)
                        WHOLE_ARCHIVE)

+ 1 - 3
components/driver/test_apps/dac_test_apps/legacy_dac_driver/main/test_legacy_dac.c

@@ -1,5 +1,5 @@
 /*
 /*
- * SPDX-FileCopyrightText: 2022 Espressif Systems (Shanghai) CO LTD
+ * SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD
  *
  *
  * SPDX-License-Identifier: Apache-2.0
  * SPDX-License-Identifier: Apache-2.0
  */
  */
@@ -13,9 +13,7 @@
 #include "unity_test_utils.h"
 #include "unity_test_utils.h"
 #include "esp_system.h"
 #include "esp_system.h"
 #include "esp_event.h"
 #include "esp_event.h"
-#include "esp_wifi.h"
 #include "esp_log.h"
 #include "esp_log.h"
-#include "nvs_flash.h"
 #include "soc/soc_caps.h"
 #include "soc/soc_caps.h"
 #define CONFIG_ADC_SUPPRESS_DEPRECATE_WARN 1
 #define CONFIG_ADC_SUPPRESS_DEPRECATE_WARN 1
 #include "driver/adc.h"
 #include "driver/adc.h"

+ 3 - 0
components/driver/test_apps/gpio/CMakeLists.txt

@@ -1,6 +1,9 @@
 # This is the project CMakeLists.txt file for the test subproject
 # This is the project CMakeLists.txt file for the test subproject
 cmake_minimum_required(VERSION 3.16)
 cmake_minimum_required(VERSION 3.16)
 
 
+# "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)
 include($ENV{IDF_PATH}/tools/cmake/project.cmake)
 project(gpio_test)
 project(gpio_test)
 
 

+ 1 - 0
components/driver/test_apps/gpio/main/CMakeLists.txt

@@ -12,4 +12,5 @@ endif()
 # In order for the cases defined by `TEST_CASE` to be linked into the final elf,
 # In order for the cases defined by `TEST_CASE` to be linked into the final elf,
 # the component can be registered as WHOLE_ARCHIVE
 # the component can be registered as WHOLE_ARCHIVE
 idf_component_register(SRCS ${srcs}
 idf_component_register(SRCS ${srcs}
+                       PRIV_REQUIRES unity driver spi_flash
                        WHOLE_ARCHIVE)
                        WHOLE_ARCHIVE)

+ 3 - 0
components/driver/test_apps/gpio_extensions/CMakeLists.txt

@@ -1,6 +1,9 @@
 # This is the project CMakeLists.txt file for the test subproject
 # This is the project CMakeLists.txt file for the test subproject
 cmake_minimum_required(VERSION 3.16)
 cmake_minimum_required(VERSION 3.16)
 
 
+# "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)
 include($ENV{IDF_PATH}/tools/cmake/project.cmake)
 project(gpio_extension_test)
 project(gpio_extension_test)
 
 

+ 1 - 0
components/driver/test_apps/gpio_extensions/main/CMakeLists.txt

@@ -19,4 +19,5 @@ endif()
 # In order for the cases defined by `TEST_CASE` to be linked into the final elf,
 # In order for the cases defined by `TEST_CASE` to be linked into the final elf,
 # the component can be registered as WHOLE_ARCHIVE
 # the component can be registered as WHOLE_ARCHIVE
 idf_component_register(SRCS ${srcs}
 idf_component_register(SRCS ${srcs}
+                       PRIV_REQUIRES unity driver
                        WHOLE_ARCHIVE)
                        WHOLE_ARCHIVE)

+ 3 - 0
components/driver/test_apps/gptimer/CMakeLists.txt

@@ -1,6 +1,9 @@
 # This is the project CMakeLists.txt file for the test subproject
 # This is the project CMakeLists.txt file for the test subproject
 cmake_minimum_required(VERSION 3.16)
 cmake_minimum_required(VERSION 3.16)
 
 
+# "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)
 include($ENV{IDF_PATH}/tools/cmake/project.cmake)
 project(gptimer_test)
 project(gptimer_test)
 
 

+ 1 - 0
components/driver/test_apps/gptimer/main/CMakeLists.txt

@@ -8,4 +8,5 @@ endif()
 # In order for the cases defined by `TEST_CASE` to be linked into the final elf,
 # In order for the cases defined by `TEST_CASE` to be linked into the final elf,
 # the component can be registered as WHOLE_ARCHIVE
 # the component can be registered as WHOLE_ARCHIVE
 idf_component_register(SRCS ${srcs}
 idf_component_register(SRCS ${srcs}
+                       PRIV_REQUIRES unity driver
                        WHOLE_ARCHIVE)
                        WHOLE_ARCHIVE)

+ 3 - 0
components/driver/test_apps/i2c/CMakeLists.txt

@@ -1,6 +1,9 @@
 # This is the project CMakeLists.txt file for the test subproject
 # This is the project CMakeLists.txt file for the test subproject
 cmake_minimum_required(VERSION 3.16)
 cmake_minimum_required(VERSION 3.16)
 
 
+# "Trim" the build. Include the minimal set of components, main, and anything it depends on.
+set(COMPONENTS main)
+
 set(EXTRA_COMPONENT_DIRS
 set(EXTRA_COMPONENT_DIRS
     "$ENV{IDF_PATH}/tools/unit-test-app/components"
     "$ENV{IDF_PATH}/tools/unit-test-app/components"
 )
 )

+ 1 - 0
components/driver/test_apps/i2c/main/CMakeLists.txt

@@ -3,4 +3,5 @@ set(srcs "test_app_main.c"
     )
     )
 
 
 idf_component_register(SRCS ${srcs}
 idf_component_register(SRCS ${srcs}
+                       PRIV_REQUIRES unity driver test_utils
                        WHOLE_ARCHIVE)
                        WHOLE_ARCHIVE)

+ 3 - 0
components/driver/test_apps/i2s_test_apps/i2s/CMakeLists.txt

@@ -1,6 +1,9 @@
 # This is the project CMakeLists.txt file for the test subproject
 # This is the project CMakeLists.txt file for the test subproject
 cmake_minimum_required(VERSION 3.16)
 cmake_minimum_required(VERSION 3.16)
 
 
+# "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)
 include($ENV{IDF_PATH}/tools/cmake/project.cmake)
 project(i2s_test)
 project(i2s_test)
 
 

+ 1 - 0
components/driver/test_apps/i2s_test_apps/i2s/main/CMakeLists.txt

@@ -3,4 +3,5 @@ set(srcs "test_app_main.c"
          "test_i2s_iram.c")
          "test_i2s_iram.c")
 
 
 idf_component_register(SRCS ${srcs}
 idf_component_register(SRCS ${srcs}
+                       PRIV_REQUIRES unity driver spi_flash
                        WHOLE_ARCHIVE)
                        WHOLE_ARCHIVE)

+ 3 - 0
components/driver/test_apps/i2s_test_apps/i2s_tdm/CMakeLists.txt

@@ -2,6 +2,9 @@
 # in this exact order for cmake to work correctly
 # in this exact order for cmake to work correctly
 cmake_minimum_required(VERSION 3.16)
 cmake_minimum_required(VERSION 3.16)
 
 
+# "Trim" the build. Include the minimal set of components, main, and anything it depends on.
+set(COMPONENTS main)
+
 set(EXTRA_COMPONENT_DIRS
 set(EXTRA_COMPONENT_DIRS
     "$ENV{IDF_PATH}/tools/unit-test-app/components"
     "$ENV{IDF_PATH}/tools/unit-test-app/components"
 )
 )

+ 1 - 0
components/driver/test_apps/i2s_test_apps/i2s_tdm/main/CMakeLists.txt

@@ -1,4 +1,5 @@
 idf_component_register(SRCS "test_app_main.c" "test_i2s_tdm_full_duplex.c"
 idf_component_register(SRCS "test_app_main.c" "test_i2s_tdm_full_duplex.c"
+                       PRIV_REQUIRES unity driver test_utils
                        INCLUDE_DIRS "."
                        INCLUDE_DIRS "."
                        WHOLE_ARCHIVE
                        WHOLE_ARCHIVE
 )
 )

+ 3 - 0
components/driver/test_apps/i2s_test_apps/legacy_i2s_adc_dac/CMakeLists.txt

@@ -1,5 +1,8 @@
 # This is the project CMakeLists.txt file for the test subproject
 # This is the project CMakeLists.txt file for the test subproject
 cmake_minimum_required(VERSION 3.16)
 cmake_minimum_required(VERSION 3.16)
 
 
+# "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)
 include($ENV{IDF_PATH}/tools/cmake/project.cmake)
 project(i2s_adc_dac_test)
 project(i2s_adc_dac_test)

+ 1 - 0
components/driver/test_apps/i2s_test_apps/legacy_i2s_adc_dac/main/CMakeLists.txt

@@ -3,4 +3,5 @@ set(srcs "test_app_main.c"
          "test_i2s_dac.c")
          "test_i2s_dac.c")
 
 
 idf_component_register(SRCS ${srcs}
 idf_component_register(SRCS ${srcs}
+                       PRIV_REQUIRES unity driver esp_event esp_adc
                        WHOLE_ARCHIVE)
                        WHOLE_ARCHIVE)

+ 0 - 2
components/driver/test_apps/i2s_test_apps/legacy_i2s_adc_dac/main/test_i2s_adc.c

@@ -18,9 +18,7 @@
 #include "unity.h"
 #include "unity.h"
 #include "esp_system.h"
 #include "esp_system.h"
 #include "esp_event.h"
 #include "esp_event.h"
-#include "esp_wifi.h"
 #include "esp_log.h"
 #include "esp_log.h"
-#include "nvs_flash.h"
 #include "esp_rom_sys.h"
 #include "esp_rom_sys.h"
 
 
 /*
 /*

+ 0 - 2
components/driver/test_apps/i2s_test_apps/legacy_i2s_adc_dac/main/test_i2s_dac.c

@@ -16,9 +16,7 @@
 #include "unity.h"
 #include "unity.h"
 #include "esp_system.h"
 #include "esp_system.h"
 #include "esp_event.h"
 #include "esp_event.h"
-#include "esp_wifi.h"
 #include "esp_log.h"
 #include "esp_log.h"
-#include "nvs_flash.h"
 #include "test_dac_audio_file.h"
 #include "test_dac_audio_file.h"
 #include "driver/i2s.h"
 #include "driver/i2s.h"
 #include "driver/dac.h"
 #include "driver/dac.h"

+ 3 - 0
components/driver/test_apps/i2s_test_apps/legacy_i2s_driver/CMakeLists.txt

@@ -1,5 +1,8 @@
 # This is the project CMakeLists.txt file for the test subproject
 # This is the project CMakeLists.txt file for the test subproject
 cmake_minimum_required(VERSION 3.16)
 cmake_minimum_required(VERSION 3.16)
 
 
+# "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)
 include($ENV{IDF_PATH}/tools/cmake/project.cmake)
 project(i2s_legacy_test)
 project(i2s_legacy_test)

+ 1 - 0
components/driver/test_apps/i2s_test_apps/legacy_i2s_driver/main/CMakeLists.txt

@@ -2,4 +2,5 @@ set(srcs "test_app_main.c"
          "test_legacy_i2s.c")
          "test_legacy_i2s.c")
 
 
 idf_component_register(SRCS ${srcs}
 idf_component_register(SRCS ${srcs}
+                       PRIV_REQUIRES unity driver
                        WHOLE_ARCHIVE)
                        WHOLE_ARCHIVE)

+ 3 - 0
components/driver/test_apps/ledc/CMakeLists.txt

@@ -1,6 +1,9 @@
 # This is the project CMakeLists.txt file for the test subproject
 # This is the project CMakeLists.txt file for the test subproject
 cmake_minimum_required(VERSION 3.16)
 cmake_minimum_required(VERSION 3.16)
 
 
+# "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)
 include($ENV{IDF_PATH}/tools/cmake/project.cmake)
 project(ledc_test)
 project(ledc_test)
 
 

+ 1 - 0
components/driver/test_apps/ledc/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,
 # In order for the cases defined by `TEST_CASE` to be linked into the final elf,
 # the component can be registered as WHOLE_ARCHIVE
 # the component can be registered as WHOLE_ARCHIVE
 idf_component_register(SRCS ${srcs}
 idf_component_register(SRCS ${srcs}
+                       PRIV_REQUIRES unity driver esp_timer
                        WHOLE_ARCHIVE)
                        WHOLE_ARCHIVE)

+ 3 - 0
components/driver/test_apps/legacy_adc_driver/CMakeLists.txt

@@ -1,5 +1,8 @@
 # This is the project CMakeLists.txt file for the test subproject
 # This is the project CMakeLists.txt file for the test subproject
 cmake_minimum_required(VERSION 3.16)
 cmake_minimum_required(VERSION 3.16)
 
 
+# "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)
 include($ENV{IDF_PATH}/tools/cmake/project.cmake)
 project(legacy_adc_driver_test)
 project(legacy_adc_driver_test)

+ 1 - 0
components/driver/test_apps/legacy_adc_driver/main/CMakeLists.txt

@@ -2,4 +2,5 @@ set(srcs "test_app_main.c"
          "test_legacy_adc.c")
          "test_legacy_adc.c")
 
 
 idf_component_register(SRCS ${srcs}
 idf_component_register(SRCS ${srcs}
+                       PRIV_REQUIRES unity driver
                        WHOLE_ARCHIVE)
                        WHOLE_ARCHIVE)

+ 3 - 0
components/driver/test_apps/legacy_mcpwm_driver/CMakeLists.txt

@@ -1,5 +1,8 @@
 # This is the project CMakeLists.txt file for the test subproject
 # This is the project CMakeLists.txt file for the test subproject
 cmake_minimum_required(VERSION 3.16)
 cmake_minimum_required(VERSION 3.16)
 
 
+# "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)
 include($ENV{IDF_PATH}/tools/cmake/project.cmake)
 project(legacy_mcpwm_driver_test)
 project(legacy_mcpwm_driver_test)

+ 1 - 0
components/driver/test_apps/legacy_mcpwm_driver/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,
 # In order for the cases defined by `TEST_CASE` to be linked into the final elf,
 # the component can be registered as WHOLE_ARCHIVE
 # the component can be registered as WHOLE_ARCHIVE
 idf_component_register(SRCS ${srcs}
 idf_component_register(SRCS ${srcs}
+                       PRIV_REQUIRES unity driver
                        WHOLE_ARCHIVE)
                        WHOLE_ARCHIVE)

+ 3 - 0
components/driver/test_apps/legacy_pcnt_driver/CMakeLists.txt

@@ -1,5 +1,8 @@
 # This is the project CMakeLists.txt file for the test subproject
 # This is the project CMakeLists.txt file for the test subproject
 cmake_minimum_required(VERSION 3.16)
 cmake_minimum_required(VERSION 3.16)
 
 
+# "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)
 include($ENV{IDF_PATH}/tools/cmake/project.cmake)
 project(legacy_pcnt_driver_test)
 project(legacy_pcnt_driver_test)

+ 1 - 0
components/driver/test_apps/legacy_pcnt_driver/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,
 # In order for the cases defined by `TEST_CASE` to be linked into the final elf,
 # the component can be registered as WHOLE_ARCHIVE
 # the component can be registered as WHOLE_ARCHIVE
 idf_component_register(SRCS ${srcs}
 idf_component_register(SRCS ${srcs}
+                       PRIV_REQUIRES unity driver
                        WHOLE_ARCHIVE)
                        WHOLE_ARCHIVE)

+ 3 - 0
components/driver/test_apps/legacy_rmt_driver/CMakeLists.txt

@@ -1,5 +1,8 @@
 # This is the project CMakeLists.txt file for the test subproject
 # This is the project CMakeLists.txt file for the test subproject
 cmake_minimum_required(VERSION 3.16)
 cmake_minimum_required(VERSION 3.16)
 
 
+# "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)
 include($ENV{IDF_PATH}/tools/cmake/project.cmake)
 project(legacy_rmt_test)
 project(legacy_rmt_test)

+ 1 - 0
components/driver/test_apps/legacy_rmt_driver/main/CMakeLists.txt

@@ -2,4 +2,5 @@ set(srcs "test_app_main.c"
          "test_legacy_rmt.c")
          "test_legacy_rmt.c")
 
 
 idf_component_register(SRCS ${srcs}
 idf_component_register(SRCS ${srcs}
+                       PRIV_REQUIRES unity driver infrared_tools
                        WHOLE_ARCHIVE)
                        WHOLE_ARCHIVE)

+ 3 - 0
components/driver/test_apps/legacy_rtc_temp_driver/CMakeLists.txt

@@ -1,5 +1,8 @@
 # This is the project CMakeLists.txt file for the test subproject
 # This is the project CMakeLists.txt file for the test subproject
 cmake_minimum_required(VERSION 3.16)
 cmake_minimum_required(VERSION 3.16)
 
 
+# "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)
 include($ENV{IDF_PATH}/tools/cmake/project.cmake)
 project(legacy_rtc_temp_driver_test)
 project(legacy_rtc_temp_driver_test)

+ 1 - 0
components/driver/test_apps/legacy_rtc_temp_driver/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,
 # In order for the cases defined by `TEST_CASE` to be linked into the final elf,
 # the component can be registered as WHOLE_ARCHIVE
 # the component can be registered as WHOLE_ARCHIVE
 idf_component_register(SRCS ${srcs}
 idf_component_register(SRCS ${srcs}
+                       PRIV_REQUIRES unity driver
                        WHOLE_ARCHIVE)
                        WHOLE_ARCHIVE)

+ 3 - 0
components/driver/test_apps/legacy_timer_driver/CMakeLists.txt

@@ -1,5 +1,8 @@
 # This is the project CMakeLists.txt file for the test subproject
 # This is the project CMakeLists.txt file for the test subproject
 cmake_minimum_required(VERSION 3.16)
 cmake_minimum_required(VERSION 3.16)
 
 
+# "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)
 include($ENV{IDF_PATH}/tools/cmake/project.cmake)
 project(legacy_timer_driver_test)
 project(legacy_timer_driver_test)

+ 1 - 0
components/driver/test_apps/legacy_timer_driver/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,
 # In order for the cases defined by `TEST_CASE` to be linked into the final elf,
 # the component can be registered as WHOLE_ARCHIVE
 # the component can be registered as WHOLE_ARCHIVE
 idf_component_register(SRCS ${srcs}
 idf_component_register(SRCS ${srcs}
+                       PRIV_REQUIRES unity driver
                        WHOLE_ARCHIVE)
                        WHOLE_ARCHIVE)

+ 3 - 0
components/driver/test_apps/mcpwm/CMakeLists.txt

@@ -1,6 +1,9 @@
 # This is the project CMakeLists.txt file for the test subproject
 # This is the project CMakeLists.txt file for the test subproject
 cmake_minimum_required(VERSION 3.16)
 cmake_minimum_required(VERSION 3.16)
 
 
+# "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)
 include($ENV{IDF_PATH}/tools/cmake/project.cmake)
 project(mcpwm_test)
 project(mcpwm_test)
 
 

+ 1 - 0
components/driver/test_apps/mcpwm/main/CMakeLists.txt

@@ -15,4 +15,5 @@ endif()
 # In order for the cases defined by `TEST_CASE` to be linked into the final elf,
 # In order for the cases defined by `TEST_CASE` to be linked into the final elf,
 # the component can be registered as WHOLE_ARCHIVE
 # the component can be registered as WHOLE_ARCHIVE
 idf_component_register(SRCS ${srcs}
 idf_component_register(SRCS ${srcs}
+                       PRIV_REQUIRES unity driver
                        WHOLE_ARCHIVE)
                        WHOLE_ARCHIVE)

+ 3 - 0
components/driver/test_apps/parlio/CMakeLists.txt

@@ -1,6 +1,9 @@
 # This is the project CMakeLists.txt file for the test subproject
 # This is the project CMakeLists.txt file for the test subproject
 cmake_minimum_required(VERSION 3.16)
 cmake_minimum_required(VERSION 3.16)
 
 
+# "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)
 include($ENV{IDF_PATH}/tools/cmake/project.cmake)
 project(parlio_test)
 project(parlio_test)
 
 

+ 1 - 0
components/driver/test_apps/parlio/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,
 # In order for the cases defined by `TEST_CASE` to be linked into the final elf,
 # the component can be registered as WHOLE_ARCHIVE
 # the component can be registered as WHOLE_ARCHIVE
 idf_component_register(SRCS ${srcs}
 idf_component_register(SRCS ${srcs}
+                       PRIV_REQUIRES unity driver
                        WHOLE_ARCHIVE)
                        WHOLE_ARCHIVE)

+ 3 - 0
components/driver/test_apps/pulse_cnt/CMakeLists.txt

@@ -1,6 +1,9 @@
 # This is the project CMakeLists.txt file for the test subproject
 # This is the project CMakeLists.txt file for the test subproject
 cmake_minimum_required(VERSION 3.16)
 cmake_minimum_required(VERSION 3.16)
 
 
+# "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)
 include($ENV{IDF_PATH}/tools/cmake/project.cmake)
 project(pcnt_test)
 project(pcnt_test)
 
 

+ 1 - 0
components/driver/test_apps/pulse_cnt/main/CMakeLists.txt

@@ -9,4 +9,5 @@ endif()
 # In order for the cases defined by `TEST_CASE` to be linked into the final elf,
 # In order for the cases defined by `TEST_CASE` to be linked into the final elf,
 # the component can be registered as WHOLE_ARCHIVE
 # the component can be registered as WHOLE_ARCHIVE
 idf_component_register(SRCS ${srcs}
 idf_component_register(SRCS ${srcs}
+                       PRIV_REQUIRES unity driver spi_flash
                        WHOLE_ARCHIVE)
                        WHOLE_ARCHIVE)

+ 3 - 0
components/driver/test_apps/rmt/CMakeLists.txt

@@ -1,6 +1,9 @@
 # This is the project CMakeLists.txt file for the test subproject
 # This is the project CMakeLists.txt file for the test subproject
 cmake_minimum_required(VERSION 3.16)
 cmake_minimum_required(VERSION 3.16)
 
 
+# "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)
 include($ENV{IDF_PATH}/tools/cmake/project.cmake)
 project(rmt_test)
 project(rmt_test)
 
 

+ 1 - 0
components/driver/test_apps/rmt/main/CMakeLists.txt

@@ -9,4 +9,5 @@ if(CONFIG_RMT_ISR_IRAM_SAFE)
 endif()
 endif()
 
 
 idf_component_register(SRCS "${srcs}"
 idf_component_register(SRCS "${srcs}"
+                       PRIV_REQUIRES unity driver esp_timer
                        WHOLE_ARCHIVE)
                        WHOLE_ARCHIVE)

+ 3 - 0
components/driver/test_apps/rs485/CMakeLists.txt

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

+ 3 - 0
components/driver/test_apps/sdio/CMakeLists.txt

@@ -1,6 +1,9 @@
 # This is the project CMakeLists.txt file for the test subproject
 # This is the project CMakeLists.txt file for the test subproject
 cmake_minimum_required(VERSION 3.16)
 cmake_minimum_required(VERSION 3.16)
 
 
+# "Trim" the build. Include the minimal set of components, main, and anything it depends on.
+set(COMPONENTS main)
+
 set(EXTRA_COMPONENT_DIRS
 set(EXTRA_COMPONENT_DIRS
     "$ENV{IDF_PATH}/tools/unit-test-app/components"
     "$ENV{IDF_PATH}/tools/unit-test-app/components"
     "$ENV{IDF_PATH}/components/driver/test_apps/components"
     "$ENV{IDF_PATH}/components/driver/test_apps/components"

+ 3 - 0
components/driver/test_apps/spi/master/CMakeLists.txt

@@ -1,6 +1,9 @@
 # This is the project CMakeLists.txt file for the test subproject
 # This is the project CMakeLists.txt file for the test subproject
 cmake_minimum_required(VERSION 3.16)
 cmake_minimum_required(VERSION 3.16)
 
 
+# "Trim" the build. Include the minimal set of components, main, and anything it depends on.
+set(COMPONENTS main)
+
 set(EXTRA_COMPONENT_DIRS
 set(EXTRA_COMPONENT_DIRS
     "$ENV{IDF_PATH}/tools/unit-test-app/components"
     "$ENV{IDF_PATH}/tools/unit-test-app/components"
     "$ENV{IDF_PATH}/components/driver/test_apps/components"
     "$ENV{IDF_PATH}/components/driver/test_apps/components"

+ 3 - 0
components/driver/test_apps/spi/param/CMakeLists.txt

@@ -1,6 +1,9 @@
 # This is the project CMakeLists.txt file for the test subproject
 # This is the project CMakeLists.txt file for the test subproject
 cmake_minimum_required(VERSION 3.16)
 cmake_minimum_required(VERSION 3.16)
 
 
+# "Trim" the build. Include the minimal set of components, main, and anything it depends on.
+set(COMPONENTS main)
+
 set(EXTRA_COMPONENT_DIRS
 set(EXTRA_COMPONENT_DIRS
     "$ENV{IDF_PATH}/tools/unit-test-app/components"
     "$ENV{IDF_PATH}/tools/unit-test-app/components"
     "$ENV{IDF_PATH}/components/driver/test_apps/components"
     "$ENV{IDF_PATH}/components/driver/test_apps/components"

+ 3 - 0
components/driver/test_apps/spi/slave/CMakeLists.txt

@@ -1,6 +1,9 @@
 # This is the project CMakeLists.txt file for the test subproject
 # This is the project CMakeLists.txt file for the test subproject
 cmake_minimum_required(VERSION 3.16)
 cmake_minimum_required(VERSION 3.16)
 
 
+# "Trim" the build. Include the minimal set of components, main, and anything it depends on.
+set(COMPONENTS main)
+
 set(EXTRA_COMPONENT_DIRS
 set(EXTRA_COMPONENT_DIRS
     "$ENV{IDF_PATH}/tools/unit-test-app/components"
     "$ENV{IDF_PATH}/tools/unit-test-app/components"
     "$ENV{IDF_PATH}/components/driver/test_apps/components"
     "$ENV{IDF_PATH}/components/driver/test_apps/components"

+ 3 - 0
components/driver/test_apps/spi/slave_hd/CMakeLists.txt

@@ -1,6 +1,9 @@
 # This is the project CMakeLists.txt file for the test subproject
 # This is the project CMakeLists.txt file for the test subproject
 cmake_minimum_required(VERSION 3.16)
 cmake_minimum_required(VERSION 3.16)
 
 
+# "Trim" the build. Include the minimal set of components, main, and anything it depends on.
+set(COMPONENTS main)
+
 set(EXTRA_COMPONENT_DIRS
 set(EXTRA_COMPONENT_DIRS
     "$ENV{IDF_PATH}/tools/unit-test-app/components"
     "$ENV{IDF_PATH}/tools/unit-test-app/components"
     "$ENV{IDF_PATH}/components/driver/test_apps/components"
     "$ENV{IDF_PATH}/components/driver/test_apps/components"

+ 3 - 0
components/driver/test_apps/temperature_sensor/CMakeLists.txt

@@ -1,5 +1,8 @@
 # This is the project CMakeLists.txt file for the test subproject
 # This is the project CMakeLists.txt file for the test subproject
 cmake_minimum_required(VERSION 3.16)
 cmake_minimum_required(VERSION 3.16)
 
 
+# "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)
 include($ENV{IDF_PATH}/tools/cmake/project.cmake)
 project(test_temperature_sensor)
 project(test_temperature_sensor)

+ 1 - 0
components/driver/test_apps/temperature_sensor/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,
 # In order for the cases defined by `TEST_CASE` to be linked into the final elf,
 # the component can be registered as WHOLE_ARCHIVE
 # the component can be registered as WHOLE_ARCHIVE
 idf_component_register(SRCS ${srcs}
 idf_component_register(SRCS ${srcs}
+                       PRIV_REQUIRES unity driver
                        WHOLE_ARCHIVE)
                        WHOLE_ARCHIVE)

+ 3 - 0
components/driver/test_apps/touch_sensor_v1/CMakeLists.txt

@@ -1,5 +1,8 @@
 # This is the project CMakeLists.txt file for the test subproject
 # This is the project CMakeLists.txt file for the test subproject
 cmake_minimum_required(VERSION 3.16)
 cmake_minimum_required(VERSION 3.16)
 
 
+# "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)
 include($ENV{IDF_PATH}/tools/cmake/project.cmake)
 project(touch_sensor_v1_test)
 project(touch_sensor_v1_test)

+ 1 - 0
components/driver/test_apps/touch_sensor_v1/main/CMakeLists.txt

@@ -1,3 +1,4 @@
 idf_component_register(SRCS "test_app_main.c" "test_touch_v1.c"
 idf_component_register(SRCS "test_app_main.c" "test_touch_v1.c"
+                       PRIV_REQUIRES unity driver
                        WHOLE_ARCHIVE
                        WHOLE_ARCHIVE
 )
 )

+ 3 - 0
components/driver/test_apps/touch_sensor_v2/CMakeLists.txt

@@ -1,5 +1,8 @@
 # This is the project CMakeLists.txt file for the test subproject
 # This is the project CMakeLists.txt file for the test subproject
 cmake_minimum_required(VERSION 3.16)
 cmake_minimum_required(VERSION 3.16)
 
 
+# "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)
 include($ENV{IDF_PATH}/tools/cmake/project.cmake)
 project(touch_sensor_v2_test)
 project(touch_sensor_v2_test)

+ 1 - 0
components/driver/test_apps/touch_sensor_v2/main/CMakeLists.txt

@@ -1,3 +1,4 @@
 idf_component_register(SRCS "test_app_main.c" "test_touch_v2.c" "touch_scope.c"
 idf_component_register(SRCS "test_app_main.c" "test_touch_v2.c" "touch_scope.c"
+                       PRIV_REQUIRES unity driver
                        WHOLE_ARCHIVE
                        WHOLE_ARCHIVE
 )
 )

+ 3 - 0
components/driver/test_apps/twai/CMakeLists.txt

@@ -1,6 +1,9 @@
 # This is the project CMakeLists.txt file for the test subproject
 # This is the project CMakeLists.txt file for the test subproject
 cmake_minimum_required(VERSION 3.16)
 cmake_minimum_required(VERSION 3.16)
 
 
+# "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)
 include($ENV{IDF_PATH}/tools/cmake/project.cmake)
 project(twai_test)
 project(twai_test)
 
 

+ 1 - 0
components/driver/test_apps/twai/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,
 # In order for the cases defined by `TEST_CASE` to be linked into the final elf,
 # the component can be registered as WHOLE_ARCHIVE
 # the component can be registered as WHOLE_ARCHIVE
 idf_component_register(SRCS ${srcs}
 idf_component_register(SRCS ${srcs}
+                       PRIV_REQUIRES unity driver
                        WHOLE_ARCHIVE)
                        WHOLE_ARCHIVE)

+ 3 - 0
components/driver/test_apps/uart/CMakeLists.txt

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

+ 3 - 0
components/esp_adc/test_apps/adc/CMakeLists.txt

@@ -3,6 +3,9 @@ cmake_minimum_required(VERSION 3.16)
 
 
 set(EXTRA_COMPONENT_DIRS "$ENV{IDF_PATH}/tools/unit-test-app/components")
 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)
 include($ENV{IDF_PATH}/tools/cmake/project.cmake)
 project(adc_test)
 project(adc_test)
 
 

+ 1 - 0
components/esp_adc/test_apps/adc/main/CMakeLists.txt

@@ -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,
 # In order for the cases defined by `TEST_CASE` to be linked into the final elf,
 # the component can be registered as WHOLE_ARCHIVE
 # the component can be registered as WHOLE_ARCHIVE
 idf_component_register(SRCS ${srcs}
 idf_component_register(SRCS ${srcs}
+                       PRIV_REQUIRES driver esp_wifi nvs_flash esp_adc test_utils
                        WHOLE_ARCHIVE)
                        WHOLE_ARCHIVE)