diff --git a/components/driver/test_apps/gpio/main/CMakeLists.txt b/components/driver/test_apps/gpio/main/CMakeLists.txt index 532eca65f6..d60fc4d15e 100644 --- a/components/driver/test_apps/gpio/main/CMakeLists.txt +++ b/components/driver/test_apps/gpio/main/CMakeLists.txt @@ -1,18 +1,15 @@ set(srcs "test_app_main.c" "test_gpio.c") -set(include_tests "-u test_app_include_gpio") - if(CONFIG_SOC_DEDICATED_GPIO_SUPPORTED) list(APPEND srcs "test_dedicated_gpio.c") - list(APPEND include_tests "-u test_app_include_dedicated_gpio") endif() if(CONFIG_SOC_SIGMADELTA_SUPPORTED) list(APPEND srcs "test_sigmadelta.c") - list(APPEND include_tests "-u test_app_include_sigmadelta") endif() -idf_component_register(SRCS ${srcs}) - -target_link_libraries(${COMPONENT_LIB} INTERFACE ${include_tests}) +# 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} + WHOLE_ARCHIVE) diff --git a/components/driver/test_apps/gpio/main/test_dedicated_gpio.c b/components/driver/test_apps/gpio/main/test_dedicated_gpio.c index 5f33da1923..6a81648912 100644 --- a/components/driver/test_apps/gpio/main/test_dedicated_gpio.c +++ b/components/driver/test_apps/gpio/main/test_dedicated_gpio.c @@ -15,10 +15,6 @@ #include "driver/gpio.h" #include "driver/dedic_gpio.h" -void test_app_include_dedicated_gpio(void) -{ -} - TEST_CASE("Dedicated_GPIO_bundle_install/uninstall", "[dedic_gpio]") { const int test_gpios[SOC_DEDIC_GPIO_OUT_CHANNELS_NUM / 2] = {0}; diff --git a/components/driver/test_apps/gpio/main/test_gpio.c b/components/driver/test_apps/gpio/main/test_gpio.c index 48e4a90403..d961bb930c 100644 --- a/components/driver/test_apps/gpio/main/test_gpio.c +++ b/components/driver/test_apps/gpio/main/test_gpio.c @@ -32,10 +32,6 @@ #include "esp_spi_flash.h" #include "esp_attr.h" -void test_app_include_gpio(void) -{ -} - // Enable internal routing for the output and input gpio pins #define TEST_GPIO_INTERNAL_ROUTING 1 diff --git a/components/driver/test_apps/gpio/main/test_sigmadelta.c b/components/driver/test_apps/gpio/main/test_sigmadelta.c index 6c25e57bf2..2cf3f472e2 100644 --- a/components/driver/test_apps/gpio/main/test_sigmadelta.c +++ b/components/driver/test_apps/gpio/main/test_sigmadelta.c @@ -10,10 +10,6 @@ #include "soc/soc_caps.h" #include "driver/sigmadelta.h" -void test_app_include_sigmadelta(void) -{ -} - TEST_CASE("SigmaDelta_config_test", "[sigma_delta]") { sigmadelta_config_t sigmadelta_cfg = { diff --git a/components/driver/test_apps/gptimer/main/CMakeLists.txt b/components/driver/test_apps/gptimer/main/CMakeLists.txt index 252a616260..4170f3fd44 100644 --- a/components/driver/test_apps/gptimer/main/CMakeLists.txt +++ b/components/driver/test_apps/gptimer/main/CMakeLists.txt @@ -2,6 +2,7 @@ set(srcs "test_app_main.c" "test_gptimer.c" "test_gptimer_iram.c") -idf_component_register(SRCS ${srcs}) - -target_link_libraries(${COMPONENT_LIB} INTERFACE "-u test_app_include_gptimer" "-u test_app_include_gptimer_iram") +# 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} + WHOLE_ARCHIVE) diff --git a/components/driver/test_apps/gptimer/main/test_gptimer.c b/components/driver/test_apps/gptimer/main/test_gptimer.c index 58783b41d8..82b9fa0a37 100644 --- a/components/driver/test_apps/gptimer/main/test_gptimer.c +++ b/components/driver/test_apps/gptimer/main/test_gptimer.c @@ -19,10 +19,6 @@ #define TEST_ALARM_CALLBACK_ATTR #endif // CONFIG_GPTIMER_ISR_IRAM_SAFE -void test_app_include_gptimer(void) -{ -} - TEST_CASE("gptimer_set_get_raw_count", "[gptimer]") { gptimer_config_t config = { diff --git a/components/driver/test_apps/gptimer/main/test_gptimer_iram.c b/components/driver/test_apps/gptimer/main/test_gptimer_iram.c index cfbeb1bede..5b1e242e06 100644 --- a/components/driver/test_apps/gptimer/main/test_gptimer_iram.c +++ b/components/driver/test_apps/gptimer/main/test_gptimer_iram.c @@ -14,10 +14,6 @@ #include "esp_spi_flash.h" #include "soc/soc_caps.h" -void test_app_include_gptimer_iram(void) -{ -} - #if CONFIG_GPTIMER_ISR_IRAM_SAFE typedef struct { diff --git a/components/driver/test_apps/legacy_pcnt_driver/main/CMakeLists.txt b/components/driver/test_apps/legacy_pcnt_driver/main/CMakeLists.txt index cdcd148961..193f3ba02d 100644 --- a/components/driver/test_apps/legacy_pcnt_driver/main/CMakeLists.txt +++ b/components/driver/test_apps/legacy_pcnt_driver/main/CMakeLists.txt @@ -1,6 +1,7 @@ set(srcs "test_app_main.c" "test_legacy_pcnt.c") -idf_component_register(SRCS ${srcs}) - -target_link_libraries(${COMPONENT_LIB} INTERFACE "-u test_app_include_legacy_pcnt") +# 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} + WHOLE_ARCHIVE) diff --git a/components/driver/test_apps/legacy_pcnt_driver/main/test_legacy_pcnt.c b/components/driver/test_apps/legacy_pcnt_driver/main/test_legacy_pcnt.c index 147cc1d354..af54d80722 100644 --- a/components/driver/test_apps/legacy_pcnt_driver/main/test_legacy_pcnt.c +++ b/components/driver/test_apps/legacy_pcnt_driver/main/test_legacy_pcnt.c @@ -666,7 +666,3 @@ TEST_CASE("PCNT_counting_mode_test", "[pcnt]") printf("PCNT mode test for negative count\n"); count_mode_test(PCNT_CTRL_GND_IO); } - -void test_app_include_legacy_pcnt(void) -{ -} diff --git a/components/driver/test_apps/legacy_pcnt_driver/pytest_legacy_pcnt.py b/components/driver/test_apps/legacy_pcnt_driver/pytest_legacy_pcnt.py index bb120bc193..8bcfdbd997 100644 --- a/components/driver/test_apps/legacy_pcnt_driver/pytest_legacy_pcnt.py +++ b/components/driver/test_apps/legacy_pcnt_driver/pytest_legacy_pcnt.py @@ -16,7 +16,7 @@ from pytest_embedded import Dut ], indirect=True, ) -def test_gptimer(dut: Dut) -> None: +def test_legacy_pcnt(dut: Dut) -> None: dut.expect_exact('Press ENTER to see the list of tests') dut.write('*') dut.expect_unity_test_output(timeout=240) diff --git a/components/driver/test_apps/legacy_rtc_temp_driver/main/CMakeLists.txt b/components/driver/test_apps/legacy_rtc_temp_driver/main/CMakeLists.txt index 483019a963..ab7674124a 100644 --- a/components/driver/test_apps/legacy_rtc_temp_driver/main/CMakeLists.txt +++ b/components/driver/test_apps/legacy_rtc_temp_driver/main/CMakeLists.txt @@ -1,7 +1,7 @@ set(srcs "test_app_main.c" "test_rtc_temp_driver.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 unity) - -target_link_libraries(${COMPONENT_LIB} INTERFACE "-u test_app_include_rtc_temp_driver") + WHOLE_ARCHIVE) diff --git a/components/driver/test_apps/legacy_rtc_temp_driver/main/test_rtc_temp_driver.c b/components/driver/test_apps/legacy_rtc_temp_driver/main/test_rtc_temp_driver.c index aa3071b852..7b3fc55a7a 100644 --- a/components/driver/test_apps/legacy_rtc_temp_driver/main/test_rtc_temp_driver.c +++ b/components/driver/test_apps/legacy_rtc_temp_driver/main/test_rtc_temp_driver.c @@ -9,10 +9,6 @@ #include "unity.h" #include "driver/temp_sensor.h" -void test_app_include_rtc_temp_driver(void) -{ -} - TEST_CASE("Temperature_legacy_workflow_test", "[hw_timer]") { printf("Initializing Temperature sensor\n"); diff --git a/components/driver/test_apps/legacy_timer_driver/main/CMakeLists.txt b/components/driver/test_apps/legacy_timer_driver/main/CMakeLists.txt index fc2def7714..fea9144c4d 100644 --- a/components/driver/test_apps/legacy_timer_driver/main/CMakeLists.txt +++ b/components/driver/test_apps/legacy_timer_driver/main/CMakeLists.txt @@ -1,6 +1,7 @@ set(srcs "test_app_main.c" "test_legacy_timer.c") -idf_component_register(SRCS ${srcs}) - -target_link_libraries(${COMPONENT_LIB} INTERFACE "-u test_app_include_legacy_timer") +# 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} + WHOLE_ARCHIVE) diff --git a/components/driver/test_apps/legacy_timer_driver/main/test_legacy_timer.c b/components/driver/test_apps/legacy_timer_driver/main/test_legacy_timer.c index f2e5eabad3..604de5382e 100644 --- a/components/driver/test_apps/legacy_timer_driver/main/test_legacy_timer.c +++ b/components/driver/test_apps/legacy_timer_driver/main/test_legacy_timer.c @@ -1007,7 +1007,3 @@ TEST_CASE("Timer_check_reinitialization_sequence", "[hw_timer]") // The pending timer interrupt should not be triggered TEST_ASSERT_EQUAL(0, timer_group_get_intr_status_in_isr(TIMER_GROUP_0) & TIMER_INTR_T0); } - -void test_app_include_legacy_timer(void) -{ -} diff --git a/components/driver/test_apps/pulse_cnt/main/CMakeLists.txt b/components/driver/test_apps/pulse_cnt/main/CMakeLists.txt index 37a2f532da..c035b833ec 100644 --- a/components/driver/test_apps/pulse_cnt/main/CMakeLists.txt +++ b/components/driver/test_apps/pulse_cnt/main/CMakeLists.txt @@ -1,6 +1,7 @@ set(srcs "test_app_main.c" "test_pulse_cnt.c") -idf_component_register(SRCS ${srcs}) - -target_link_libraries(${COMPONENT_LIB} INTERFACE "-u test_app_include_pulse_cnt") +# 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} + WHOLE_ARCHIVE) diff --git a/components/driver/test_apps/pulse_cnt/main/test_pulse_cnt.c b/components/driver/test_apps/pulse_cnt/main/test_pulse_cnt.c index e6dc900e04..8a8b3b6be9 100644 --- a/components/driver/test_apps/pulse_cnt/main/test_pulse_cnt.c +++ b/components/driver/test_apps/pulse_cnt/main/test_pulse_cnt.c @@ -402,7 +402,3 @@ TEST_CASE("pcnt_zero_cross_mode", "[pcnt]") TEST_ESP_OK(pcnt_del_channel(channelB)); TEST_ESP_OK(pcnt_del_unit(unit)); } - -void test_app_include_pulse_cnt(void) -{ -} diff --git a/components/driver/test_apps/pulse_cnt/pytest_pulse_cnt.py b/components/driver/test_apps/pulse_cnt/pytest_pulse_cnt.py index 8e1f892417..f127535505 100644 --- a/components/driver/test_apps/pulse_cnt/pytest_pulse_cnt.py +++ b/components/driver/test_apps/pulse_cnt/pytest_pulse_cnt.py @@ -17,7 +17,7 @@ from pytest_embedded import Dut ], indirect=True, ) -def test_gptimer(dut: Dut) -> None: +def test_pulse_cnt(dut: Dut) -> None: dut.expect_exact('Press ENTER to see the list of tests') dut.write('*') dut.expect_unity_test_output() diff --git a/components/driver/test_apps/temperature_sensor/CMakeLists.txt b/components/driver/test_apps/temperature_sensor/CMakeLists.txt index bc01ce7841..e8b2c77d1f 100644 --- a/components/driver/test_apps/temperature_sensor/CMakeLists.txt +++ b/components/driver/test_apps/temperature_sensor/CMakeLists.txt @@ -2,4 +2,4 @@ cmake_minimum_required(VERSION 3.5) include($ENV{IDF_PATH}/tools/cmake/project.cmake) -project(test_app_include_temperature_sensor) +project(test_temperature_sensor) diff --git a/components/driver/test_apps/temperature_sensor/main/CMakeLists.txt b/components/driver/test_apps/temperature_sensor/main/CMakeLists.txt index 2bffac2c61..56250ad55a 100644 --- a/components/driver/test_apps/temperature_sensor/main/CMakeLists.txt +++ b/components/driver/test_apps/temperature_sensor/main/CMakeLists.txt @@ -1,7 +1,7 @@ set(srcs "test_app_main.c" "test_temperature_sensor.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 unity) - -target_link_libraries(${COMPONENT_LIB} INTERFACE "-u test_app_include_temperature_sensor") + WHOLE_ARCHIVE) diff --git a/components/driver/test_apps/temperature_sensor/main/test_temperature_sensor.c b/components/driver/test_apps/temperature_sensor/main/test_temperature_sensor.c index f5dcbab265..0269e28fc9 100644 --- a/components/driver/test_apps/temperature_sensor/main/test_temperature_sensor.c +++ b/components/driver/test_apps/temperature_sensor/main/test_temperature_sensor.c @@ -9,10 +9,6 @@ #include "unity.h" #include "driver/temperature_sensor.h" -void test_app_include_temperature_sensor(void) -{ -} - TEST_CASE("Temperature_sensor_driver_workflow_test", "[temperature_sensor]") { printf("Initializing Temperature sensor\n"); diff --git a/components/esp_lcd/test_apps/i2c_lcd/main/CMakeLists.txt b/components/esp_lcd/test_apps/i2c_lcd/main/CMakeLists.txt index 1e685eb807..db4aa94946 100644 --- a/components/esp_lcd/test_apps/i2c_lcd/main/CMakeLists.txt +++ b/components/esp_lcd/test_apps/i2c_lcd/main/CMakeLists.txt @@ -1,6 +1,7 @@ set(srcs "test_app_main.c" "test_i2c_lcd_panel.c") -idf_component_register(SRCS ${srcs}) - -target_link_libraries(${COMPONENT_LIB} INTERFACE "-u test_app_include_i2c_lcd") +# 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} + WHOLE_ARCHIVE) diff --git a/components/esp_lcd/test_apps/i2c_lcd/main/test_i2c_lcd_panel.c b/components/esp_lcd/test_apps/i2c_lcd/main/test_i2c_lcd_panel.c index 83ee5590d2..f71c1c4a3a 100644 --- a/components/esp_lcd/test_apps/i2c_lcd/main/test_i2c_lcd_panel.c +++ b/components/esp_lcd/test_apps/i2c_lcd/main/test_i2c_lcd_panel.c @@ -14,10 +14,6 @@ #include "esp_system.h" #include "test_i2c_board.h" -void test_app_include_i2c_lcd(void) -{ -} - TEST_CASE("lcd_panel_with_i2c_interface_(ssd1306)", "[lcd]") { const uint8_t pattern[][16] = {{ diff --git a/components/esp_lcd/test_apps/i80_lcd/main/CMakeLists.txt b/components/esp_lcd/test_apps/i80_lcd/main/CMakeLists.txt index eef50b7e7c..7e50a26ef7 100644 --- a/components/esp_lcd/test_apps/i80_lcd/main/CMakeLists.txt +++ b/components/esp_lcd/test_apps/i80_lcd/main/CMakeLists.txt @@ -1,6 +1,7 @@ set(srcs "test_app_main.c" "test_i80_lcd_panel.c") -idf_component_register(SRCS ${srcs}) - -target_link_libraries(${COMPONENT_LIB} INTERFACE "-u test_app_include_i80_lcd") +# 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} + WHOLE_ARCHIVE) diff --git a/components/esp_lcd/test_apps/i80_lcd/main/test_i80_lcd_panel.c b/components/esp_lcd/test_apps/i80_lcd/main/test_i80_lcd_panel.c index 9c7ee6524c..c020a70c32 100644 --- a/components/esp_lcd/test_apps/i80_lcd/main/test_i80_lcd_panel.c +++ b/components/esp_lcd/test_apps/i80_lcd/main/test_i80_lcd_panel.c @@ -17,10 +17,6 @@ #include "driver/gpio.h" #include "test_i80_board.h" -void test_app_include_i80_lcd(void) -{ -} - #if SOC_I2S_LCD_I80_VARIANT #include "driver/i2s.h" diff --git a/components/esp_lcd/test_apps/rgb_lcd/main/CMakeLists.txt b/components/esp_lcd/test_apps/rgb_lcd/main/CMakeLists.txt index ecad51a17c..ade68f9236 100644 --- a/components/esp_lcd/test_apps/rgb_lcd/main/CMakeLists.txt +++ b/components/esp_lcd/test_apps/rgb_lcd/main/CMakeLists.txt @@ -1,6 +1,7 @@ set(srcs "test_app_main.c" "test_rgb_panel.c") -idf_component_register(SRCS ${srcs}) - -target_link_libraries(${COMPONENT_LIB} INTERFACE "-u test_app_include_rgb_lcd") +# 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} + WHOLE_ARCHIVE) diff --git a/components/esp_lcd/test_apps/rgb_lcd/main/test_rgb_panel.c b/components/esp_lcd/test_apps/rgb_lcd/main/test_rgb_panel.c index 0e35ad3cbd..60b2dd7716 100644 --- a/components/esp_lcd/test_apps/rgb_lcd/main/test_rgb_panel.c +++ b/components/esp_lcd/test_apps/rgb_lcd/main/test_rgb_panel.c @@ -23,10 +23,6 @@ #define TEST_IMG_SIZE (100 * 100 * sizeof(uint16_t)) -void test_app_include_rgb_lcd(void) -{ -} - static esp_lcd_panel_handle_t test_rgb_panel_initialization(bool stream_mode, esp_lcd_rgb_panel_frame_trans_done_cb_t cb, void *user_data) { esp_lcd_panel_handle_t panel_handle = NULL; diff --git a/components/esp_lcd/test_apps/spi_lcd/main/CMakeLists.txt b/components/esp_lcd/test_apps/spi_lcd/main/CMakeLists.txt index aacecc1821..2c2b5de923 100644 --- a/components/esp_lcd/test_apps/spi_lcd/main/CMakeLists.txt +++ b/components/esp_lcd/test_apps/spi_lcd/main/CMakeLists.txt @@ -1,6 +1,7 @@ set(srcs "test_app_main.c" "test_spi_lcd_panel.c") -idf_component_register(SRCS ${srcs}) - -target_link_libraries(${COMPONENT_LIB} INTERFACE "-u test_app_include_spi_lcd") +# 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} + WHOLE_ARCHIVE) diff --git a/components/esp_lcd/test_apps/spi_lcd/main/test_spi_lcd_panel.c b/components/esp_lcd/test_apps/spi_lcd/main/test_spi_lcd_panel.c index ea9514fbbd..c02426160c 100644 --- a/components/esp_lcd/test_apps/spi_lcd/main/test_spi_lcd_panel.c +++ b/components/esp_lcd/test_apps/spi_lcd/main/test_spi_lcd_panel.c @@ -18,10 +18,6 @@ #define TEST_SPI_HOST_ID SPI2_HOST -void test_app_include_spi_lcd(void) -{ -} - void test_spi_lcd_common_initialize(esp_lcd_panel_io_handle_t *io_handle, esp_lcd_panel_io_color_trans_done_cb_t on_color_trans_done, void *user_data, int cmd_bits, int param_bits, bool oct_mode) {