mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
spi_flash: enable ext flash unit-test on esp32c3
This commit is contained in:
parent
fe0c81f67c
commit
8020c46da7
@ -137,16 +137,24 @@ typedef void (*flash_test_func_t)(const esp_partition_t *part);
|
||||
|
||||
These tests run for all the flash chip configs shown in config_list, below (internal and external).
|
||||
*/
|
||||
#if defined(CONFIG_SPIRAM) || TEMPORARY_DISABLED_FOR_TARGETS(ESP32C3)
|
||||
#if defined(CONFIG_SPIRAM)
|
||||
|
||||
#define FLASH_TEST_CASE_3(STR, FUNCT_TO_RUN)
|
||||
#define FLASH_TEST_CASE_3_IGNORE(STR, FUNCT_TO_RUN)
|
||||
#else
|
||||
#if !CONFIG_IDF_TARGET_ESP32C3
|
||||
#define FLASH_TEST_CASE_3(STR, FUNC_TO_RUN) \
|
||||
TEST_CASE(STR", 3 chips", "[esp_flash_3][test_env=UT_T1_ESP_FLASH]") {flash_test_func(FUNC_TO_RUN, TEST_CONFIG_NUM);}
|
||||
|
||||
#define FLASH_TEST_CASE_3_IGNORE(STR, FUNC_TO_RUN) \
|
||||
TEST_CASE(STR", 3 chips", "[esp_flash_3][test_env=UT_T1_ESP_FLASH][ignore]") {flash_test_func(FUNC_TO_RUN, TEST_CONFIG_NUM);}
|
||||
#else
|
||||
#define FLASH_TEST_CASE_3(STR, FUNC_TO_RUN) \
|
||||
TEST_CASE(STR", 2 chips", "[esp_flash_2][test_env=UT_T1_ESP_FLASH]") {flash_test_func(FUNC_TO_RUN, TEST_CONFIG_NUM);}
|
||||
|
||||
#define FLASH_TEST_CASE_3_IGNORE(STR, FUNC_TO_RUN) \
|
||||
TEST_CASE(STR", 2 chips", "[esp_flash_2][test_env=UT_T1_ESP_FLASH][ignore]") {flash_test_func(FUNC_TO_RUN, TEST_CONFIG_NUM);}
|
||||
#endif // !CONFIG_IDF_TARGET_ESP32C3
|
||||
#endif
|
||||
|
||||
//currently all the configs are the same with esp_flash_spi_device_config_t, no more information required
|
||||
@ -230,8 +238,11 @@ flashtest_config_t config_list[] = {
|
||||
};
|
||||
#elif CONFIG_IDF_TARGET_ESP32C3
|
||||
flashtest_config_t config_list[] = {
|
||||
FLASHTEST_CONFIG_COMMON,
|
||||
/* No runners for esp32c3 for these config yet */
|
||||
{
|
||||
/* no need to init */
|
||||
.host_id = -1,
|
||||
},
|
||||
{
|
||||
.io_mode = TEST_SPI_READ_MODE,
|
||||
.speed = TEST_SPI_SPEED,
|
||||
@ -879,14 +890,12 @@ TEST_CASE("SPI flash test reading with all speed/mode permutations", "[esp_flash
|
||||
}
|
||||
|
||||
#ifndef CONFIG_SPIRAM
|
||||
#if !TEMPORARY_DISABLED_FOR_TARGETS(ESP32C3)
|
||||
TEST_CASE("SPI flash test reading with all speed/mode permutations, 3 chips", "[esp_flash_3][test_env=UT_T1_ESP_FLASH]")
|
||||
{
|
||||
for (int i = 0; i < TEST_CONFIG_NUM; i++) {
|
||||
test_permutations_chip(&config_list[i]);
|
||||
}
|
||||
}
|
||||
#endif //TEMPORARY_DISABLED_FOR_TARGETS(ESP32C3)
|
||||
#endif
|
||||
|
||||
|
||||
@ -955,8 +964,7 @@ static void test_write_large_buffer(const esp_partition_t* part, const uint8_t *
|
||||
read_and_check(part, source, length);
|
||||
}
|
||||
|
||||
#if !CONFIG_SPIRAM && !TEMPORARY_DISABLED_FOR_TARGETS(ESP32C3)
|
||||
/* No runners on C3, TODO ESP32-C3 IDF-2399 */
|
||||
#if !CONFIG_SPIRAM
|
||||
|
||||
typedef struct {
|
||||
uint32_t us_start;
|
||||
|
@ -578,6 +578,13 @@ UT_C3:
|
||||
- ESP32C3_IDF
|
||||
- UT_T1_1
|
||||
|
||||
UT_C3_FLASH:
|
||||
extends: .unit_test_c3_template
|
||||
parallel: 3
|
||||
tags:
|
||||
- ESP32C3_IDF
|
||||
- UT_T1_ESP_FLASH
|
||||
|
||||
nvs_compatible_test:
|
||||
extends: .integration_test_template
|
||||
artifacts:
|
||||
|
Loading…
x
Reference in New Issue
Block a user