diff --git a/.gitlab/ci/target-test.yml b/.gitlab/ci/target-test.yml index 36c49b7028..9f15c4c960 100644 --- a/.gitlab/ci/target-test.yml +++ b/.gitlab/ci/target-test.yml @@ -715,6 +715,24 @@ pytest_components_esp32_adc: artifacts: false tags: [ esp32, adc ] +pytest_components_esp32_sdmmc: + extends: + - .pytest_components_dir_template + - .rules:test:component_ut-esp32 + needs: + - job: build_pytest_components_esp32 + artifacts: false + tags: [ esp32, sdcard ] + +pytest_components_esp32s3_sdmmc: + extends: + - .pytest_components_dir_template + - .rules:test:component_ut-esp32s3 + needs: + - job: build_pytest_components_esp32s3 + artifacts: false + tags: [ esp32s3, sdcard ] + pytest_components_esp32_sdio: extends: - .pytest_components_dir_template @@ -1171,15 +1189,6 @@ pytest_components_esp32c3_flash_multi: artifacts: false tags: [ esp32c3, flash_multi ] -pytest_components_esp32_sdmmc: - extends: - - .pytest_components_dir_template - - .rules:test:component_ut-esp32 - needs: - - job: build_pytest_components_esp32 - artifacts: false - tags: [ esp32, sdcard_sdmode ] - pytest_components_esp32_sdspi: extends: - .pytest_components_dir_template diff --git a/components/esp_driver_sdmmc/test_apps/.build-test-rules.yml b/components/esp_driver_sdmmc/test_apps/.build-test-rules.yml new file mode 100644 index 0000000000..7a4947815c --- /dev/null +++ b/components/esp_driver_sdmmc/test_apps/.build-test-rules.yml @@ -0,0 +1,6 @@ +components/esp_driver_sdmmc/test_apps/sdmmc: + disable: + - if: SOC_SDMMC_HOST_SUPPORTED != 1 + depends_components: + - sdmmc + - esp_driver_sdmmc diff --git a/components/esp_driver_sdmmc/test_apps/sd_test_utils/components/common_test_flows/CMakeLists.txt b/components/esp_driver_sdmmc/test_apps/sd_test_utils/components/common_test_flows/CMakeLists.txt new file mode 100644 index 0000000000..6fc914d3ff --- /dev/null +++ b/components/esp_driver_sdmmc/test_apps/sd_test_utils/components/common_test_flows/CMakeLists.txt @@ -0,0 +1,9 @@ +set(srcs "sdmmc_test_cd_wp_common.c" "sdmmc_test_rw_common.c") + +set(public_include "include") + +idf_component_register( + SRCS ${srcs} + INCLUDE_DIRS ${public_include} + PRIV_REQUIRES sdmmc unity test_utils +) diff --git a/tools/test_apps/storage/sdmmc_console/components/sdmmc_tests/sdmmc_test_cd_wp_common.h b/components/esp_driver_sdmmc/test_apps/sd_test_utils/components/common_test_flows/include/sdmmc_test_cd_wp_common.h similarity index 100% rename from tools/test_apps/storage/sdmmc_console/components/sdmmc_tests/sdmmc_test_cd_wp_common.h rename to components/esp_driver_sdmmc/test_apps/sd_test_utils/components/common_test_flows/include/sdmmc_test_cd_wp_common.h diff --git a/tools/test_apps/storage/sdmmc_console/components/sdmmc_tests/sdmmc_test_rw_common.h b/components/esp_driver_sdmmc/test_apps/sd_test_utils/components/common_test_flows/include/sdmmc_test_rw_common.h similarity index 100% rename from tools/test_apps/storage/sdmmc_console/components/sdmmc_tests/sdmmc_test_rw_common.h rename to components/esp_driver_sdmmc/test_apps/sd_test_utils/components/common_test_flows/include/sdmmc_test_rw_common.h diff --git a/tools/test_apps/storage/sdmmc_console/components/sdmmc_tests/sdmmc_test_cd_wp_common.c b/components/esp_driver_sdmmc/test_apps/sd_test_utils/components/common_test_flows/sdmmc_test_cd_wp_common.c similarity index 99% rename from tools/test_apps/storage/sdmmc_console/components/sdmmc_tests/sdmmc_test_cd_wp_common.c rename to components/esp_driver_sdmmc/test_apps/sd_test_utils/components/common_test_flows/sdmmc_test_cd_wp_common.c index 73ff1b5f88..3eb9ab984a 100644 --- a/tools/test_apps/storage/sdmmc_console/components/sdmmc_tests/sdmmc_test_cd_wp_common.c +++ b/components/esp_driver_sdmmc/test_apps/sd_test_utils/components/common_test_flows/sdmmc_test_cd_wp_common.c @@ -11,7 +11,6 @@ #include "sdmmc_cmd.h" #include "sdmmc_test_cd_wp_common.h" - void sdmmc_test_cd_input(int gpio_cd_num, const sdmmc_host_t* config) { sdmmc_card_t* card = malloc(sizeof(sdmmc_card_t)); diff --git a/tools/test_apps/storage/sdmmc_console/components/sdmmc_tests/sdmmc_test_rw_common.c b/components/esp_driver_sdmmc/test_apps/sd_test_utils/components/common_test_flows/sdmmc_test_rw_common.c similarity index 88% rename from tools/test_apps/storage/sdmmc_console/components/sdmmc_tests/sdmmc_test_rw_common.c rename to components/esp_driver_sdmmc/test_apps/sd_test_utils/components/common_test_flows/sdmmc_test_rw_common.c index cf889efd5f..625f9d0786 100644 --- a/tools/test_apps/storage/sdmmc_console/components/sdmmc_tests/sdmmc_test_rw_common.c +++ b/components/esp_driver_sdmmc/test_apps/sd_test_utils/components/common_test_flows/sdmmc_test_rw_common.c @@ -19,7 +19,8 @@ static void do_single_rw_perf_test(sdmmc_card_t* card, size_t start_block, size_t block_count, size_t alignment, FILE* performance_log); -static void fill_buffer(uint32_t seed, uint8_t* dst, size_t count) { +static void fill_buffer(uint32_t seed, uint8_t* dst, size_t count) +{ srand(seed); for (size_t i = 0; i < count; ++i) { uint32_t val = rand(); @@ -29,7 +30,8 @@ static void fill_buffer(uint32_t seed, uint8_t* dst, size_t count) { // Check if the buffer pointed to by 'dst' contains 'count' 32-bit // ints generated from 'rand' with the starting value of 'seed' -static void check_buffer(uint32_t seed, const uint8_t* src, size_t count) { +static void check_buffer(uint32_t seed, const uint8_t* src, size_t count) +{ srand(seed); for (size_t i = 0; i < count; ++i) { uint32_t val; @@ -77,7 +79,7 @@ static void do_single_rw_perf_test(sdmmc_card_t* card, size_t start_block, stdout = performance_log; static const char wr_speed_str[] = "SDMMC_WR_SPEED"; static const char rd_speed_str[] = "SDMMC_RD_SPEED"; - int aligned = ((alignment % 4) == 0)? 1: 0; + int aligned = ((alignment % 4) == 0) ? 1 : 0; IDF_LOG_PERFORMANCE(wr_speed_str, "%d, blk_n: %d, aligned: %d", (int)(total_size * 1000 / time_wr), block_count, aligned); IDF_LOG_PERFORMANCE(rd_speed_str, "%d, blk_n: %d, aligned: %d", @@ -142,15 +144,15 @@ void sdmmc_test_rw_with_offset(sdmmc_card_t* card) do_single_rw_perf_test(card, card->csd.capacity - 64, 32, 4, NULL); do_single_rw_perf_test(card, card->csd.capacity - 64, 64, 4, NULL); do_single_rw_perf_test(card, card->csd.capacity - 8, 1, 4, NULL); - do_single_rw_perf_test(card, card->csd.capacity/2, 1, 4, NULL); - do_single_rw_perf_test(card, card->csd.capacity/2, 4, 4, NULL); - do_single_rw_perf_test(card, card->csd.capacity/2, 8, 4, NULL); - do_single_rw_perf_test(card, card->csd.capacity/2, 16, 4, NULL); - do_single_rw_perf_test(card, card->csd.capacity/2, 32, 4, NULL); - do_single_rw_perf_test(card, card->csd.capacity/2, 64, 4, NULL); - do_single_rw_perf_test(card, card->csd.capacity/2, 128, 4, NULL); + do_single_rw_perf_test(card, card->csd.capacity / 2, 1, 4, NULL); + do_single_rw_perf_test(card, card->csd.capacity / 2, 4, 4, NULL); + do_single_rw_perf_test(card, card->csd.capacity / 2, 8, 4, NULL); + do_single_rw_perf_test(card, card->csd.capacity / 2, 16, 4, NULL); + do_single_rw_perf_test(card, card->csd.capacity / 2, 32, 4, NULL); + do_single_rw_perf_test(card, card->csd.capacity / 2, 64, 4, NULL); + do_single_rw_perf_test(card, card->csd.capacity / 2, 128, 4, NULL); /* unaligned */ - do_single_rw_perf_test(card, card->csd.capacity/2, 1, 1, NULL); - do_single_rw_perf_test(card, card->csd.capacity/2, 8, 1, NULL); - do_single_rw_perf_test(card, card->csd.capacity/2, 128, 1, NULL); + do_single_rw_perf_test(card, card->csd.capacity / 2, 1, 1, NULL); + do_single_rw_perf_test(card, card->csd.capacity / 2, 8, 1, NULL); + do_single_rw_perf_test(card, card->csd.capacity / 2, 128, 1, NULL); } diff --git a/tools/test_apps/storage/sdmmc_console/components/sdmmc_test_board/CMakeLists.txt b/components/esp_driver_sdmmc/test_apps/sd_test_utils/components/sdmmc_test_boards/CMakeLists.txt similarity index 58% rename from tools/test_apps/storage/sdmmc_console/components/sdmmc_test_board/CMakeLists.txt rename to components/esp_driver_sdmmc/test_apps/sd_test_utils/components/sdmmc_test_boards/CMakeLists.txt index f241106c7a..8bed4b6fec 100644 --- a/tools/test_apps/storage/sdmmc_console/components/sdmmc_test_board/CMakeLists.txt +++ b/components/esp_driver_sdmmc/test_apps/sd_test_utils/components/sdmmc_test_boards/CMakeLists.txt @@ -1,3 +1,3 @@ idf_component_register(SRCS sdmmc_test_board.c sdmmc_test_board_defs.c INCLUDE_DIRS include - PRIV_REQUIRES sdmmc esp_driver_sdmmc esp_driver_sdspi) + REQUIRES esp_driver_sdmmc esp_driver_sdspi esp_driver_gpio) diff --git a/tools/test_apps/storage/sdmmc_console/components/sdmmc_test_board/Kconfig.projbuild b/components/esp_driver_sdmmc/test_apps/sd_test_utils/components/sdmmc_test_boards/Kconfig.projbuild similarity index 100% rename from tools/test_apps/storage/sdmmc_console/components/sdmmc_test_board/Kconfig.projbuild rename to components/esp_driver_sdmmc/test_apps/sd_test_utils/components/sdmmc_test_boards/Kconfig.projbuild diff --git a/components/esp_driver_sdmmc/test_apps/sd_test_utils/components/sdmmc_test_boards/README.md b/components/esp_driver_sdmmc/test_apps/sd_test_utils/components/sdmmc_test_boards/README.md new file mode 100644 index 0000000000..192e7e6e47 --- /dev/null +++ b/components/esp_driver_sdmmc/test_apps/sd_test_utils/components/sdmmc_test_boards/README.md @@ -0,0 +1,8 @@ +# SDMMC Test Boards + +This component is a test utility component for test board info: +- SDMMC test boards (e.g. ESP32_WROVER_KIT, ESP32S3_USB_OTG, etc.) +- eMMC test boards +- SDMMC with SD breakout adapter board +- SDSPI with SD breakout adapter board +- ... diff --git a/tools/test_apps/storage/sdmmc_console/components/sdmmc_test_board/include/sdmmc_test_board.h b/components/esp_driver_sdmmc/test_apps/sd_test_utils/components/sdmmc_test_boards/include/sdmmc_test_board.h similarity index 99% rename from tools/test_apps/storage/sdmmc_console/components/sdmmc_test_board/include/sdmmc_test_board.h rename to components/esp_driver_sdmmc/test_apps/sd_test_utils/components/sdmmc_test_boards/include/sdmmc_test_board.h index f7b8e22741..1417f36d82 100644 --- a/tools/test_apps/storage/sdmmc_console/components/sdmmc_test_board/include/sdmmc_test_board.h +++ b/components/esp_driver_sdmmc/test_apps/sd_test_utils/components/sdmmc_test_boards/include/sdmmc_test_board.h @@ -56,7 +56,6 @@ typedef struct { void (*card_power_set)(bool); /*< function to turn card power on or off */ } sdmmc_test_board_info_t; - /** * @brief Get information about the test board * @return Pointer to the board information structure @@ -92,7 +91,6 @@ void sdmmc_test_board_get_config_sdmmc(int slot_index, sdmmc_host_t *out_host_co void sdmmc_test_board_get_config_sdspi(int slot_index, sdmmc_host_t *out_host_config, spi_bus_config_t *out_spi_bus_config, sdspi_device_config_t *out_dev_config); - /** * @brief Set card power on or off * For boards with card power control circuit, this function allows powering the card up or down. diff --git a/tools/test_apps/storage/sdmmc_console/components/sdmmc_test_board/sdmmc_test_board.c b/components/esp_driver_sdmmc/test_apps/sd_test_utils/components/sdmmc_test_boards/sdmmc_test_board.c similarity index 99% rename from tools/test_apps/storage/sdmmc_console/components/sdmmc_test_board/sdmmc_test_board.c rename to components/esp_driver_sdmmc/test_apps/sd_test_utils/components/sdmmc_test_boards/sdmmc_test_board.c index 0b9e20aed2..01b85ffdcf 100644 --- a/tools/test_apps/storage/sdmmc_console/components/sdmmc_test_board/sdmmc_test_board.c +++ b/components/esp_driver_sdmmc/test_apps/sd_test_utils/components/sdmmc_test_boards/sdmmc_test_board.c @@ -8,7 +8,6 @@ #include "sdkconfig.h" #include "soc/soc_caps.h" - const sdmmc_test_board_slot_info_t* sdmmc_test_board_get_slot_info(int slot_index) { assert(slot_index >= 0 && slot_index < SDMMC_TEST_BOARD_MAX_SLOTS); diff --git a/tools/test_apps/storage/sdmmc_console/components/sdmmc_test_board/sdmmc_test_board_defs.c b/components/esp_driver_sdmmc/test_apps/sd_test_utils/components/sdmmc_test_boards/sdmmc_test_board_defs.c similarity index 99% rename from tools/test_apps/storage/sdmmc_console/components/sdmmc_test_board/sdmmc_test_board_defs.c rename to components/esp_driver_sdmmc/test_apps/sd_test_utils/components/sdmmc_test_boards/sdmmc_test_board_defs.c index bb76aed3d0..2610e1a78b 100644 --- a/tools/test_apps/storage/sdmmc_console/components/sdmmc_test_board/sdmmc_test_board_defs.c +++ b/components/esp_driver_sdmmc/test_apps/sd_test_utils/components/sdmmc_test_boards/sdmmc_test_board_defs.c @@ -385,7 +385,6 @@ static const sdmmc_test_board_info_t s_board_info = { #endif // CONFIG_SDMMC_BOARD_* - const sdmmc_test_board_info_t* sdmmc_test_board_get_info(void) { return &s_board_info; diff --git a/components/esp_driver_sdmmc/test_apps/sdmmc/CMakeLists.txt b/components/esp_driver_sdmmc/test_apps/sdmmc/CMakeLists.txt new file mode 100644 index 0000000000..937ae28ab7 --- /dev/null +++ b/components/esp_driver_sdmmc/test_apps/sdmmc/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.16) + +list(APPEND EXTRA_COMPONENT_DIRS "$ENV{IDF_PATH}/tools/unit-test-app/components") +list(APPEND EXTRA_COMPONENT_DIRS "$ENV{IDF_PATH}/components/esp_driver_sdmmc/test_apps/sd_test_utils/components") +set(COMPONENTS main) + +include($ENV{IDF_PATH}/tools/cmake/project.cmake) +project(sdmmc_test_console) diff --git a/components/esp_driver_sdmmc/test_apps/sdmmc/README.md b/components/esp_driver_sdmmc/test_apps/sdmmc/README.md new file mode 100644 index 0000000000..7fb40f3f87 --- /dev/null +++ b/components/esp_driver_sdmmc/test_apps/sdmmc/README.md @@ -0,0 +1,2 @@ +| Supported Targets | ESP32 | ESP32-P4 | ESP32-S3 | +| ----------------- | ----- | -------- | -------- | diff --git a/components/esp_driver_sdmmc/test_apps/sdmmc/components/sdmmc_tests/CMakeLists.txt b/components/esp_driver_sdmmc/test_apps/sdmmc/components/sdmmc_tests/CMakeLists.txt new file mode 100644 index 0000000000..c406967c6b --- /dev/null +++ b/components/esp_driver_sdmmc/test_apps/sdmmc/components/sdmmc_tests/CMakeLists.txt @@ -0,0 +1,20 @@ +set(srcs) + + +if(CONFIG_SOC_SDMMC_HOST_SUPPORTED) + list(APPEND srcs "sdmmc_test_begin_end_sd.c" + "sdmmc_test_cd_wp_sd.c" + "sdmmc_test_probe_sd.c" + "sdmmc_test_rw_sd.c") +endif() + +set(priv_requires "sdmmc" + "esp_driver_sdmmc" + "sdmmc_test_boards" + "common_test_flows" + "unity" +) + +idf_component_register(SRCS ${srcs} + PRIV_REQUIRES ${priv_requires} + WHOLE_ARCHIVE TRUE) diff --git a/tools/test_apps/storage/sdmmc_console/components/sdmmc_tests/sdmmc_test_begin_end_sd.c b/components/esp_driver_sdmmc/test_apps/sdmmc/components/sdmmc_tests/sdmmc_test_begin_end_sd.c similarity index 90% rename from tools/test_apps/storage/sdmmc_console/components/sdmmc_tests/sdmmc_test_begin_end_sd.c rename to components/esp_driver_sdmmc/test_apps/sdmmc/components/sdmmc_tests/sdmmc_test_begin_end_sd.c index 01cfacb692..a5aaa26994 100644 --- a/tools/test_apps/storage/sdmmc_console/components/sdmmc_tests/sdmmc_test_begin_end_sd.c +++ b/components/esp_driver_sdmmc/test_apps/sdmmc/components/sdmmc_tests/sdmmc_test_begin_end_sd.c @@ -13,7 +13,7 @@ #include "driver/sdmmc_host.h" #include "sd_protocol_defs.h" #include "sdmmc_cmd.h" -#include "sdmmc_test_begin_end.h" +#include "sdmmc_test_begin_end_sd.h" #include "hal/gpio_hal.h" void sdmmc_test_sd_skip_if_board_incompatible(int slot, int width, int freq_khz, int ddr) @@ -33,7 +33,8 @@ void sdmmc_test_sd_skip_if_board_incompatible(int slot, int width, int freq_khz, TEST_IGNORE_MESSAGE("Board doesn't support required bus width"); } } -void sdmmc_test_sd_begin(int slot, int width, int freq_khz, int ddr, sdmmc_card_t *out_card) { +void sdmmc_test_sd_begin(int slot, int width, int freq_khz, int ddr, sdmmc_card_t *out_card) +{ sdmmc_host_t config = SDMMC_HOST_DEFAULT(); sdmmc_slot_config_t slot_config = SDMMC_SLOT_CONFIG_DEFAULT(); @@ -87,18 +88,18 @@ void sdmmc_test_sd_end(sdmmc_card_t *card) int slot = card->host.slot; const sdmmc_test_board_slot_info_t *slot_info = sdmmc_test_board_get_slot_info(slot); const int pins[] = { - slot_info->clk, - slot_info->cmd_mosi, - slot_info->d0_miso, - slot_info->d1, - slot_info->d2, - slot_info->d3_cs, - slot_info->d4, - slot_info->d5, - slot_info->d6, - slot_info->d7, - slot_info->cd, - slot_info->wp, + slot_info->clk, + slot_info->cmd_mosi, + slot_info->d0_miso, + slot_info->d1, + slot_info->d2, + slot_info->d3_cs, + slot_info->d4, + slot_info->d5, + slot_info->d6, + slot_info->d7, + slot_info->cd, + slot_info->wp, }; const int num_pins = sizeof(pins) / sizeof(pins[0]); // Silence logging in gpio_reset_pin, which logs at INFO level diff --git a/tools/test_apps/storage/sdmmc_console/components/sdmmc_tests/sdmmc_test_begin_end.h b/components/esp_driver_sdmmc/test_apps/sdmmc/components/sdmmc_tests/sdmmc_test_begin_end_sd.h similarity index 72% rename from tools/test_apps/storage/sdmmc_console/components/sdmmc_tests/sdmmc_test_begin_end.h rename to components/esp_driver_sdmmc/test_apps/sdmmc/components/sdmmc_tests/sdmmc_test_begin_end_sd.h index 8072937e95..1120781185 100644 --- a/tools/test_apps/storage/sdmmc_console/components/sdmmc_tests/sdmmc_test_begin_end.h +++ b/components/esp_driver_sdmmc/test_apps/sdmmc/components/sdmmc_tests/sdmmc_test_begin_end_sd.h @@ -19,7 +19,6 @@ extern "C" { /* Helper functions to initialize/deinintalize the host (SDMMC/SDSPI) inside the test */ - #if SOC_SDMMC_HOST_SUPPORTED /** * @brief Skip the test if the board is incompatible with the given slot, width, frequency and DDR mode @@ -49,25 +48,6 @@ void sdmmc_test_sd_begin(int slot, int width, int freq_khz, int ddr, sdmmc_card_ void sdmmc_test_sd_end(sdmmc_card_t *card); #endif -/** - * @brief Skip the test if the board is incompatible with the given slot and frequency, for SPI mode. - * @see sdmmc_test_sd_skip_if_board_incompatible - */ -void sdmmc_test_spi_skip_if_board_incompatible(int slot, int freq_khz); - -/** - * @brief Helper function to initialize the SDMMC host and slot for the test using the given settings, for SPI mode - * @see sdmmc_test_sd_begin - */ -void sdmmc_test_spi_begin(int slot, int freq_khz, sdmmc_card_t *out_card); - -/** - * @brief Helper function to deinitialize the SDMMC host and slot after the test, for SPI mode - * @see sdmmc_test_sd_end - */ -void sdmmc_test_spi_end(int slot, sdmmc_card_t *card); - - #ifdef __cplusplus }; #endif diff --git a/tools/test_apps/storage/sdmmc_console/components/sdmmc_tests/sdmmc_test_cd_wp_sd.c b/components/esp_driver_sdmmc/test_apps/sdmmc/components/sdmmc_tests/sdmmc_test_cd_wp_sd.c similarity index 95% rename from tools/test_apps/storage/sdmmc_console/components/sdmmc_tests/sdmmc_test_cd_wp_sd.c rename to components/esp_driver_sdmmc/test_apps/sdmmc/components/sdmmc_tests/sdmmc_test_cd_wp_sd.c index 6ba204cb67..2db5ffe921 100644 --- a/tools/test_apps/storage/sdmmc_console/components/sdmmc_tests/sdmmc_test_cd_wp_sd.c +++ b/components/esp_driver_sdmmc/test_apps/sdmmc/components/sdmmc_tests/sdmmc_test_cd_wp_sd.c @@ -10,6 +10,8 @@ #include "sdmmc_test_cd_wp_common.h" #include "sdmmc_test_board.h" +//TODO: IDF-8734 +#if !CONFIG_IDF_TARGET_ESP32 && !CONFIG_IDF_TARGET_ESP32S3 TEST_CASE("CD input works in SD mode", "[sdmmc]") { sdmmc_host_t config = SDMMC_HOST_DEFAULT(); @@ -43,3 +45,4 @@ TEST_CASE("WP input works in SD mode", "[sdmmc]") TEST_ESP_OK(sdmmc_host_deinit()); sdmmc_test_board_card_power_set(false); } +#endif diff --git a/tools/test_apps/storage/sdmmc_console/components/sdmmc_tests/sdmmc_test_probe_sd.c b/components/esp_driver_sdmmc/test_apps/sdmmc/components/sdmmc_tests/sdmmc_test_probe_sd.c similarity index 98% rename from tools/test_apps/storage/sdmmc_console/components/sdmmc_tests/sdmmc_test_probe_sd.c rename to components/esp_driver_sdmmc/test_apps/sdmmc/components/sdmmc_tests/sdmmc_test_probe_sd.c index 2984b8401d..83b5c58ce2 100644 --- a/tools/test_apps/storage/sdmmc_console/components/sdmmc_tests/sdmmc_test_probe_sd.c +++ b/components/esp_driver_sdmmc/test_apps/sdmmc/components/sdmmc_tests/sdmmc_test_probe_sd.c @@ -6,7 +6,7 @@ #include #include "unity.h" #include "sdmmc_cmd.h" -#include "sdmmc_test_begin_end.h" +#include "sdmmc_test_begin_end_sd.h" static void do_one_sdmmc_probe_test(int slot, int width, int freq_khz, int ddr) { diff --git a/tools/test_apps/storage/sdmmc_console/components/sdmmc_tests/sdmmc_test_rw_sd.c b/components/esp_driver_sdmmc/test_apps/sdmmc/components/sdmmc_tests/sdmmc_test_rw_sd.c similarity index 98% rename from tools/test_apps/storage/sdmmc_console/components/sdmmc_tests/sdmmc_test_rw_sd.c rename to components/esp_driver_sdmmc/test_apps/sdmmc/components/sdmmc_tests/sdmmc_test_rw_sd.c index 9ed0c245ef..b8740ff533 100644 --- a/tools/test_apps/storage/sdmmc_console/components/sdmmc_tests/sdmmc_test_rw_sd.c +++ b/components/esp_driver_sdmmc/test_apps/sdmmc/components/sdmmc_tests/sdmmc_test_rw_sd.c @@ -7,7 +7,7 @@ #include #include "unity.h" #include "sdmmc_cmd.h" -#include "sdmmc_test_begin_end.h" +#include "sdmmc_test_begin_end_sd.h" #include "sdmmc_test_rw_common.h" /* ========== Read/write performance tests, SD ========== */ diff --git a/components/esp_driver_sdmmc/test_apps/sdmmc/main/CMakeLists.txt b/components/esp_driver_sdmmc/test_apps/sdmmc/main/CMakeLists.txt new file mode 100644 index 0000000000..03cd59aaed --- /dev/null +++ b/components/esp_driver_sdmmc/test_apps/sdmmc/main/CMakeLists.txt @@ -0,0 +1,13 @@ +set(srcs "test_app_main.c") + +set(priv_requires + # tests reside in this component, also available for `sdmmc_console` + sdmmc_tests + # general + unity +) + +idf_component_register(SRCS ${srcs} + INCLUDE_DIRS "." + PRIV_REQUIRES ${priv_requires} + WHOLE_ARCHIVE TRUE) diff --git a/components/esp_driver_sdmmc/test_apps/sdmmc/main/test_app_main.c b/components/esp_driver_sdmmc/test_apps/sdmmc/main/test_app_main.c new file mode 100644 index 0000000000..e6e17ee73e --- /dev/null +++ b/components/esp_driver_sdmmc/test_apps/sdmmc/main/test_app_main.c @@ -0,0 +1,43 @@ +/* + * SPDX-FileCopyrightText: 2023 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: CC0-1.0 + */ + +#include "unity.h" +#include "unity_test_utils.h" +#include "esp_heap_caps.h" +#include "sdkconfig.h" + +#define TEST_MEMORY_LEAK_THRESHOLD (300) + +void setUp(void) +{ + unity_utils_record_free_mem(); +} + +void tearDown(void) +{ + unity_utils_evaluate_leaks_direct(TEST_MEMORY_LEAK_THRESHOLD); +} + +void app_main(void) +{ + /* + _____ _ ______________ ______ ________ + |_ _| | | / ___| _ \ \/ || \/ / __ \ + | | ___ ___| |_ \ `--.| | | | . . || . . | / \/ + | |/ _ \/ __| __| `--. \ | | | |\/| || |\/| | | + | | __/\__ \ |_ /\__/ / |/ /| | | || | | | \__/\ + \_/\___||___/\__| \____/|___/ \_| |_/\_| |_/\____/ + */ + + printf(" _____ _ ______________ ______ ________\n"); + printf("|_ _| | | / ___| _ \\ \\/ || \\/ / __ \\ \n"); + printf(" | | ___ ___| |_ \\ `--.| | | | . . || . . | / \\/\n"); + printf(" | |/ _ \\/ __| __| `--. \\ | | | |\\/| || |\\/| | |\n"); + printf(" | | __/\\__ \\ |_ /\\__/ / |/ /| | | || | | | \\__/\\\n"); + printf(" \\_/\\___||___/\\__| \\____/|___/ \\_| |_/\\_| |_/\\____/\n"); + + unity_run_menu(); +} diff --git a/components/esp_driver_sdmmc/test_apps/sdmmc/pytest_sdmmc.py b/components/esp_driver_sdmmc/test_apps/sdmmc/pytest_sdmmc.py new file mode 100644 index 0000000000..6d4e712930 --- /dev/null +++ b/components/esp_driver_sdmmc/test_apps/sdmmc/pytest_sdmmc.py @@ -0,0 +1,12 @@ +# SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD +# SPDX-License-Identifier: CC0-1.0 + +import pytest +from pytest_embedded_idf import IdfDut + + +@pytest.mark.esp32 +@pytest.mark.esp32s3 +@pytest.mark.sdcard +def test_sdmmc(dut: IdfDut) -> None: + dut.run_all_single_board_cases() diff --git a/components/esp_driver_sdmmc/test_apps/sdmmc/sdkconfig.defaults b/components/esp_driver_sdmmc/test_apps/sdmmc/sdkconfig.defaults new file mode 100644 index 0000000000..fa8ac618b9 --- /dev/null +++ b/components/esp_driver_sdmmc/test_apps/sdmmc/sdkconfig.defaults @@ -0,0 +1,2 @@ +CONFIG_FREERTOS_HZ=1000 +CONFIG_ESP_TASK_WDT_EN=n diff --git a/components/esp_driver_sdspi/test_apps/.build-test-rules.yml b/components/esp_driver_sdspi/test_apps/.build-test-rules.yml new file mode 100644 index 0000000000..9c1df73b26 --- /dev/null +++ b/components/esp_driver_sdspi/test_apps/.build-test-rules.yml @@ -0,0 +1,10 @@ +components/esp_driver_sdspi/test_apps/sdspi: + disable: + - if: SOC_GPSPI_SUPPORTED != 1 + disable_test: + - if: SOC_GPSPI_SUPPORTED == 1 + temporary: true + reason: will add runners later # TODO: IDF-8747 + depends_components: + - sdmmc + - esp_driver_sdspi diff --git a/components/esp_driver_sdspi/test_apps/sdspi/CMakeLists.txt b/components/esp_driver_sdspi/test_apps/sdspi/CMakeLists.txt new file mode 100644 index 0000000000..2725c2f9ad --- /dev/null +++ b/components/esp_driver_sdspi/test_apps/sdspi/CMakeLists.txt @@ -0,0 +1,10 @@ +cmake_minimum_required(VERSION 3.16) + +list(APPEND EXTRA_COMPONENT_DIRS "$ENV{IDF_PATH}/tools/unit-test-app/components") +list(APPEND EXTRA_COMPONENT_DIRS "$ENV{IDF_PATH}/components/esp_driver_sdmmc/test_apps/sd_test_utils/components") +list(APPEND EXTRA_COMPONENT_DIRS "$ENV{IDF_PATH}/components/esp_driver_sdmmc/test_apps/sdmmc/components/sdmmc_tests") + +set(COMPONENTS main) + +include($ENV{IDF_PATH}/tools/cmake/project.cmake) +project(sdmmc_test_console) diff --git a/components/esp_driver_sdspi/test_apps/sdspi/README.md b/components/esp_driver_sdspi/test_apps/sdspi/README.md new file mode 100644 index 0000000000..bf47d80ec6 --- /dev/null +++ b/components/esp_driver_sdspi/test_apps/sdspi/README.md @@ -0,0 +1,2 @@ +| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C6 | ESP32-H2 | ESP32-P4 | ESP32-S2 | ESP32-S3 | +| ----------------- | ----- | -------- | -------- | -------- | -------- | -------- | -------- | -------- | diff --git a/components/esp_driver_sdspi/test_apps/sdspi/components/sdspi_tests/CMakeLists.txt b/components/esp_driver_sdspi/test_apps/sdspi/components/sdspi_tests/CMakeLists.txt new file mode 100644 index 0000000000..436d08e38b --- /dev/null +++ b/components/esp_driver_sdspi/test_apps/sdspi/components/sdspi_tests/CMakeLists.txt @@ -0,0 +1,19 @@ +set(srcs) + +if(CONFIG_SOC_GPSPI_SUPPORTED) + list(APPEND srcs "sdmmc_test_begin_end_spi.c" + "sdmmc_test_cd_wp_spi.c" + "sdmmc_test_probe_spi.c" + "sdmmc_test_rw_spi.c") +endif() + +set(priv_requires "sdmmc" + "esp_driver_sdspi" + "sdmmc_test_boards" + "common_test_flows" + "unity" +) + +idf_component_register(SRCS ${srcs} + PRIV_REQUIRES ${priv_requires} + WHOLE_ARCHIVE TRUE) diff --git a/tools/test_apps/storage/sdmmc_console/components/sdmmc_tests/sdmmc_test_begin_end_spi.c b/components/esp_driver_sdspi/test_apps/sdspi/components/sdspi_tests/sdmmc_test_begin_end_spi.c similarity index 98% rename from tools/test_apps/storage/sdmmc_console/components/sdmmc_tests/sdmmc_test_begin_end_spi.c rename to components/esp_driver_sdspi/test_apps/sdspi/components/sdspi_tests/sdmmc_test_begin_end_spi.c index 9ed663f98a..2ab040bfce 100644 --- a/tools/test_apps/storage/sdmmc_console/components/sdmmc_tests/sdmmc_test_begin_end_spi.c +++ b/components/esp_driver_sdspi/test_apps/sdspi/components/sdspi_tests/sdmmc_test_begin_end_spi.c @@ -13,7 +13,7 @@ #include "driver/sdspi_host.h" #include "sd_protocol_defs.h" #include "sdmmc_cmd.h" -#include "sdmmc_test_begin_end.h" +#include "sdmmc_test_begin_end_spi.h" void sdmmc_test_spi_skip_if_board_incompatible(int slot, int freq_khz) { diff --git a/components/esp_driver_sdspi/test_apps/sdspi/components/sdspi_tests/sdmmc_test_begin_end_spi.h b/components/esp_driver_sdspi/test_apps/sdspi/components/sdspi_tests/sdmmc_test_begin_end_spi.h new file mode 100644 index 0000000000..95f20c8a2a --- /dev/null +++ b/components/esp_driver_sdspi/test_apps/sdspi/components/sdspi_tests/sdmmc_test_begin_end_spi.h @@ -0,0 +1,42 @@ +/* + * SPDX-FileCopyrightText: 2023 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ +#pragma once + +#include "sd_protocol_types.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Defines for readability */ +#define SLOT_0 0 +#define SLOT_1 1 +#define NO_DDR 0 +#define WITH_DDR 1 + +/* Helper functions to initialize/deinintalize the host (SDMMC/SDSPI) inside the test */ + +/** + * @brief Skip the test if the board is incompatible with the given slot and frequency, for SPI mode. + * @see sdmmc_test_sd_skip_if_board_incompatible + */ +void sdmmc_test_spi_skip_if_board_incompatible(int slot, int freq_khz); + +/** + * @brief Helper function to initialize the SDMMC host and slot for the test using the given settings, for SPI mode + * @see sdmmc_test_sd_begin + */ +void sdmmc_test_spi_begin(int slot, int freq_khz, sdmmc_card_t *out_card); + +/** + * @brief Helper function to deinitialize the SDMMC host and slot after the test, for SPI mode + * @see sdmmc_test_sd_end + */ +void sdmmc_test_spi_end(int slot, sdmmc_card_t *card); + +#ifdef __cplusplus +}; +#endif diff --git a/tools/test_apps/storage/sdmmc_console/components/sdmmc_tests/sdmmc_test_cd_wp_spi.c b/components/esp_driver_sdspi/test_apps/sdspi/components/sdspi_tests/sdmmc_test_cd_wp_spi.c similarity index 98% rename from tools/test_apps/storage/sdmmc_console/components/sdmmc_tests/sdmmc_test_cd_wp_spi.c rename to components/esp_driver_sdspi/test_apps/sdspi/components/sdspi_tests/sdmmc_test_cd_wp_spi.c index a042ed6fac..1787758ecc 100644 --- a/tools/test_apps/storage/sdmmc_console/components/sdmmc_tests/sdmmc_test_cd_wp_spi.c +++ b/components/esp_driver_sdspi/test_apps/sdspi/components/sdspi_tests/sdmmc_test_cd_wp_spi.c @@ -9,7 +9,7 @@ #include "driver/sdspi_host.h" #include "sdmmc_cmd.h" #include "sdmmc_test_board.h" -#include "sdmmc_test_begin_end.h" +#include "sdmmc_test_begin_end_spi.h" #include "sdmmc_test_cd_wp_common.h" TEST_CASE("CD input works in SPI mode", "[sdspi]") diff --git a/tools/test_apps/storage/sdmmc_console/components/sdmmc_tests/sdmmc_test_probe_spi.c b/components/esp_driver_sdspi/test_apps/sdspi/components/sdspi_tests/sdmmc_test_probe_spi.c similarity index 82% rename from tools/test_apps/storage/sdmmc_console/components/sdmmc_tests/sdmmc_test_probe_spi.c rename to components/esp_driver_sdspi/test_apps/sdspi/components/sdspi_tests/sdmmc_test_probe_spi.c index d50725f16d..c9738ab236 100644 --- a/tools/test_apps/storage/sdmmc_console/components/sdmmc_tests/sdmmc_test_probe_spi.c +++ b/components/esp_driver_sdspi/test_apps/sdspi/components/sdspi_tests/sdmmc_test_probe_spi.c @@ -6,7 +6,7 @@ #include #include "unity.h" #include "sdmmc_cmd.h" -#include "sdmmc_test_begin_end.h" +#include "sdmmc_test_begin_end_spi.h" static void do_one_sdspi_probe(int slot, int freq_khz) { @@ -30,13 +30,19 @@ TEST_CASE("sdspi probe, slot 0, HS", "[sdspi]") do_one_sdspi_probe(SLOT_0, SDMMC_FREQ_HIGHSPEED); } +#if !CONFIG_IDF_TARGET_ESP32 && !CONFIG_IDF_TARGET_ESP32S3 +//TODO: IDF-8750. Leaks too much memory, needs check TEST_CASE("sdspi probe, slot 1", "[sdspi]") { do_one_sdspi_probe(SLOT_1, SDMMC_FREQ_PROBING); do_one_sdspi_probe(SLOT_1, SDMMC_FREQ_DEFAULT); } +#endif +#if !CONFIG_IDF_TARGET_ESP32 && !CONFIG_IDF_TARGET_ESP32S3 +//TODO: IDF-8749 TEST_CASE("sdspi probe, slot 1, HS", "[sdspi]") { do_one_sdspi_probe(SLOT_1, SDMMC_FREQ_HIGHSPEED); } +#endif diff --git a/tools/test_apps/storage/sdmmc_console/components/sdmmc_tests/sdmmc_test_rw_spi.c b/components/esp_driver_sdspi/test_apps/sdspi/components/sdspi_tests/sdmmc_test_rw_spi.c similarity index 91% rename from tools/test_apps/storage/sdmmc_console/components/sdmmc_tests/sdmmc_test_rw_spi.c rename to components/esp_driver_sdspi/test_apps/sdspi/components/sdspi_tests/sdmmc_test_rw_spi.c index 3d96bb7179..dcc3c98dd8 100644 --- a/tools/test_apps/storage/sdmmc_console/components/sdmmc_tests/sdmmc_test_rw_spi.c +++ b/components/esp_driver_sdspi/test_apps/sdspi/components/sdspi_tests/sdmmc_test_rw_spi.c @@ -6,7 +6,7 @@ #include #include "unity.h" #include "sdmmc_cmd.h" -#include "sdmmc_test_begin_end.h" +#include "sdmmc_test_begin_end_spi.h" #include "sdmmc_test_rw_common.h" /* ========== Read/write performance tests, SPI ========== */ @@ -26,10 +26,13 @@ TEST_CASE("sdspi read/write performance, slot 0", "[sdspi]") do_one_sdspi_perf_test(SLOT_0, SDMMC_FREQ_HIGHSPEED); } +#if !CONFIG_IDF_TARGET_ESP32 && !CONFIG_IDF_TARGET_ESP32S3 +//TODO: IDF-8749 TEST_CASE("sdspi read/write performance, slot 1", "[sdspi]") { do_one_sdspi_perf_test(SLOT_1, SDMMC_FREQ_HIGHSPEED); } +#endif /* ========== Read/write tests with offset, SPI ========== */ @@ -48,10 +51,13 @@ TEST_CASE("sdspi read/write performance with offset, slot 0", "[sdspi]") do_one_sdspi_rw_test_with_offset(SLOT_0, SDMMC_FREQ_HIGHSPEED); } +#if !CONFIG_IDF_TARGET_ESP32 && !CONFIG_IDF_TARGET_ESP32S3 +//TODO: IDF-8749 TEST_CASE("sdspi read/write performance with offset, slot 1", "[sdspi]") { do_one_sdspi_rw_test_with_offset(SLOT_1, SDMMC_FREQ_HIGHSPEED); } +#endif /* ========== Read/write tests with unaligned source/destination buffer, SPI ========== */ diff --git a/components/esp_driver_sdspi/test_apps/sdspi/main/CMakeLists.txt b/components/esp_driver_sdspi/test_apps/sdspi/main/CMakeLists.txt new file mode 100644 index 0000000000..797caf73e9 --- /dev/null +++ b/components/esp_driver_sdspi/test_apps/sdspi/main/CMakeLists.txt @@ -0,0 +1,13 @@ +set(srcs "test_app_main.c") + +set(priv_requires + # tests reside in this component, also available for `sdmmc_console` + sdspi_tests + # general + unity +) + +idf_component_register(SRCS ${srcs} + INCLUDE_DIRS "." + PRIV_REQUIRES ${priv_requires} + WHOLE_ARCHIVE TRUE) diff --git a/components/esp_driver_sdspi/test_apps/sdspi/main/test_app_main.c b/components/esp_driver_sdspi/test_apps/sdspi/main/test_app_main.c new file mode 100644 index 0000000000..274579059d --- /dev/null +++ b/components/esp_driver_sdspi/test_apps/sdspi/main/test_app_main.c @@ -0,0 +1,43 @@ +/* + * SPDX-FileCopyrightText: 2023 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: CC0-1.0 + */ + +#include "unity.h" +#include "unity_test_utils.h" +#include "esp_heap_caps.h" +#include "sdkconfig.h" + +#define TEST_MEMORY_LEAK_THRESHOLD (400) + +void setUp(void) +{ + unity_utils_record_free_mem(); +} + +void tearDown(void) +{ + unity_utils_evaluate_leaks_direct(TEST_MEMORY_LEAK_THRESHOLD); +} + +void app_main(void) +{ + /* + _____ _ ___________ ___________ _____ + |_ _| | | / ___| _ \/ ___| ___ \_ _| + | | ___ ___| |_ \ `--.| | | |\ `--.| |_/ / | | + | |/ _ \/ __| __| `--. \ | | | `--. \ __/ | | + | | __/\__ \ |_ /\__/ / |/ / /\__/ / | _| |_ + \_/\___||___/\__| \____/|___/ \____/\_| \___/ + */ + + printf(" _____ _ ___________ ___________ _____\n"); + printf("|_ _| | | / ___| _ \\/ ___| ___ \\_ _|\n"); + printf(" | | ___ ___| |_ \\ `--.| | | |\\ `--.| |_/ / | |\n"); + printf(" | |/ _ \\/ __| __| `--. \\ | | | `--. \\ __/ | |\n"); + printf(" | | __/\\__ \\ |_ /\\__/ / |/ / /\\__/ / | _| |_\n"); + printf(" \\_/\\___||___/\\__| \\____/|___/ \\____/\\_| \\___/\n"); + + unity_run_menu(); +} diff --git a/components/esp_driver_sdspi/test_apps/sdspi/pytest_sdspi.py b/components/esp_driver_sdspi/test_apps/sdspi/pytest_sdspi.py new file mode 100644 index 0000000000..f2d30a8c2d --- /dev/null +++ b/components/esp_driver_sdspi/test_apps/sdspi/pytest_sdspi.py @@ -0,0 +1,8 @@ +# SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD +# SPDX-License-Identifier: CC0-1.0 + +from pytest_embedded_idf import IdfDut + + +def test_sdspi(dut: IdfDut) -> None: + dut.run_all_single_board_cases() diff --git a/components/esp_driver_sdspi/test_apps/sdspi/sdkconfig.defaults b/components/esp_driver_sdspi/test_apps/sdspi/sdkconfig.defaults new file mode 100644 index 0000000000..fa8ac618b9 --- /dev/null +++ b/components/esp_driver_sdspi/test_apps/sdspi/sdkconfig.defaults @@ -0,0 +1,2 @@ +CONFIG_FREERTOS_HZ=1000 +CONFIG_ESP_TASK_WDT_EN=n diff --git a/tools/ci/idf_pytest/constants.py b/tools/ci/idf_pytest/constants.py index 0d20705e1b..cddb18808c 100644 --- a/tools/ci/idf_pytest/constants.py +++ b/tools/ci/idf_pytest/constants.py @@ -77,9 +77,10 @@ ENV_MARKERS = { 'xtal_26mhz': 'runner with 26MHz xtal on board', 'xtal_40mhz': 'runner with 40MHz xtal on board', 'external_flash': 'external flash memory connected via VSPI (FSPI)', - 'sdcard_sdmode': 'sdcard running in SD mode', + 'sdcard_sdmode': 'sdcard running in SD mode, to be removed after test migration', 'sdcard_spimode': 'sdcard running in SPI mode', 'emmc': 'eMMC card', + 'sdcard': 'sdcard runner', 'MSPI_F8R8': 'runner with Octal Flash and Octal PSRAM', 'MSPI_F4R8': 'runner with Quad Flash and Octal PSRAM', 'MSPI_F4R4': 'runner with Quad Flash and Quad PSRAM', diff --git a/tools/test_apps/storage/sdmmc_console/CMakeLists.txt b/tools/test_apps/storage/sdmmc_console/CMakeLists.txt index cde7ad6b49..caa12a6306 100644 --- a/tools/test_apps/storage/sdmmc_console/CMakeLists.txt +++ b/tools/test_apps/storage/sdmmc_console/CMakeLists.txt @@ -2,6 +2,9 @@ cmake_minimum_required(VERSION 3.16) list(APPEND EXTRA_COMPONENT_DIRS "$ENV{IDF_PATH}/examples/system/console/advanced/components") list(APPEND EXTRA_COMPONENT_DIRS "$ENV{IDF_PATH}/tools/unit-test-app/components") +list(APPEND EXTRA_COMPONENT_DIRS "$ENV{IDF_PATH}/components/esp_driver_sdmmc/test_apps/sd_test_utils/components") +list(APPEND EXTRA_COMPONENT_DIRS "$ENV{IDF_PATH}/components/esp_driver_sdmmc/test_apps/sdmmc/components/sdmmc_tests") +list(APPEND EXTRA_COMPONENT_DIRS "$ENV{IDF_PATH}/components/esp_driver_sdspi/test_apps/sdspi/components/sdspi_tests") set(COMPONENTS main) include($ENV{IDF_PATH}/tools/cmake/project.cmake) diff --git a/tools/test_apps/storage/sdmmc_console/components/cmd_sdmmc/CMakeLists.txt b/tools/test_apps/storage/sdmmc_console/components/cmd_sdmmc/CMakeLists.txt index c358366e39..aca698445f 100644 --- a/tools/test_apps/storage/sdmmc_console/components/cmd_sdmmc/CMakeLists.txt +++ b/tools/test_apps/storage/sdmmc_console/components/cmd_sdmmc/CMakeLists.txt @@ -1,6 +1,6 @@ idf_component_register(SRCS cmd_sdmmc.c INCLUDE_DIRS . PRIV_REQUIRES console sdmmc esp_driver_sdmmc esp_driver_gpio esp_driver_sdspi - sdmmc_test_board + sdmmc_test_boards ) diff --git a/tools/test_apps/storage/sdmmc_console/components/sdmmc_tests/CMakeLists.txt b/tools/test_apps/storage/sdmmc_console/components/sdmmc_tests/CMakeLists.txt deleted file mode 100644 index 3627aa66a0..0000000000 --- a/tools/test_apps/storage/sdmmc_console/components/sdmmc_tests/CMakeLists.txt +++ /dev/null @@ -1,28 +0,0 @@ -idf_component_register( - SRCS - sdmmc_test_cd_wp_common.c - sdmmc_test_rw_common.c - PRIV_REQUIRES - sdmmc esp_driver_sdmmc esp_driver_sdspi sdmmc_test_board esp_timer unity test_utils - WHOLE_ARCHIVE TRUE -) - -if(CONFIG_SOC_GPSPI_SUPPORTED) - target_sources( - ${COMPONENT_LIB} PRIVATE - sdmmc_test_rw_spi.c - sdmmc_test_begin_end_spi.c - sdmmc_test_probe_spi.c - sdmmc_test_cd_wp_spi.c - ) -endif() - -if(CONFIG_SOC_SDMMC_HOST_SUPPORTED) - target_sources( - ${COMPONENT_LIB} PRIVATE - sdmmc_test_begin_end_sd.c - sdmmc_test_rw_sd.c - sdmmc_test_probe_sd.c - sdmmc_test_cd_wp_sd.c - ) -endif() diff --git a/tools/test_apps/storage/sdmmc_console/main/CMakeLists.txt b/tools/test_apps/storage/sdmmc_console/main/CMakeLists.txt index 042ef43441..45d9ea026f 100644 --- a/tools/test_apps/storage/sdmmc_console/main/CMakeLists.txt +++ b/tools/test_apps/storage/sdmmc_console/main/CMakeLists.txt @@ -4,7 +4,7 @@ set(requires # for console history vfs fatfs # sdmmc tests, themselves - sdmmc_test_board sdmmc_tests + sdmmc_test_boards sdmmc_tests sdspi_tests # various console comamnds cmd_unity cmd_system cmd_sdmmc )