Merge branch 'bugfix/storage_generic_pytests_v5.3' into 'release/v5.3'

fix(ci): Removed storage related entries in known generate test child pipeline warnings (v5.3)

See merge request espressif/esp-idf!36685
This commit is contained in:
Martin Vychodil
2025-02-15 00:07:25 +08:00
10 changed files with 20 additions and 20 deletions

View File

@@ -1,6 +1,5 @@
# SPDX-FileCopyrightText: 2023 Espressif Systems (Shanghai) CO LTD # SPDX-FileCopyrightText: 2023 Espressif Systems (Shanghai) CO LTD
# SPDX-License-Identifier: Apache-2.0 # SPDX-License-Identifier: Apache-2.0
import pytest import pytest
from pytest_embedded_idf.dut import IdfDut from pytest_embedded_idf.dut import IdfDut
@@ -12,6 +11,7 @@ CONFIGS_NVS_ENCR_FLASH_ENC = [
@pytest.mark.esp32 @pytest.mark.esp32
@pytest.mark.esp32c3 @pytest.mark.esp32c3
@pytest.mark.generic
@pytest.mark.parametrize('config', ['default'], indirect=True) @pytest.mark.parametrize('config', ['default'], indirect=True)
def test_nvs_flash(dut: IdfDut) -> None: def test_nvs_flash(dut: IdfDut) -> None:
dut.expect_exact('Press ENTER to see the list of tests') dut.expect_exact('Press ENTER to see the list of tests')

View File

@@ -8,6 +8,7 @@ from pytest_embedded import Dut
@pytest.mark.esp32c3 @pytest.mark.esp32c3
@pytest.mark.esp32c6 @pytest.mark.esp32c6
@pytest.mark.esp32h2 @pytest.mark.esp32h2
@pytest.mark.generic
@pytest.mark.parametrize('config', [ @pytest.mark.parametrize('config', [
'default', 'iram', 'default', 'iram',
], indirect=True) ], indirect=True)
@@ -16,6 +17,7 @@ def test_vfs_default(dut: Dut) -> None:
@pytest.mark.esp32 @pytest.mark.esp32
@pytest.mark.generic
@pytest.mark.parametrize('config', [ @pytest.mark.parametrize('config', [
'ccomp', 'ccomp',
], indirect=True) ], indirect=True)

View File

@@ -7,3 +7,5 @@ CONFIG_PARTITION_TABLE_CUSTOM=y
CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions.csv" CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions.csv"
CONFIG_ESP_TASK_WDT_INIT=n CONFIG_ESP_TASK_WDT_INIT=n
CONFIG_VFS_MAX_COUNT=10

View File

@@ -1,6 +1,5 @@
# SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD # SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD
# SPDX-License-Identifier: Unlicense OR CC0-1.0 # SPDX-License-Identifier: Unlicense OR CC0-1.0
import logging import logging
import random import random
import re import re
@@ -13,6 +12,7 @@ from pytest_embedded import Dut
@pytest.mark.esp32 @pytest.mark.esp32
@pytest.mark.esp32c3 @pytest.mark.esp32c3
@pytest.mark.generic
def test_examples_nvs_rw_blob(dut: Dut) -> None: def test_examples_nvs_rw_blob(dut: Dut) -> None:
def expect_start_msg(index: int) -> None: def expect_start_msg(index: int) -> None:
dut.expect('Restart counter = {}'.format(index), timeout=10) dut.expect('Restart counter = {}'.format(index), timeout=10)

View File

@@ -1,6 +1,5 @@
# SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD # SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD
# SPDX-License-Identifier: Unlicense OR CC0-1.0 # SPDX-License-Identifier: Unlicense OR CC0-1.0
import logging import logging
from itertools import zip_longest from itertools import zip_longest
@@ -10,11 +9,14 @@ from pytest_embedded import Dut
@pytest.mark.esp32 @pytest.mark.esp32
@pytest.mark.esp32c3 @pytest.mark.esp32c3
@pytest.mark.generic
def test_examples_nvs_rw_value(dut: Dut) -> None: def test_examples_nvs_rw_value(dut: Dut) -> None:
dut.serial.erase_flash()
dut.serial.flash()
for i, counter_state in zip_longest(range(4), ('The value is not initialized yet!',), fillvalue='Done'): 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) dut.expect('Opening Non-Volatile Storage \\(NVS\\) handle... Done', timeout=20)
dut.expect('Reading restart counter from NVS ... {}'.format(counter_state), timeout=20) dut.expect('Reading restart counter from NVS ... {}'.format(counter_state), timeout=20)
dut.expect('Restart counter = {}'.format(i) if i > 0 else '', timeout=20) dut.expect('Restart counter = {}'.format(i) if int(i) > 0 else '', timeout=20)
dut.expect('Updating restart counter in NVS ... Done', timeout=20) dut.expect('Updating restart counter in NVS ... Done', timeout=20)
dut.expect('Committing updates in NVS ... Done', timeout=20) dut.expect('Committing updates in NVS ... Done', timeout=20)
dut.expect('Restarting in 10 seconds...', timeout=20) dut.expect('Restarting in 10 seconds...', timeout=20)

View File

