Bladeren bron

feat(storage): minimize platforms for tests

Tomáš Rohlínek 2 jaren geleden
bovenliggende
commit
559fb2d2bf

+ 20 - 10
examples/storage/.build-test-rules.yml

@@ -2,10 +2,11 @@
 
 examples/storage/custom_flash_driver:
   depends_components:
-    - fatfs
-    - vfs
     - spi_flash
     - driver
+  disable_test:
+    - if: IDF_TARGET not in ["esp32", "esp32c3"]
+      reason: only one target per arch needed
 
 examples/storage/emmc:
   depends_components:
@@ -23,12 +24,11 @@ examples/storage/ext_flash_fatfs:
     - vfs
     - spi_flash
     - driver
-    - esp_system
   disable:
     - if: IDF_TARGET == "esp32p4"
       reason: not supported yet
   disable_test:
-    - if: IDF_TARGET not in ["esp32", "esp32s2"]
+    - if: IDF_TARGET not in ["esp32"]
       temporary: true
       reason: lack of runners
 
@@ -36,7 +36,6 @@ examples/storage/fatfsgen:
   depends_components:
     - fatfs
     - vfs
-    - esp_system
   disable_test:
     - if: IDF_TARGET != "esp32"
       reason: only one target needed
@@ -45,17 +44,23 @@ examples/storage/nvs_rw_blob:
   depends_components:
     - nvs_flash
     - driver
-    - esp_system
+  disable_test:
+    - if: IDF_TARGET not in ["esp32", "esp32c3"]
+      reason: only one target per arch needed
 
 examples/storage/nvs_rw_value:
   depends_components:
     - nvs_flash
-    - nvs_system
+  disable_test:
+    - if: IDF_TARGET not in ["esp32", "esp32c3"]
+      reason: only one target per arch needed
 
 examples/storage/nvs_rw_value_cxx:
   depends_components:
     - nvs_flash
-    - nvs_system
+  disable_test:
+    - if: IDF_TARGET not in ["esp32", "esp32c3"]
+      reason: only one target per arch needed
 
 examples/storage/nvsgen:
   depends_components:
@@ -100,7 +105,6 @@ examples/storage/perf_benchmark:
     - vfs
     - sdmmc
     - spiffs
-    - soc
     - wear_levelling
     - esp_partition
     - driver
@@ -133,7 +137,7 @@ examples/storage/sd_card/sdspi:
   disable:
     - if: SOC_GPSPI_SUPPORTED != 1
   disable_test:
-    - if: IDF_TARGET not in ["esp32", "esp32c3", "esp32s2"]
+    - if: IDF_TARGET not in ["esp32", "esp32c3"]
       temporary: true
       reason: lack of runners
 
@@ -149,6 +153,9 @@ examples/storage/spiffs:
   depends_components:
     - spiffs
     - vfs
+  disable_test:
+    - if: IDF_TARGET not in ["esp32", "esp32c3"]
+      reason: only one target per arch needed
 
 examples/storage/spiffsgen:
   depends_components:
@@ -164,3 +171,6 @@ examples/storage/wear_levelling:
     - vfs
     - wear_levelling
     - fatfs
+  disable_test:
+    - if: IDF_TARGET not in ["esp32", "esp32c3"]
+      reason: only one target per arch needed

+ 0 - 1
examples/storage/ext_flash_fatfs/pytest_ext_flash_fatfs.py

@@ -7,7 +7,6 @@ from pytest_embedded import Dut
 
 
 @pytest.mark.esp32
