From c276c36dfebfe0023b4c4461754c93e6f436d27e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Rohl=C3=ADnek?= Date: Tue, 28 Nov 2023 10:20:15 +0100 Subject: [PATCH 1/2] feat(storage/nvs_flash): add dependencies to nvs_flash test apps --- components/nvs_flash/.build-test-rules.yml | 14 ++++++++++++++ components/nvs_flash/test_apps/pytest_nvs_flash.py | 4 ++-- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/components/nvs_flash/.build-test-rules.yml b/components/nvs_flash/.build-test-rules.yml index 93b76378a9..3902727a71 100644 --- a/components/nvs_flash/.build-test-rules.yml +++ b/components/nvs_flash/.build-test-rules.yml @@ -1,3 +1,17 @@ components/nvs_flash/host_test: + depends_components: + - spi_flash + - nvs_flash + - nvs_sec_provider + - esp_partition enable: - if: IDF_TARGET == "linux" + +components/nvs_flash/test_apps: + depends_components: + - spi_flash + - nvs_flash + - nvs_sec_provider + - esp_partition + disable_test: + - if: IDF_TARGET not in ["esp32", "esp32c3"] diff --git a/components/nvs_flash/test_apps/pytest_nvs_flash.py b/components/nvs_flash/test_apps/pytest_nvs_flash.py index 174664912e..02d8e0747c 100644 --- a/components/nvs_flash/test_apps/pytest_nvs_flash.py +++ b/components/nvs_flash/test_apps/pytest_nvs_flash.py @@ -10,8 +10,8 @@ CONFIGS_NVS_ENCR_FLASH_ENC = [ ] -@pytest.mark.supported_targets -@pytest.mark.generic +@pytest.mark.esp32 +@pytest.mark.esp32c3 @pytest.mark.parametrize('config', ['default'], indirect=True) def test_nvs_flash(dut: IdfDut) -> None: dut.expect_exact('Press ENTER to see the list of tests') From 092f5aff293c51fc4caed6ab30314865e6ef08cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Rohl=C3=ADnek?= Date: Mon, 11 Dec 2023 08:32:21 +0100 Subject: [PATCH 2/2] feat(storage): Update build test rules for storage related components --- .../host_test/.build-test-rules.yml | 3 ++ .../fatfs/test_apps/.build-test-rules.yml | 38 +++++++++++++++++-- .../flash_ro/pytest_fatfs_flash_ro.py | 4 +- .../flash_wl/pytest_fatfs_flash_wl.py | 6 +-- .../test_apps/sdcard/pytest_fatfs_sdcard.py | 2 +- .../spiffs/host_test/.build-test-rules.yml | 5 +++ .../spiffs/test_apps/.build-test-rules.yml | 6 +++ .../vfs/test_apps/.build-test-rules.yml | 12 ++++++ components/vfs/test_apps/pytest_vfs.py | 4 +- 9 files changed, 67 insertions(+), 13 deletions(-) create mode 100644 components/vfs/test_apps/.build-test-rules.yml diff --git a/components/esp_partition/host_test/.build-test-rules.yml b/components/esp_partition/host_test/.build-test-rules.yml index b46c556453..b129dc131a 100644 --- a/components/esp_partition/host_test/.build-test-rules.yml +++ b/components/esp_partition/host_test/.build-test-rules.yml @@ -4,3 +4,6 @@ components/esp_partition/host_test/partition_api_test: enable: - if: IDF_TARGET == "linux" reason: only test on linux + depends_components: + - spi_flash + - esp_partition diff --git a/components/fatfs/test_apps/.build-test-rules.yml b/components/fatfs/test_apps/.build-test-rules.yml index d827780451..a42b93fbe7 100644 --- a/components/fatfs/test_apps/.build-test-rules.yml +++ b/components/fatfs/test_apps/.build-test-rules.yml @@ -1,11 +1,41 @@ # Documentation: .gitlab/ci/README.md#manifest-file-to-control-the-buildtest-apps -components/fatfs/test_apps/sdcard: +components/fatfs/test_apps/flash_ro: disable_test: - - if: IDF_TARGET in ["esp32s3", "esp32c2", "esp32c6", "esp32h2"] - temporary: true - reason: No sdspi runners for these targets + - if: IDF_TARGET not in ["esp32", "esp32c3"] + reason: only one target per arch needed + + depends_components: + - esp_partition + - spi_flash + - fatfs + - vfs + +components/fatfs/test_apps/flash_wl: + disable_test: + - if: IDF_TARGET not in ["esp32", "esp32c3"] + reason: only one target per arch needed + + depends_components: + - esp_partition + - spi_flash + - fatfs + - vfs + - wear_leveling +components/fatfs/test_apps/sdcard: disable: - if: IDF_TARGET == "esp32p4" temporary: true reason: target esp32p4 is not supported yet # TODO: IDF-7501 + + disable_test: + - if: IDF_TARGET not in ["esp32", "esp32c3"] + temporary: true + reason: lack of runners + + depends_components: + - esp_driver_sdmmc + - esp_driver_spi + - sdmmc + - fatfs + - vfs diff --git a/components/fatfs/test_apps/flash_ro/pytest_fatfs_flash_ro.py b/components/fatfs/test_apps/flash_ro/pytest_fatfs_flash_ro.py index eda296ef2e..77912fddda 100644 --- a/components/fatfs/test_apps/flash_ro/pytest_fatfs_flash_ro.py +++ b/components/fatfs/test_apps/flash_ro/pytest_fatfs_flash_ro.py @@ -5,8 +5,8 @@ import pytest from pytest_embedded import Dut -@pytest.mark.supported_targets -@pytest.mark.generic +@pytest.mark.esp32 +@pytest.mark.esp32c3 def test_fatfs_flash_ro(dut: Dut) -> None: dut.expect_exact('Press ENTER to see the list of tests') dut.write('') diff --git a/components/fatfs/test_apps/flash_wl/pytest_fatfs_flash_wl.py b/components/fatfs/test_apps/flash_wl/pytest_fatfs_flash_wl.py index af8c5db6d4..da56a45d4c 100644 --- a/components/fatfs/test_apps/flash_wl/pytest_fatfs_flash_wl.py +++ b/components/fatfs/test_apps/flash_wl/pytest_fatfs_flash_wl.py @@ -5,8 +5,8 @@ import pytest from pytest_embedded import Dut -@pytest.mark.supported_targets -@pytest.mark.generic +@pytest.mark.esp32 +@pytest.mark.esp32c3 @pytest.mark.parametrize( 'config', [ @@ -23,7 +23,7 @@ def test_fatfs_flash_wl_generic(dut: Dut) -> None: dut.expect_unity_test_output(timeout=180) -@pytest.mark.supported_targets +@pytest.mark.esp32 @pytest.mark.psram @pytest.mark.parametrize( 'config', diff --git a/components/fatfs/test_apps/sdcard/pytest_fatfs_sdcard.py b/components/fatfs/test_apps/sdcard/pytest_fatfs_sdcard.py index fe720a0251..8088f7a7af 100644 --- a/components/fatfs/test_apps/sdcard/pytest_fatfs_sdcard.py +++ b/components/fatfs/test_apps/sdcard/pytest_fatfs_sdcard.py @@ -6,6 +6,7 @@ from pytest_embedded import Dut @pytest.mark.esp32 +@pytest.mark.esp32c3 @pytest.mark.sdcard_sdmode @pytest.mark.parametrize( 'config', @@ -23,7 +24,6 @@ def test_fatfs_sdcard_generic_sdmmc(dut: Dut) -> None: @pytest.mark.esp32 -@pytest.mark.esp32s2 @pytest.mark.esp32c3 @pytest.mark.sdcard_spimode @pytest.mark.parametrize( diff --git a/components/spiffs/host_test/.build-test-rules.yml b/components/spiffs/host_test/.build-test-rules.yml index eec002ed8a..9de36c5b11 100644 --- a/components/spiffs/host_test/.build-test-rules.yml +++ b/components/spiffs/host_test/.build-test-rules.yml @@ -2,3 +2,8 @@ components/spiffs/host_test: enable: - if: IDF_TARGET == "linux" reason: only test on linux + depends_components: + - spi_flash + - esp_partition + - spiffs + - vfs diff --git a/components/spiffs/test_apps/.build-test-rules.yml b/components/spiffs/test_apps/.build-test-rules.yml index 7ae25a037a..f3bf52966a 100644 --- a/components/spiffs/test_apps/.build-test-rules.yml +++ b/components/spiffs/test_apps/.build-test-rules.yml @@ -2,3 +2,9 @@ components/spiffs/test_apps: disable_test: - if: IDF_TARGET not in ["esp32", "esp32c3", "esp32s3"] reason: These chips should be sufficient for test coverage (Xtensa and RISC-V, single and dual core) + + depends_components: + - spi_flash + - esp_partition + - spiffs + - vfs diff --git a/components/vfs/test_apps/.build-test-rules.yml b/components/vfs/test_apps/.build-test-rules.yml new file mode 100644 index 0000000000..6f8e89a2a6 --- /dev/null +++ b/components/vfs/test_apps/.build-test-rules.yml @@ -0,0 +1,12 @@ +components/vfs/test_apps: + disable_test: + - if: IDF_TARGET not in ["esp32", "esp32c2", "esp32c3", "esp32c6", "esp32h2", "esp32s3"] + temporary: true + reason: lack of runners + + depends_components: + - vfs + - fatfs + - spiffs + - console + - driver diff --git a/components/vfs/test_apps/pytest_vfs.py b/components/vfs/test_apps/pytest_vfs.py index 92c19370a3..5e471f1518 100644 --- a/components/vfs/test_apps/pytest_vfs.py +++ b/components/vfs/test_apps/pytest_vfs.py @@ -9,7 +9,6 @@ from pytest_embedded import Dut @pytest.mark.esp32c3 @pytest.mark.esp32c6 @pytest.mark.esp32h2 -@pytest.mark.generic @pytest.mark.parametrize('config', [ 'default', 'iram', ], indirect=True) @@ -18,8 +17,7 @@ def test_vfs_default(dut: Dut) -> None: @pytest.mark.esp32 -@pytest.mark.esp32s2 -@pytest.mark.generic +@pytest.mark.esp32c3 @pytest.mark.parametrize('config', [ 'ccomp', ], indirect=True)