mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
Merge branch 'ci/enable_flash_suspend_test' into 'master'
spi_flash: enable unit-test for flash suspend Closes IDF-3081 See merge request espressif/esp-idf!13115
This commit is contained in:
commit
58758486b2
@ -656,6 +656,12 @@ UT_C3_I2C:
|
||||
- ESP32C3_IDF
|
||||
- UT_T2_I2C
|
||||
|
||||
UT_C3_FLASH_SUSPEND:
|
||||
extends: .unit_test_esp32c3_template
|
||||
tags:
|
||||
- ESP32C3_IDF
|
||||
- UT_T1_Flash_Suspend
|
||||
|
||||
.integration_test_template:
|
||||
extends:
|
||||
- .target_test_job_template
|
||||
|
@ -664,7 +664,11 @@ static void test_flash_suspend_resume(const esp_partition_t* part)
|
||||
vTaskDelay(200);
|
||||
}
|
||||
|
||||
FLASH_TEST_CASE("SPI flash suspend and resume test", test_flash_suspend_resume);
|
||||
TEST_CASE("SPI flash suspend and resume test", "[esp_flash][test_env=UT_T1_Flash_Suspend]")
|
||||
{
|
||||
flash_test_func(test_flash_suspend_resume, 1 /* first index reserved for main flash */ );
|
||||
}
|
||||
|
||||
#endif //CONFIG_SPI_FLASH_AUTO_SUSPEND
|
||||
|
||||
static void test_write_protection(const esp_partition_t* part)
|
||||
@ -920,8 +924,8 @@ FLASH_TEST_CASE_3("Test esp_flash_write large RAM buffer", test_write_large_ram_
|
||||
static void write_large_buffer(const esp_partition_t *part, const uint8_t *source, size_t length)
|
||||
{
|
||||
esp_flash_t* chip = part->flash_chip;
|
||||
printf("Writing chip %p %p, %d bytes from source %p\n", chip, (void*)part->address, length, source);
|
||||
|
||||
printf("Writing chip %p %p, %d bytes from source %p\n", chip, (void*)part->address, length, source);
|
||||
ESP_ERROR_CHECK( esp_flash_erase_region(chip, part->address, (length + SPI_FLASH_SEC_SIZE) & ~(SPI_FLASH_SEC_SIZE - 1)) );
|
||||
|
||||
// note writing to unaligned address
|
||||
|
3
tools/unit-test-app/configs/spi_flash_suspend
Normal file
3
tools/unit-test-app/configs/spi_flash_suspend
Normal file
@ -0,0 +1,3 @@
|
||||
CONFIG_IDF_TARGET="esp32c3"
|
||||
TEST_COMPONENTS=spi_flash
|
||||
CONFIG_SPI_FLASH_AUTO_SUSPEND=y
|
Loading…
x
Reference in New Issue
Block a user