Преглед изворни кода

spi_flash: resume unit tests for ESP32-S2

michael пре 6 година
родитељ
комит
f8fae4c80c

+ 2 - 0
components/spi_flash/test/test_esp_flash.c

@@ -77,6 +77,7 @@ typedef void (*flash_test_func_t)(esp_flash_t* chip);
 // These tests needs external flash, right on the place of psram
 #define FLASH_TEST_CASE_3(STR, FUNCT_TO_RUN)
 #else
+// Disabled for ESP32-S2 due to lack of runners
 #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, ALL_TEST_NUM);}
 #endif
@@ -610,6 +611,7 @@ TEST_CASE("SPI flash test reading with all speed/mode permutations", "[esp_flash
 
 #ifndef CONFIG_SPIRAM_SUPPORT
 #if !TEMPORARY_DISABLED_FOR_TARGETS(ESP32S2)
+// No runners
 TEST_CASE("SPI flash test reading with all speed/mode permutations, 3 chips", "[esp_flash][test_env=UT_T1_ESP_FLASH]")
 {
     for (int i = 0; i < ALL_TEST_NUM; i++) {

+ 0 - 2
components/spi_flash/test/test_large_flash_writes.c

@@ -29,7 +29,6 @@
 #include "../cache_utils.h"
 #include "soc/timer_periph.h"
 
-#if !TEMPORARY_DISABLED_FOR_TARGETS(ESP32S2)
 static const uint8_t large_const_buffer[16400] = {
     203, // first byte
     1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,
@@ -94,4 +93,3 @@ static void test_write_large_buffer(const uint8_t *source, size_t length)
     TEST_ASSERT_EQUAL_HEX8(0xFF, ends[2]);
     TEST_ASSERT_EQUAL_HEX8(0xFF, ends[3]);
 }
-#endif //!TEMPORARY_DISABLED_FOR_TARGETS(ESP32S2)

+ 0 - 2
components/spi_flash/test/test_mmap.c

@@ -349,7 +349,6 @@ TEST_CASE("flash_mmap can mmap after get enough free MMU pages", "[spi_flash][mm
     TEST_ASSERT_EQUAL_PTR(NULL, spi_flash_phys2cache(start, SPI_FLASH_MMAP_DATA));
 }
 
-#if !TEMPORARY_DISABLED_FOR_TARGETS(ESP32S2)
 TEST_CASE("phys2cache/cache2phys basic checks", "[spi_flash][mmap]")
 {
     uint8_t buf[64];
@@ -382,7 +381,6 @@ TEST_CASE("phys2cache/cache2phys basic checks", "[spi_flash][mmap]")
     spi_flash_read_maybe_encrypted(phys, buf, sizeof(constant_data));
     TEST_ASSERT_EQUAL_HEX8_ARRAY(constant_data, buf, sizeof(constant_data));
 }
-#endif //!TEMPORARY_DISABLED_FOR_TARGETS(ESP32S2)
 
 TEST_CASE("mmap consistent with phys2cache/cache2phys", "[spi_flash][mmap]")
 {

+ 1 - 3
components/spi_flash/test/test_partition_ext.c

@@ -2,7 +2,6 @@
 #include "esp_partition.h"
 #include "unity.h"
 
-#if !TEMPORARY_DISABLED_FOR_TARGETS(ESP32S2)
 TEST_CASE("Basic handling of a partition in external flash", "[partition]")
 {
     esp_flash_t flash = {
@@ -44,5 +43,4 @@ TEST_CASE("Basic handling of a partition in external flash", "[partition]")
     TEST_ESP_ERR(ESP_ERR_INVALID_ARG, esp_partition_register_external(&flash, SPI_FLASH_SEC_SIZE, 2 * SPI_FLASH_SEC_SIZE,
             "p2", t, st, NULL));
     TEST_ESP_OK(esp_partition_deregister_external(ext_partition));
-}
-#endif
+}

+ 0 - 4
components/spi_flash/test/test_partitions.c

@@ -27,7 +27,6 @@
 #include <esp_partition.h>
 #include <esp_attr.h>
 
-#if !TEMPORARY_DISABLED_FOR_TARGETS(ESP32S2)
 TEST_CASE("Test erase partition", "[spi_flash][esp_flash]")
 {
     const esp_partition_t *part = get_test_data_partition();
@@ -69,7 +68,6 @@ TEST_CASE("Test erase partition", "[spi_flash][esp_flash]")
         }
     }
 }
-#endif //!TEMPORARY_DISABLED_FOR_TARGETS(ESP32S2)
 
 static bool s_test_nonzero_sha_of_partition(const esp_partition_t *part, bool allow_invalid_image)
 {
@@ -104,7 +102,6 @@ TEST_CASE("Test esp_partition_get_sha256() with data", "[spi_flash]")
     s_test_nonzero_sha_of_partition(part, false);
 }
 
-#if !TEMPORARY_DISABLED_FOR_TARGETS(ESP32S2)
 TEST_CASE("Test esp_partition_get_sha256() with app", "[spi_flash]")
 {
     bool found_valid_app = false;
@@ -124,5 +121,4 @@ TEST_CASE("Test esp_partition_get_sha256() with app", "[spi_flash]")
 
     TEST_ASSERT_MESSAGE(found_valid_app, "At least one app partition should be a valid app partition");
 }
-#endif //!TEMPORARY_DISABLED_FOR_TARGETS(ESP32S2)
 

+ 0 - 4
components/spi_flash/test/test_read_write.c

@@ -31,7 +31,6 @@
 #define MIN_BLOCK_SIZE  12
 /* Base offset in flash for tests. */
 
-#if !TEMPORARY_DISABLED_FOR_TARGETS(ESP32S2)
 static size_t start;
 
 static void setup_tests(void)
@@ -140,9 +139,7 @@ TEST_CASE("Test spi_flash_read", "[spi_flash][esp_flash]")
     }
 #endif
 }
-#endif //!TEMPORARY_DISABLED_FOR_TARGETS(ESP32S2)
 
-#if !TEMPORARY_DISABLED_FOR_TARGETS(ESP32S2)
 static void IRAM_ATTR test_write(int dst_off, int src_off, int len)
 {
     char src_buf[64], dst_gold[64];
@@ -243,7 +240,6 @@ TEST_CASE("Test spi_flash_write", "[spi_flash][esp_flash]")
     ESP_ERROR_CHECK(spi_flash_write(start, (char *) 0x40080000, 16));
 #endif
 }
-#endif
 
 #ifdef CONFIG_SPIRAM
 

+ 1 - 1
tools/ci/config/target-test.yml

@@ -509,7 +509,7 @@ UT_034:
 
 UT_035:
   extends: .unit_test_s2_template
-  parallel: 26
+  parallel: 27
   tags:
     - ESP32S2_IDF
     - UT_T1_1