From 7ddfcfb8d2e37d52ee7677cdb027c9f1356a7dfe Mon Sep 17 00:00:00 2001 From: "Michael (XIAO Xufeng)" Date: Sun, 13 Sep 2020 00:25:20 +0800 Subject: [PATCH] esp_flash_test: improve unit test From now on, we have two tags for esp_flash tests: - [esp_flash] for main flash chip only tests - [esp_flash_3] for tests with external flash chips To Run all tests, type `[esp_flash`; to run tests for main flash chip only, type `[esp_flash]. --- components/spi_flash/test/test_esp_flash.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/components/spi_flash/test/test_esp_flash.c b/components/spi_flash/test/test_esp_flash.c index 4298578247..6c11099749 100644 --- a/components/spi_flash/test/test_esp_flash.c +++ b/components/spi_flash/test/test_esp_flash.c @@ -113,10 +113,10 @@ typedef void (*flash_test_func_t)(const esp_partition_t *part); #define FLASH_TEST_CASE_3_IGNORE(STR, FUNCT_TO_RUN) #else #define FLASH_TEST_CASE_3(STR, FUNC_TO_RUN) \ - TEST_CASE(STR", 3 chips", "[esp_flash][test_env=UT_T1_ESP_FLASH]") {flash_test_func(FUNC_TO_RUN, TEST_CONFIG_NUM);} + 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][test_env=UT_T1_ESP_FLASH][ignore]") {flash_test_func(FUNC_TO_RUN, TEST_CONFIG_NUM);} + TEST_CASE(STR", 3 chips", "[esp_flash_3][test_env=UT_T1_ESP_FLASH][ignore]") {flash_test_func(FUNC_TO_RUN, TEST_CONFIG_NUM);} #endif //currently all the configs are the same with esp_flash_spi_device_config_t, no more information required @@ -801,7 +801,7 @@ TEST_CASE("SPI flash test reading with all speed/mode permutations", "[esp_flash } #ifndef CONFIG_SPIRAM -TEST_CASE("SPI flash test reading with all speed/mode permutations, 3 chips", "[esp_flash][test_env=UT_T1_ESP_FLASH]") +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]);