ci(test_apps): limit dependencies for misc test_apps

Only pull in direct dependencies for the test apps, reducing build time
as well making it possible for CI to determine if the test should run or not
when dependencies are changed.
This commit is contained in:
Marius Vikhammer 2024-02-18 13:52:59 +08:00
parent b8e6b4601c
commit 1f7c666701
13 changed files with 15 additions and 4 deletions

View File

@ -2,6 +2,7 @@
cmake_minimum_required(VERSION 3.16)
set(EXTRA_COMPONENT_DIRS "$ENV{IDF_PATH}/tools/unit-test-app/components")
set(COMPONENTS main)
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(app_update_test)

View File

@ -2,6 +2,7 @@
cmake_minimum_required(VERSION 3.16)
set(EXTRA_COMPONENT_DIRS "$ENV{IDF_PATH}/tools/unit-test-app/components")
set(COMPONENTS main)
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(esp-tls_test)

View File

@ -2,6 +2,7 @@
cmake_minimum_required(VERSION 3.16)
set(EXTRA_COMPONENT_DIRS "$ENV{IDF_PATH}/tools/unit-test-app/components")
set(COMPONENTS main)
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(esp_http_client_test)

View File

@ -2,6 +2,7 @@
cmake_minimum_required(VERSION 3.16)
set(EXTRA_COMPONENT_DIRS "$ENV{IDF_PATH}/tools/unit-test-app/components")
set(COMPONENTS main)
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(esp_http_server_test)

View File

@ -2,5 +2,7 @@
# in this exact order for cmake to work correctly
cmake_minimum_required(VERSION 3.16)
set(COMPONENTS main)
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(hal_i2c)

View File

@ -1,4 +1,5 @@
set(srcs "hal_i2c_main.c")
idf_component_register(SRCS ${srcs}
INCLUDE_DIRS ".")
INCLUDE_DIRS "."
PRIV_REQUIRES hal_i2c)

View File

@ -2,6 +2,7 @@
cmake_minimum_required(VERSION 3.16)
set(EXTRA_COMPONENT_DIRS "$ENV{IDF_PATH}/tools/unit-test-app/components")
set(COMPONENTS main)
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(lwip_test)

View File

@ -2,6 +2,7 @@
cmake_minimum_required(VERSION 3.16)
set(EXTRA_COMPONENT_DIRS "$ENV{IDF_PATH}/tools/unit-test-app/components")
set(COMPONENTS main)
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(protocomm_test)

View File

@ -2,6 +2,7 @@
cmake_minimum_required(VERSION 3.16)
set(EXTRA_COMPONENT_DIRS "$ENV{IDF_PATH}/tools/unit-test-app/components")
set(COMPONENTS main)
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(esp_tcp_transport_test)

View File

@ -1,5 +1,5 @@
set(srcs "test_app_main.c" "test_transport_basic.c" "test_transport_connect" "test_transport_fixtures.c")
idf_component_register(SRCS ${srcs}
PRIV_INCLUDE_DIRS "../../private_include" "."
PRIV_REQUIRES cmock test_utils tcp_transport unity
PRIV_REQUIRES cmock test_utils tcp_transport unity esp_psram
WHOLE_ARCHIVE)

View File

@ -3,8 +3,6 @@ CONFIG_UNITY_ENABLE_FIXTURE=y
CONFIG_SPIRAM=y
CONFIG_ESP_INT_WDT_TIMEOUT_MS=800
CONFIG_SPIRAM_OCCUPY_NO_HOST=y
CONFIG_ESP_WIFI_RX_IRAM_OPT=n
CONFIG_ESP_WIFI_IRAM_OPT=n
# Disable encrypted flash reads/writes to save IRAM in this build configuration
CONFIG_SPI_FLASH_ENABLE_ENCRYPTED_READ_WRITE=n
CONFIG_SPIRAM_ALLOW_NOINIT_SEG_EXTERNAL_MEMORY=y

View File

@ -1,5 +1,7 @@
# This is the project CMakeLists.txt file for the test subproject
cmake_minimum_required(VERSION 3.16)
set(COMPONENTS main)
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(touch_element_test)

View File

@ -1,4 +1,5 @@
idf_component_register(SRCS "test_app_main.c" "test_touch_element.c" "test_touch_button.c"
"test_touch_slider.c" "test_touch_matrix.c"
PRIV_REQUIRES unity touch_element
WHOLE_ARCHIVE
)