@@ -1,6 +1,5 @@
# SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD # SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD
# SPDX-License-Identifier: Unlicense OR CC0-1.0 # SPDX-License-Identifier: Unlicense OR CC0-1.0
import logging import logging
from itertools import zip_longest from itertools import zip_longest
@@ -10,11 +9,14 @@ from pytest_embedded import Dut
@pytest.mark.esp32 @pytest.mark.esp32
@pytest.mark.esp32c3 @pytest.mark.esp32c3
@pytest.mark.generic
def test_examples_nvs_rw_value_cxx(dut: Dut) -> None: def test_examples_nvs_rw_value_cxx(dut: Dut) -> None:
dut.serial.erase_flash()
dut.serial.flash()
for i, counter_state in zip_longest(range(4), ('The value is not initialized yet!',), fillvalue='Done'): 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) dut.expect('Opening Non-Volatile Storage \\(NVS\\) handle... Done', timeout=20)
dut.expect('Reading restart counter from NVS ... {}'.format(counter_state), timeout=20) dut.expect('Reading restart counter from NVS ... {}'.format(counter_state), timeout=20)
dut.expect('Restart counter = {}'.format(i) if i > 0 else '', timeout=20) dut.expect('Restart counter = {}'.format(i) if int(i) > 0 else '', timeout=20)
dut.expect('Updating restart counter in NVS ... Done', timeout=20) dut.expect('Updating restart counter in NVS ... Done', timeout=20)
dut.expect('Committing updates in NVS ... Done', timeout=20) dut.expect('Committing updates in NVS ... Done', timeout=20)
dut.expect('Restarting in 10 seconds...', timeout=20) dut.expect('Restarting in 10 seconds...', timeout=20)

View File

@@ -106,7 +106,7 @@ void app_main(void)
ESP_LOGI(TAG, "file still exists"); ESP_LOGI(TAG, "file still exists");
return; return;
} else { } else {
ESP_LOGI(TAG, "file doesnt exist, format done"); ESP_LOGI(TAG, "file does not exist, format done");
} }
//Create file and write //Create file and write

View File

@@ -1,7 +1,5 @@
# SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD # SPDX-FileCopyrightText: 2022-2024 Espressif Systems (Shanghai) CO LTD
# SPDX-License-Identifier: Unlicense OR CC0-1.0 # SPDX-License-Identifier: Unlicense OR CC0-1.0
import re import re
import pytest import pytest
@@ -10,6 +8,7 @@ from pytest_embedded import Dut
@pytest.mark.esp32 @pytest.mark.esp32
@pytest.mark.esp32c3 @pytest.mark.esp32c3
@pytest.mark.generic
def test_wear_levelling_example(dut: Dut) -> None: def test_wear_levelling_example(dut: Dut) -> None:
message_list = ('example: Mounting FAT filesystem', message_list = ('example: Mounting FAT filesystem',
@@ -18,7 +17,7 @@ def test_wear_levelling_example(dut: Dut) -> None:
'example: Reading file', 'example: Reading file',
re.compile(str.encode('example: Read from file: \'hello world, from ESP-IDF \\S+\'')), re.compile(str.encode('example: Read from file: \'hello world, from ESP-IDF \\S+\'')),
re.compile(str.encode('vfs_fat_spiflash: Formatting FATFS partition, allocation unit size=\\S+')), re.compile(str.encode('vfs_fat_spiflash: Formatting FATFS partition, allocation unit size=\\S+')),
'example: file doesnt exist, format done', 'example: file does not exist, format done',
'example: Opening file', 'example: Opening file',
'example: File written', 'example: File written',
'example: Reading file', 'example: Reading file',

View File

@@ -2,14 +2,7 @@
# no_env_marker_test_cases: List of test cases that do not have environment markers. # no_env_marker_test_cases: List of test cases that do not have environment markers.
# each item shall be the test node id, you may check the error message to get the node id. # each item shall be the test node id, you may check the error message to get the node id.
no_env_marker_test_cases: no_env_marker_test_cases:
- components/nvs_flash/test_apps/pytest_nvs_flash.py::test_nvs_flash[default] - dummy_test_case
- components/vfs/test_apps/pytest_vfs.py::test_vfs_ccomp[ccomp]
- components/vfs/test_apps/pytest_vfs.py::test_vfs_default[default]
- components/vfs/test_apps/pytest_vfs.py::test_vfs_default[iram]
- examples/storage/nvs_rw_blob/pytest_nvs_rw_blob.py::test_examples_nvs_rw_blob
- examples/storage/nvs_rw_value/pytest_nvs_rw_value.py::test_examples_nvs_rw_value
- examples/storage/nvs_rw_value_cxx/pytest_nvs_rw_value_cxx.py::test_examples_nvs_rw_value_cxx
- examples/storage/wear_levelling/pytest_wear_levelling_example.py::test_wear_levelling_example
# no_runner_tags: List of runner tags that has no test runner set. # no_runner_tags: List of runner tags that has no test runner set.
# each item shall be a comma separated list of runner tags. # each item shall be a comma separated list of runner tags.

View File

@@ -78,7 +78,7 @@ class IdfPytestEmbedded:
self.apps_list = ( self.apps_list = (
[os.path.join(idf_relpath(app.app_dir), app.build_dir) for app in apps if app.build_status == BuildStatus.SUCCESS] [os.path.join(idf_relpath(app.app_dir), app.build_dir) for app in apps if app.build_status == BuildStatus.SUCCESS]
if apps if apps is not None
else None else None
) )