test_teardown();
}
-
TEST_CASE("(SD) can lseek", "[fatfs][sd][test_env=UT_T1_SDMODE]")
{
test_setup();
test_teardown();
}
+TEST_CASE("(SD) can truncate", "[fatfs][sd][test_env=UT_T1_SDMODE]")
+{
+ test_setup();
+ test_fatfs_truncate_file("/sdcard/truncate.txt");
+ test_teardown();
+}
+
TEST_CASE("(SD) stat returns correct values", "[fatfs][test_env=UT_T1_SDMODE]")
{
test_setup();
static void speed_test(void* buf, size_t buf_size, size_t file_size, bool write);
-TEST_CASE("(SD) write/read speed test", "[fatfs][sd][test_env=UT_T1_SDMODE]")
+TEST_CASE("(SD) write/read speed test", "[fatfs][sd][test_env=UT_T1_SDMODE][timeout=60]")
{
size_t heap_size;
HEAP_SIZE_CAPTURE(heap_size);
const char* str_sd = "this is sd\n";
const char* str_wl = "this is spiflash\n";
+ /* Erase flash before the firs use */
+ const esp_partition_t *test_partition = esp_partition_find_first(ESP_PARTITION_TYPE_DATA, ESP_PARTITION_SUBTYPE_ANY, "flash_test");
+ esp_partition_erase_range(test_partition, 0, test_partition->size);
+ printf("Partition erased: addr- 0x%08x, size- 0x%08x\n", test_partition->address, test_partition->size);
+
/* Mount FATFS in SD can WL at the same time. Create a file on each FS */
wl_handle_t wl_handle = WL_INVALID_HANDLE;
test_setup();