mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
feat(storage/example): enable host test for flash wl fatfs
This commit is contained in:
parent
7c3b9bde0e
commit
615a9c6742
@ -13,7 +13,7 @@ components/fatfs/test_apps/flash_ro:
|
||||
|
||||
components/fatfs/test_apps/flash_wl:
|
||||
disable_test:
|
||||
- if: IDF_TARGET not in ["esp32", "esp32c3"]
|
||||
- if: IDF_TARGET not in ["esp32", "esp32c3", "linux"]
|
||||
reason: only one target per arch needed
|
||||
depends_components:
|
||||
- esp_partition
|
||||
|
@ -1,9 +1,7 @@
|
||||
menu "Test configuration"
|
||||
config SPI_WL_TEST_ERASE_PARTITION
|
||||
bool "Erase partition"
|
||||
if IDF_TARGET_LINUX
|
||||
default y
|
||||
default n
|
||||
default y if IDF_TARGET_LINUX
|
||||
help
|
||||
Erase the partition before each format operation.
|
||||
This will destroy the flash fairly quickly in CI, but is necessary to
|
||||
|
@ -46,12 +46,14 @@ static void test_teardown(void)
|
||||
TEST_ESP_OK(esp_vfs_fat_spiflash_unmount_rw_wl("/spiflash", s_test_wl_handle));
|
||||
}
|
||||
|
||||
#ifdef CONFIG_SPI_WL_TEST_ERASE_PARTITION
|
||||
static void corrupt_wl_data(void)
|
||||
{
|
||||
esp_partition_t* part = esp_partition_find_first(ESP_PARTITION_TYPE_DATA, ESP_PARTITION_SUBTYPE_DATA_FAT, NULL);
|
||||
const esp_partition_t* part = esp_partition_find_first(ESP_PARTITION_TYPE_DATA, ESP_PARTITION_SUBTYPE_DATA_FAT, NULL);
|
||||
TEST_ASSERT_NOT_NULL(part);
|
||||
TEST_ESP_OK(esp_partition_erase_range(part, 0, part->size));
|
||||
}
|
||||
#endif
|
||||
|
||||
TEST_CASE("(WL) can format partition", "[fatfs][wear_levelling][timeout=120]")
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user