diff --git a/components/esp_timer/test_apps/pytest_esp_timer_ut.py b/components/esp_timer/test_apps/pytest_esp_timer_ut.py index 0b6ec85707..cd4379ca61 100644 --- a/components/esp_timer/test_apps/pytest_esp_timer_ut.py +++ b/components/esp_timer/test_apps/pytest_esp_timer_ut.py @@ -24,7 +24,7 @@ def test_esp_timer(dut: Dut) -> None: @pytest.mark.esp32 -@pytest.mark.quad_psram +@pytest.mark.psram @pytest.mark.parametrize('config', [ 'psram', ], indirect=True) 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 77912fddda..be1b048efd 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 @@ -1,12 +1,12 @@ # SPDX-FileCopyrightText: 2022 Espressif Systems (Shanghai) CO LTD # SPDX-License-Identifier: CC0-1.0 - import pytest from pytest_embedded import Dut @pytest.mark.esp32 @pytest.mark.esp32c3 +@pytest.mark.generic 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 da56a45d4c..c839871f91 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 @@ -1,12 +1,12 @@ # SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD # SPDX-License-Identifier: CC0-1.0 - import pytest from pytest_embedded import Dut @pytest.mark.esp32 @pytest.mark.esp32c3 +@pytest.mark.generic @pytest.mark.parametrize( 'config', [ diff --git a/components/pthread/test_apps/pthread_psram_tests/pytest_pthread_psram_tests.py b/components/pthread/test_apps/pthread_psram_tests/pytest_pthread_psram_tests.py index f5b576027b..65408ec7ab 100644 --- a/components/pthread/test_apps/pthread_psram_tests/pytest_pthread_psram_tests.py +++ b/components/pthread/test_apps/pthread_psram_tests/pytest_pthread_psram_tests.py @@ -1,10 +1,10 @@ # SPDX-FileCopyrightText: 2023 Espressif Systems (Shanghai) CO LTD # SPDX-License-Identifier: CC0-1.0 - import pytest from pytest_embedded import Dut @pytest.mark.esp32 +@pytest.mark.psram def test_pthread_psram(dut: Dut) -> None: dut.run_all_single_board_cases(timeout=10) diff --git a/examples/protocols/http_server/file_serving/pytest_http_server_file_serving.py b/examples/protocols/http_server/file_serving/pytest_http_server_file_serving.py index bfeac574a6..66f1faa9db 100644 --- a/examples/protocols/http_server/file_serving/pytest_http_server_file_serving.py +++ b/examples/protocols/http_server/file_serving/pytest_http_server_file_serving.py @@ -1,8 +1,7 @@ #!/usr/bin/env python # -# SPDX-FileCopyrightText: 2021-2022 Espressif Systems (Shanghai) CO LTD +# SPDX-FileCopyrightText: 2021-2024 Espressif Systems (Shanghai) CO LTD # SPDX-License-Identifier: Apache-2.0 - import hashlib import http.client import logging @@ -17,12 +16,14 @@ except ModuleNotFoundError: sys.path.append(os.path.join(os.path.dirname(__file__), '..', '..', '..', '..', 'tools', 'ci', 'python_packages')) from idf_http_server_test import adder as client +from common_test_methods import get_env_config_variable from pytest_embedded import Dut @pytest.mark.esp32 @pytest.mark.esp32c3 @pytest.mark.esp32s3 +@pytest.mark.wifi_router @pytest.mark.parametrize('config', ['spiffs',], indirect=True) def test_examples_protocol_http_server_file_serving(dut: Dut) -> None: @@ -35,6 +36,14 @@ def test_examples_protocol_http_server_file_serving(dut: Dut) -> None: logging.info('Starting http file serving simple test app') dut.expect('Initializing SPIFFS', timeout=30) + + if dut.app.sdkconfig.get('EXAMPLE_WIFI_SSID_PWD_FROM_STDIN') is True: + dut.expect('Please input ssid password:') + env_name = 'wifi_router' + ap_ssid = get_env_config_variable(env_name, 'ap_ssid') + ap_password = get_env_config_variable(env_name, 'ap_password') + dut.write(f'{ap_ssid} {ap_password}') + # Parse IP address of STA logging.info('Waiting to connect with AP') got_ip = dut.expect(r'IPv4 address: (\d+\.\d+\.\d+\.\d+)[^\d]', timeout=30)[1].decode() diff --git a/examples/protocols/http_server/file_serving/sdkconfig.ci.spiffs b/examples/protocols/http_server/file_serving/sdkconfig.ci.spiffs index e69de29bb2..543e69e76e 100644 --- a/examples/protocols/http_server/file_serving/sdkconfig.ci.spiffs +++ b/examples/protocols/http_server/file_serving/sdkconfig.ci.spiffs @@ -0,0 +1 @@ +CONFIG_EXAMPLE_WIFI_SSID_PWD_FROM_STDIN=y diff --git a/examples/storage/fatfsgen/pytest_fatfsgen_example.py b/examples/storage/fatfsgen/pytest_fatfsgen_example.py index 74ed3d8051..832e96b126 100644 --- a/examples/storage/fatfsgen/pytest_fatfsgen_example.py +++ b/examples/storage/fatfsgen/pytest_fatfsgen_example.py @@ -1,12 +1,12 @@ -# 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 - import os import re import shutil import sys from datetime import datetime -from subprocess import STDOUT, run +from subprocess import run +from subprocess import STDOUT from typing import List import pytest @@ -51,8 +51,8 @@ def compare_folders(fp1: str, fp2: str) -> bool: return f1_.read() == f2_.read() -# Example_GENERIC @pytest.mark.esp32 +@pytest.mark.generic @pytest.mark.parametrize('config', ['test_read_only_partition_gen', 'test_read_only_partition_gen_default_dt', 'test_read_only_partition_gen_ln', diff --git a/examples/storage/nvsgen/pytest_nvsgen_example.py b/examples/storage/nvsgen/pytest_nvsgen_example.py index cc3360a5c5..dd18f2b40a 100644 --- a/examples/storage/nvsgen/pytest_nvsgen_example.py +++ b/examples/storage/nvsgen/pytest_nvsgen_example.py @@ -1,11 +1,11 @@ # SPDX-FileCopyrightText: 2023 Espressif Systems (Shanghai) CO LTD # SPDX-License-Identifier: Unlicense OR CC0-1.0 - import pytest from pytest_embedded import Dut @pytest.mark.esp32 +@pytest.mark.generic def test_nvsgen_example(dut: Dut) -> None: dut.expect('Reading values from NVS', timeout=10) dut.expect('Reading values from NVS done - all OK', timeout=10) diff --git a/examples/storage/partition_api/partition_find/pytest_partition_find_example.py b/examples/storage/partition_api/partition_find/pytest_partition_find_example.py index 6b03f8174c..5121657b4c 100644 --- a/examples/storage/partition_api/partition_find/pytest_partition_find_example.py +++ b/examples/storage/partition_api/partition_find/pytest_partition_find_example.py @@ -1,6 +1,5 @@ # SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD # SPDX-License-Identifier: Unlicense OR CC0-1.0 - import re import pytest @@ -9,6 +8,7 @@ from pytest_embedded import Dut @pytest.mark.esp32 @pytest.mark.esp32c3 +@pytest.mark.generic def test_partition_find_example(dut: Dut) -> None: def expect_partition(name: str, offset: int, size: int) -> None: dut.expect(re.compile(str.encode("found partition '{}' at offset {:#x} with size {:#x}".format(name, offset, size))), timeout=5) diff --git a/examples/storage/partition_api/partition_mmap/pytest_partition_mmap_example.py b/examples/storage/partition_api/partition_mmap/pytest_partition_mmap_example.py index 46d306fc77..6496365d11 100644 --- a/examples/storage/partition_api/partition_mmap/pytest_partition_mmap_example.py +++ b/examples/storage/partition_api/partition_mmap/pytest_partition_mmap_example.py @@ -1,6 +1,5 @@ # SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD # SPDX-License-Identifier: Unlicense OR CC0-1.0 - import re import pytest @@ -9,6 +8,7 @@ from pytest_embedded import Dut @pytest.mark.esp32 @pytest.mark.esp32c3 +@pytest.mark.generic def test_partition_mmap_example(dut: Dut) -> None: # ESP_ERROR_CHECK or assert will cause abort on error and "Example end" won't be received message_list = (rb'Written sample data to partition: ESP-IDF Partition Memory Map Example', diff --git a/examples/storage/partition_api/partition_ops/pytest_partition_ops_example.py b/examples/storage/partition_api/partition_ops/pytest_partition_ops_example.py index 74abd28608..98e2789d8b 100644 --- a/examples/storage/partition_api/partition_ops/pytest_partition_ops_example.py +++ b/examples/storage/partition_api/partition_ops/pytest_partition_ops_example.py @@ -1,6 +1,5 @@ # SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD # SPDX-License-Identifier: Unlicense OR CC0-1.0 - import re import pytest @@ -9,6 +8,7 @@ from pytest_embedded import Dut @pytest.mark.esp32 @pytest.mark.esp32c3 +@pytest.mark.generic def test_partition_ops_example(dut: Dut) -> None: # ESP_ERROR_CHECK or assert will cause abort on error and "Example end" won't be received message_list = (rb'Written data: ESP-IDF Partition Operations Example \(Read, Erase, Write\)', diff --git a/examples/storage/parttool/pytest_parttool_example.py b/examples/storage/parttool/pytest_parttool_example.py index 8411418ab5..82dcebd29c 100644 --- a/examples/storage/parttool/pytest_parttool_example.py +++ b/examples/storage/parttool/pytest_parttool_example.py @@ -1,6 +1,5 @@ # SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD # SPDX-License-Identifier: Unlicense OR CC0-1.0 - import os import subprocess import sys @@ -10,6 +9,7 @@ from pytest_embedded import Dut @pytest.mark.esp32 +@pytest.mark.generic def test_examples_parttool(dut: Dut) -> None: # Verify factory firmware dut.expect('Partitions Tool Example') diff --git a/examples/storage/spiffs/pytest_spiffs_example.py b/examples/storage/spiffs/pytest_spiffs_example.py index 70e1540ecd..19d8dcfe52 100644 --- a/examples/storage/spiffs/pytest_spiffs_example.py +++ b/examples/storage/spiffs/pytest_spiffs_example.py @@ -1,6 +1,5 @@ # SPDX-FileCopyrightText: 2022 Espressif Systems (Shanghai) CO LTD # SPDX-License-Identifier: Unlicense OR CC0-1.0 - import re import pytest @@ -9,6 +8,7 @@ from pytest_embedded import Dut @pytest.mark.esp32 @pytest.mark.esp32c3 +@pytest.mark.generic def test_examples_spiffs(dut: Dut) -> None: message_list = (rb'example: Initializing SPIFFS', rb'example: Partition size: total: \d+, used: \d+', diff --git a/examples/storage/spiffsgen/pytest_spiffsgen_example.py b/examples/storage/spiffsgen/pytest_spiffsgen_example.py index 75f2a9ad31..6b6e4fa243 100644 --- a/examples/storage/spiffsgen/pytest_spiffsgen_example.py +++ b/examples/storage/spiffsgen/pytest_spiffsgen_example.py @@ -1,6 +1,5 @@ # SPDX-FileCopyrightText: 2022 Espressif Systems (Shanghai) CO LTD # SPDX-License-Identifier: Unlicense OR CC0-1.0 - import hashlib import os @@ -9,6 +8,7 @@ from pytest_embedded import Dut @pytest.mark.esp32 +@pytest.mark.generic def test_spiffsgen_example(dut: Dut) -> None: # Test with default build configurations base_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'spiffs_image') diff --git a/tools/ci/dynamic_pipelines/templates/known_generate_test_child_pipeline_warnings.yml b/tools/ci/dynamic_pipelines/templates/known_generate_test_child_pipeline_warnings.yml index 22959f012c..42b222e243 100644 --- a/tools/ci/dynamic_pipelines/templates/known_generate_test_child_pipeline_warnings.yml +++ b/tools/ci/dynamic_pipelines/templates/known_generate_test_child_pipeline_warnings.yml @@ -1,39 +1,14 @@ no_env_marker_test_cases: - - components/fatfs/test_apps/flash_ro/pytest_fatfs_flash_ro.py::test_fatfs_flash_ro - - components/fatfs/test_apps/flash_wl/pytest_fatfs_flash_wl.py::test_fatfs_flash_wl_generic[default] - - components/fatfs/test_apps/flash_wl/pytest_fatfs_flash_wl.py::test_fatfs_flash_wl_generic[fastseek] - - components/fatfs/test_apps/flash_wl/pytest_fatfs_flash_wl.py::test_fatfs_flash_wl_generic[release] - components/nvs_flash/test_apps/pytest_nvs_flash.py::test_nvs_flash[default] - - components/pthread/test_apps/pthread_psram_tests/pytest_pthread_psram_tests.py::test_pthread_psram - 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/protocols/http_server/file_serving/pytest_http_server_file_serving.py::test_examples_protocol_http_server_file_serving[spiffs] - - examples/storage/fatfsgen/pytest_fatfsgen_example.py::test_examples_fatfsgen[test_read_only_partition_gen] - - examples/storage/fatfsgen/pytest_fatfsgen_example.py::test_examples_fatfsgen[test_read_only_partition_gen_default_dt] - - examples/storage/fatfsgen/pytest_fatfsgen_example.py::test_examples_fatfsgen[test_read_only_partition_gen_ln] - - examples/storage/fatfsgen/pytest_fatfsgen_example.py::test_examples_fatfsgen[test_read_only_partition_gen_ln_default_dt] - - examples/storage/fatfsgen/pytest_fatfsgen_example.py::test_examples_fatfsgen[test_read_write_partition_gen] - - examples/storage/fatfsgen/pytest_fatfsgen_example.py::test_examples_fatfsgen[test_read_write_partition_gen_default_dt] - - examples/storage/fatfsgen/pytest_fatfsgen_example.py::test_examples_fatfsgen[test_read_write_partition_gen_ln] - - examples/storage/fatfsgen/pytest_fatfsgen_example.py::test_examples_fatfsgen[test_read_write_partition_gen_ln_default_dt] - 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/nvsgen/pytest_nvsgen_example.py::test_nvsgen_example - - examples/storage/partition_api/partition_find/pytest_partition_find_example.py::test_partition_find_example - - examples/storage/partition_api/partition_mmap/pytest_partition_mmap_example.py::test_partition_mmap_example - - examples/storage/partition_api/partition_ops/pytest_partition_ops_example.py::test_partition_ops_example - - examples/storage/parttool/pytest_parttool_example.py::test_examples_parttool - - examples/storage/spiffs/pytest_spiffs_example.py::test_examples_spiffs - - examples/storage/spiffsgen/pytest_spiffsgen_example.py::test_spiffsgen_example - examples/storage/wear_levelling/pytest_wear_levelling_example.py::test_wear_levelling_example - - tools/test_apps/system/panic/pytest_panic.py::test_gdbstub_coredump[gdbstub_coredump] - - tools/test_apps/system/panic/pytest_panic.py::test_panic_delay[panic_delay] no_runner_tags: - esp32,ip101 - - esp32,psram,quad_psram - - esp32,quad_psram - esp32c2,jtag,xtal_40mhz - esp32c3,flash_multi - esp32c3,sdcard_sdmode diff --git a/tools/test_apps/system/panic/pytest_panic.py b/tools/test_apps/system/panic/pytest_panic.py index 7a17eb1bea..1a864df1be 100644 --- a/tools/test_apps/system/panic/pytest_panic.py +++ b/tools/test_apps/system/panic/pytest_panic.py @@ -55,7 +55,9 @@ TARGETS_DUAL_CORE_NAMES = [x.mark.name for x in TARGETS_DUAL_CORE] # The tests which panic on external stack require PSRAM capable runners CONFIGS_EXTRAM_STACK = [ - pytest.param('coredump_extram_stack', marks=[pytest.mark.esp32, pytest.mark.esp32s2, pytest.mark.psram, pytest.mark.esp32s3, pytest.mark.quad_psram]) + pytest.param('coredump_extram_stack', marks=[pytest.mark.esp32, pytest.mark.psram]), + pytest.param('coredump_extram_stack', marks=[pytest.mark.esp32s2, pytest.mark.generic]), + pytest.param('coredump_extram_stack', marks=[pytest.mark.esp32s3, pytest.mark.quad_psram]), ] TARGETS_HW_STACK_GUARD = [ @@ -517,6 +519,7 @@ def test_assert_cache_disabled( @pytest.mark.esp32 +@pytest.mark.generic @pytest.mark.parametrize('config', ['panic_delay'], indirect=True) def test_panic_delay(dut: PanicTestDut) -> None: dut.run_test_func('test_storeprohibited') @@ -831,6 +834,7 @@ def test_drom_reg_execute_violation(dut: PanicTestDut, test_func_name: str) -> N @pytest.mark.esp32 +@pytest.mark.generic @pytest.mark.parametrize('config', ['gdbstub_coredump'], indirect=True) def test_gdbstub_coredump(dut: PanicTestDut) -> None: test_func_name = 'test_storeprohibited'