-@pytest.mark.esp32s2
 @pytest.mark.external_flash
 def test_ext_flash_fatfs(dut: Dut) -> None:
     message_list = ('Initialized external Flash',

+ 0 - 1
examples/storage/fatfsgen/main/fatfsgen_example_main.c

@@ -9,7 +9,6 @@
 #include <string.h>
 #include "esp_vfs.h"
 #include "esp_vfs_fat.h"
-#include "esp_system.h"
 #include "sdkconfig.h"
 
 #if CONFIG_EXAMPLE_FATFS_MODE_READ_ONLY

+ 2 - 1
examples/storage/nvs_rw_blob/pytest_nvs_rw_blob.py

@@ -11,7 +11,8 @@ import pytest
 from pytest_embedded import Dut
 
 
-@pytest.mark.supported_targets
+@pytest.mark.esp32
+@pytest.mark.esp32c3
 def test_examples_nvs_rw_blob(dut: Dut) -> None:
     def expect_start_msg(index: int) -> None:
         dut.expect('Restart counter = {}'.format(index), timeout=10)

+ 2 - 1
examples/storage/nvs_rw_value/pytest_nvs_rw_value.py

@@ -8,7 +8,8 @@ import pytest
 from pytest_embedded import Dut
 
 
-@pytest.mark.supported_targets
+@pytest.mark.esp32
+@pytest.mark.esp32c3
 def test_examples_nvs_rw_value(dut: Dut) -> None:
     for i, counter_state in zip_longest(range(4), ('The value is not initialized yet!',), fillvalue='Done'):
         dut.expect('Opening Non-Volatile Storage \\(NVS\\) handle... Done', timeout=20)

+ 2 - 1
examples/storage/nvs_rw_value_cxx/pytest_nvs_rw_value_cxx.py

@@ -8,7 +8,8 @@ import pytest
 from pytest_embedded import Dut
 
 
-@pytest.mark.supported_targets
+@pytest.mark.esp32
+@pytest.mark.esp32c3
 def test_examples_nvs_rw_value_cxx(dut: Dut) -> None:
     for i, counter_state in zip_longest(range(4), ('The value is not initialized yet!',), fillvalue='Done'):
         dut.expect('Opening Non-Volatile Storage \\(NVS\\) handle... Done', timeout=20)

+ 0 - 1
examples/storage/sd_card/sdspi/pytest_sdspi_card_example.py

@@ -11,7 +11,6 @@ from pytest_embedded import Dut
 
 @pytest.mark.esp32
 @pytest.mark.esp32c3  # no runner available at the moment
-@pytest.mark.esp32s2
 @pytest.mark.sdcard_spimode
 def test_examples_sd_card_sdspi(dut: Dut) -> None:
     dut.expect('example: Initializing SD card', timeout=20)

+ 0 - 24
examples/storage/semihost_vfs/pytest_semihost_vfs.py

@@ -34,30 +34,6 @@ def prepare() -> t.Generator[None, None, None]:
             f'-c \'set ESP_SEMIHOST_BASEDIR "{TEMP_DIR}"\' -f board/esp32-wrover-kit-3.3v.cfg',
             marks=[pytest.mark.esp32],
         ),
-        # pytest.param(
-        #     'esp,idf,jtag',
-        #     'y',
-        #     f'-c \'set ESP_SEMIHOST_BASEDIR "{TEMP_DIR}"\' -f board/esp32c2-ftdi.cfg',
-        #     marks=[pytest.mark.esp32c2],
-        # ),
-        # pytest.param(
-        #     'esp,idf,jtag',
-        #     'y',
-        #     f'-c \'set ESP_SEMIHOST_BASEDIR "{TEMP_DIR}"\' -f board/esp32s2-kaluga-1.cfg',
-        #     marks=[pytest.mark.esp32c3],
-        # ),
-        # pytest.param(
-        #     'esp,idf,jtag',
-        #     'y',
-        #     f'-c \'set ESP_SEMIHOST_BASEDIR "{TEMP_DIR}"\' -f board/esp32s2-kaluga-1.cfg',
-        #     marks=[pytest.mark.esp32s2],
-        # ),
-        # pytest.param(
-        #     'esp,idf,jtag',
-        #     'y',
-        #     f'-c \'set ESP_SEMIHOST_BASEDIR "{TEMP_DIR}"\' -f board/esp32s2-kaluga-1.cfg',
-        #     marks=[pytest.mark.esp32s3],
-        # ),
     ],
     indirect=True,
 )

+ 2 - 1
examples/storage/spiffs/pytest_spiffs_example.py

@@ -7,7 +7,8 @@ import pytest
 from pytest_embedded import Dut
 
 
-@pytest.mark.supported_targets
+@pytest.mark.esp32
+@pytest.mark.esp32c3
 def test_examples_spiffs(dut: Dut) -> None:
     message_list = (rb'example: Initializing SPIFFS',
                     rb'example: Partition size: total: \d+, used: \d+',

+ 2 - 1
examples/storage/wear_levelling/pytest_wear_levelling_example.py

@@ -8,7 +8,8 @@ import pytest
 from pytest_embedded import Dut
 
 
-@pytest.mark.supported_targets
+@pytest.mark.esp32
+@pytest.mark.esp32c3
 def test_wear_levelling_example(dut: Dut) -> None:
 
     message_list = ('example: Mounting FAT filesystem',