feat(storage/example): enable host test for flash wl fatfs

This commit is contained in:
Tomáš Rohlínek 2024-04-10 12:57:07 +02:00
parent 7c3b9bde0e
commit 615a9c6742
No known key found for this signature in database
GPG Key ID: BDE1CEDD10F7E372
3 changed files with 5 additions and 5 deletions

View File

@ -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

View File

@ -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

View File

@ -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]")
{