From 0070b687b5574ce3ec51a734aa9d8fc23ce76cd2 Mon Sep 17 00:00:00 2001 From: Evgeny Torbin Date: Mon, 2 Mar 2026 14:17:13 +0100 Subject: [PATCH] ci: remove unused test cases --- .../memory_release/pytest_memory_release.py | 2 - .../esp-tls/test_apps/pytest_esp-tls.py | 11 -- .../esp_eth/test_apps/pytest_esp_eth.py | 113 +----------------- .../test_apps/crypto/pytest_crypto.py | 56 +-------- .../sleep_retention/pytest_retention.py | 15 --- .../esp_wifi/test_apps/.build-test-rules.yml | 2 + .../pytest_wifi_nvs_connect.py | 13 +- .../flash_wl/pytest_fatfs_flash_wl.py | 15 +-- .../test_apps/sdcard/pytest_fatfs_sdcard.py | 29 +---- .../test_apps/freertos/pytest_freertos.py | 3 - components/lwip/test_apps/pytest_lwip.py | 11 -- .../spiffs/test_apps/.build-test-rules.yml | 2 +- components/spiffs/test_apps/pytest_spiffs.py | 15 +-- .../vfs/test_apps/.build-test-rules.yml | 2 +- components/vfs/test_apps/pytest_vfs.py | 28 +---- .../efuse/pytest_system_efuse_example.py | 37 ++---- .../partitions_ota/pytest_partitions_ota.py | 29 +++-- .../pytest_wifi_getting_started.py | 32 +---- .../pytest_ld_non_contiguous_memory.py | 1 - .../test_apps/security/.build-test-rules.yml | 2 +- .../signed_app_no_secure_boot/README.md | 4 +- .../pytest_signed_app_no_secure_boot.py | 11 +- tools/test_apps/system/panic/pytest_panic.py | 23 +--- 23 files changed, 43 insertions(+), 413 deletions(-) delete mode 100644 components/esp-tls/test_apps/pytest_esp-tls.py delete mode 100644 components/esp_hw_support/test_apps/sleep_retention/pytest_retention.py delete mode 100644 components/lwip/test_apps/pytest_lwip.py diff --git a/components/bt/test_apps/memory_release/pytest_memory_release.py b/components/bt/test_apps/memory_release/pytest_memory_release.py index d5d70fcd2b0..68b023f6f69 100644 --- a/components/bt/test_apps/memory_release/pytest_memory_release.py +++ b/components/bt/test_apps/memory_release/pytest_memory_release.py @@ -8,8 +8,6 @@ from pytest_embedded_idf.utils import idf_parametrize @idf_parametrize( 'config,target,markers', [ - ('default', 'esp32', (pytest.mark.generic,)), - ('default', 'esp32c2', (pytest.mark.generic,)), ('iram', 'esp32c2', (pytest.mark.generic,)), ('psram', 'esp32', (pytest.mark.psram,)), ], diff --git a/components/esp-tls/test_apps/pytest_esp-tls.py b/components/esp-tls/test_apps/pytest_esp-tls.py deleted file mode 100644 index 553912ef8b3..00000000000 --- a/components/esp-tls/test_apps/pytest_esp-tls.py +++ /dev/null @@ -1,11 +0,0 @@ -# SPDX-FileCopyrightText: 2021-2025 Espressif Systems (Shanghai) CO LTD -# SPDX-License-Identifier: Apache-2.0 -import pytest -from pytest_embedded import Dut -from pytest_embedded_idf.utils import idf_parametrize - - -@pytest.mark.generic -@idf_parametrize('target', ['supported_targets'], indirect=['target']) -def test_esp_tls(dut: Dut) -> None: - dut.run_all_single_board_cases() diff --git a/components/esp_eth/test_apps/pytest_esp_eth.py b/components/esp_eth/test_apps/pytest_esp_eth.py index db9449d21b5..155ead501d5 100644 --- a/components/esp_eth/test_apps/pytest_esp_eth.py +++ b/components/esp_eth/test_apps/pytest_esp_eth.py @@ -1,4 +1,4 @@ -# SPDX-FileCopyrightText: 2022-2025 Espressif Systems (Shanghai) CO LTD +# SPDX-FileCopyrightText: 2022-2026 Espressif Systems (Shanghai) CO LTD # SPDX-License-Identifier: CC0-1.0 import contextlib import logging @@ -345,117 +345,6 @@ def test_esp_eth_lan8720(dut: IdfDut) -> None: ethernet_l2_test(dut) -# ----------- RTL8201 ----------- -@pytest.mark.temp_skip_ci(targets=['esp32'], reason='IDF-14124') -@pytest.mark.eth_rtl8201 -@pytest.mark.parametrize( - 'config', - [ - 'default_rtl8201', - ], - indirect=True, -) -@idf_parametrize('target', ['esp32'], indirect=['target']) -def test_esp_eth_rtl8201(dut: IdfDut) -> None: - ethernet_test(dut) - dut.serial.hard_reset() - ethernet_l2_test(dut) - - -# ----------- KSZ8041 ----------- -@pytest.mark.temp_skip_ci(targets=['esp32'], reason='IDF-14124') -@pytest.mark.eth_ksz8041 -@pytest.mark.parametrize( - 'config', - [ - 'default_ksz8041', - ], - indirect=True, -) -@idf_parametrize('target', ['esp32'], indirect=['target']) -def test_esp_eth_ksz8041(dut: IdfDut) -> None: - ethernet_test(dut) - dut.serial.hard_reset() - ethernet_l2_test(dut) - - -# ----------- DP83848 ----------- -@pytest.mark.temp_skip_ci(targets=['esp32'], reason='IDF-14124') -@pytest.mark.eth_dp83848 -@pytest.mark.parametrize( - 'config', - [ - 'default_dp83848', - ], - indirect=True, -) -@idf_parametrize('target', ['esp32'], indirect=['target']) -def test_esp_eth_dp83848(dut: IdfDut) -> None: - ethernet_test(dut) - dut.serial.hard_reset() - ethernet_l2_test(dut) - - -# ----------- W5500 ----------- -@pytest.mark.temp_skip_ci(targets=['esp32'], reason='IDF-14124') -@pytest.mark.eth_w5500 -@pytest.mark.parametrize( - 'config', - [ - 'default_w5500', - 'poll_w5500', - ], - indirect=True, -) -@idf_parametrize('target', ['esp32'], indirect=['target']) -def test_esp_eth_w5500(dut: IdfDut) -> None: - ethernet_test(dut) - dut.serial.hard_reset() - ethernet_l2_test(dut) - dut.serial.hard_reset() - ethernet_heap_alloc_test(dut) - - -# ----------- KSZ8851SNL ----------- -@pytest.mark.temp_skip_ci(targets=['esp32'], reason='IDF-14124') -@pytest.mark.eth_ksz8851snl -@pytest.mark.parametrize( - 'config', - [ - 'default_ksz8851snl', - 'poll_ksz8851snl', - ], - indirect=True, -) -@idf_parametrize('target', ['esp32'], indirect=['target']) -def test_esp_eth_ksz8851snl(dut: IdfDut) -> None: - ethernet_test(dut) - dut.serial.hard_reset() - ethernet_l2_test(dut) - dut.serial.hard_reset() - ethernet_heap_alloc_test(dut) - - -# ----------- DM9051 ----------- -@pytest.mark.temp_skip_ci(targets=['esp32'], reason='IDF-14124') -@pytest.mark.eth_dm9051 -@pytest.mark.parametrize( - 'config', - [ - 'default_dm9051', - 'poll_dm9051', - ], - indirect=True, -) -@idf_parametrize('target', ['esp32'], indirect=['target']) -def test_esp_eth_dm9051(dut: IdfDut) -> None: - ethernet_test(dut) - dut.serial.hard_reset() - ethernet_l2_test(dut) - dut.serial.hard_reset() - ethernet_heap_alloc_test(dut) - - # ----------- EMAC Sleep Retention ----------- @pytest.mark.eth_ip101 @pytest.mark.parametrize( diff --git a/components/esp_hal_security/test_apps/crypto/pytest_crypto.py b/components/esp_hal_security/test_apps/crypto/pytest_crypto.py index edcedc83392..82b9feb069e 100644 --- a/components/esp_hal_security/test_apps/crypto/pytest_crypto.py +++ b/components/esp_hal_security/test_apps/crypto/pytest_crypto.py @@ -1,4 +1,4 @@ -# SPDX-FileCopyrightText: 2024-2025 Espressif Systems (Shanghai) CO LTD +# SPDX-FileCopyrightText: 2024-2026 Espressif Systems (Shanghai) CO LTD # SPDX-License-Identifier: CC0-1.0 import binascii import os @@ -109,60 +109,6 @@ def test_ecdsa_key( raise -@pytest.mark.generic -@idf_parametrize('target', ['supported_targets'], indirect=['target']) -def test_crypto(dut: Dut) -> None: - # if the env variable IDF_FPGA_ENV is set, we would need a longer timeout - # as tests for efuses burning security peripherals would be run - timeout = 600 if os.environ.get('IDF_ENV_FPGA') else 60 - # only expect key manager result if it is supported for the SoC - if dut.app.sdkconfig.get('SOC_KEY_MANAGER_SUPPORTED'): - print('Key Manager is supported') - - # Test for ECDH0 deployment XTS-AES-128 key - dut.expect('Key Manager ECDH0 deployment: XTS_AES_128 key', timeout=timeout) - k2_G = dut.expect(r'K2_G: 0x([0-9a-fA-F]+)', timeout=timeout)[1].decode() - plaintext_data = dut.expect(r'Plaintext data: 0x([0-9a-fA-F]+)', timeout=timeout)[1] - plaintext_data = binascii.unhexlify(plaintext_data) - encrypted_data = dut.expect(r'Encrypted data: 0x([0-9a-fA-F]+)', timeout=timeout)[1].decode() - encrypted_data = binascii.unhexlify(encrypted_data) - negotiated_key = calculate_key_manager_ecdh0_negotiated_key(k2_G, 'main/key_manager/k1_ecdsa.pem') - test_xts_aes_encryption(negotiated_key, plaintext_data, encrypted_data) - - # Test for ECDH0 deployment XTS-AES-256 key - dut.expect('Key Manager ECDH0 deployment: XTS_AES_256 key', timeout=timeout) - k2_G_0 = dut.expect(r'K2_G_0: 0x([0-9a-fA-F]+)', timeout=timeout)[1].decode() - k2_G_1 = dut.expect(r'K2_G_1: 0x([0-9a-fA-F]+)', timeout=timeout)[1].decode() - encrypted_data = dut.expect(r'Encrypted data: 0x([0-9a-fA-F]+)', timeout=timeout)[1].decode() - encrypted_data = binascii.unhexlify(encrypted_data) - negotiated_key_0 = calculate_key_manager_ecdh0_negotiated_key(k2_G_0, 'main/key_manager/k1_ecdsa.pem') - negotiated_key_1 = calculate_key_manager_ecdh0_negotiated_key(k2_G_1, 'main/key_manager/k1_ecdsa.pem') - negotiated_key = negotiated_key_0 + negotiated_key_1 - test_xts_aes_encryption(negotiated_key, plaintext_data, encrypted_data) - # Test for ECDH0 deployment ECDSA-256 key - dut.expect('Key Manager ECDH0 deployment: ECDSA_256 key', timeout=timeout) - k2_G = dut.expect(r'K2_G: 0x([0-9a-fA-F]+)', timeout=timeout)[1].decode() - digest = dut.expect(r'ECDSA message sha256 digest: 0x([0-9a-fA-F]+)', timeout=timeout)[1].decode() - digest = binascii.unhexlify(digest) - signature_r_le = dut.expect(r'ECDSA signature r_le: 0x([0-9a-fA-F]+)', timeout=timeout)[1].decode() - signature_r_le = binascii.unhexlify(signature_r_le) - signature_s_le = dut.expect(r'ECDSA signature s_le: 0x([0-9a-fA-F]+)', timeout=timeout)[1].decode() - signature_s_le = binascii.unhexlify(signature_s_le) - pub_x = dut.expect(r'ECDSA key pubx: 0x([0-9a-fA-F]+)', timeout=timeout)[1].decode() - pub_x = binascii.unhexlify(pub_x) - pub_y = dut.expect(r'ECDSA key puby: 0x([0-9a-fA-F]+)', timeout=timeout)[1].decode() - pub_y = binascii.unhexlify(pub_y) - negotiated_key = calculate_key_manager_ecdh0_negotiated_key(k2_G, 'main/key_manager/k1_ecdsa.pem') - test_ecdsa_key(negotiated_key, digest, signature_r_le, signature_s_le, pub_x, pub_y) - - test_numbers = dut.expect(r'(\d+) Tests (\d+) Failures (\d+) Ignored', timeout=timeout) - failures = test_numbers.group(2).decode() - ignored = test_numbers.group(3).decode() - assert failures == '0', f'No of failures must be 0 (is {failures})' - assert ignored == '0', f'No of Ignored test must be 0 (is {ignored})' - dut.expect('Tests finished', timeout=timeout) - - @pytest.mark.generic @pytest.mark.parametrize('config', ['long_aes_operations'], indirect=True) @idf_parametrize('target', ['supported_targets'], indirect=['target']) diff --git a/components/esp_hw_support/test_apps/sleep_retention/pytest_retention.py b/components/esp_hw_support/test_apps/sleep_retention/pytest_retention.py deleted file mode 100644 index b515a68d39f..00000000000 --- a/components/esp_hw_support/test_apps/sleep_retention/pytest_retention.py +++ /dev/null @@ -1,15 +0,0 @@ -# SPDX-FileCopyrightText: 2022-2025 Espressif Systems (Shanghai) CO LTD -# SPDX-License-Identifier: CC0-1.0 -import pytest -from pytest_embedded import Dut -from pytest_embedded_idf.utils import idf_parametrize - - -# SOC_PAU_SUPPORTED == 1 -retention_targets = ['esp32c6', 'esp32h2', 'esp32p4', 'esp32c5', 'esp32c61'] - - -@pytest.mark.generic -@idf_parametrize('target', ['esp32c61', 'esp32c5', 'esp32p4', 'esp32h2', 'esp32c6'], indirect=['target']) -def test_sleep_retention(dut: Dut) -> None: - dut.run_all_single_board_cases() diff --git a/components/esp_wifi/test_apps/.build-test-rules.yml b/components/esp_wifi/test_apps/.build-test-rules.yml index 5dca73c51ed..625d1bcfeb6 100644 --- a/components/esp_wifi/test_apps/.build-test-rules.yml +++ b/components/esp_wifi/test_apps/.build-test-rules.yml @@ -7,3 +7,5 @@ components/esp_wifi/test_apps/: components/esp_wifi/test_apps/wifi_nvs_config: disable: - if: SOC_WIFI_SUPPORTED != 1 + disable_test: + - if: IDF_TARGET != "esp32c2" diff --git a/components/esp_wifi/test_apps/wifi_nvs_config/pytest_wifi_nvs_connect.py b/components/esp_wifi/test_apps/wifi_nvs_config/pytest_wifi_nvs_connect.py index 9756f9fa339..a9b7bf9b668 100644 --- a/components/esp_wifi/test_apps/wifi_nvs_config/pytest_wifi_nvs_connect.py +++ b/components/esp_wifi/test_apps/wifi_nvs_config/pytest_wifi_nvs_connect.py @@ -1,21 +1,10 @@ -# SPDX-FileCopyrightText: 2025 Espressif Systems (Shanghai) CO LTD +# SPDX-FileCopyrightText: 2025-2026 Espressif Systems (Shanghai) CO LTD # SPDX-License-Identifier: Unlicense OR CC0-1.0 import pytest from pytest_embedded_idf.unity_tester import CaseTester from pytest_embedded_idf.utils import idf_parametrize -@pytest.mark.two_duts -@pytest.mark.parametrize('count', [2], indirect=True) -@idf_parametrize( - 'target', - ['esp32', 'esp32c3', 'esp32c5', 'esp32c6', 'esp32c61', 'esp32s2', 'esp32s3'], - indirect=['target'], -) -def test_wifi_nvs_connect_cases(case_tester: CaseTester) -> None: # type: ignore - case_tester.run_all_cases() - - @pytest.mark.two_duts @pytest.mark.xtal_26mhz @pytest.mark.parametrize( 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 a9863635bfe..0ffcc3a16ce 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,4 +1,4 @@ -# SPDX-FileCopyrightText: 2022-2025 Espressif Systems (Shanghai) CO LTD +# SPDX-FileCopyrightText: 2022-2026 Espressif Systems (Shanghai) CO LTD # SPDX-License-Identifier: CC0-1.0 import pytest from pytest_embedded import Dut @@ -19,16 +19,3 @@ from pytest_embedded_idf.utils import idf_parametrize @idf_parametrize('target', ['esp32', 'esp32c3'], indirect=['target']) def test_fatfs_flash_wl_generic(dut: Dut) -> None: dut.run_all_single_board_cases(timeout=240) - - -@pytest.mark.generic -@pytest.mark.psram -@pytest.mark.parametrize( - 'config', - [ - 'psram', - ], -) -@idf_parametrize('target', ['esp32'], indirect=['target']) -def test_fatfs_flash_wl_psram(dut: Dut) -> None: - dut.run_all_single_board_cases(timeout=180) diff --git a/components/fatfs/test_apps/sdcard/pytest_fatfs_sdcard.py b/components/fatfs/test_apps/sdcard/pytest_fatfs_sdcard.py index b0657186d2d..5bdecf6208e 100644 --- a/components/fatfs/test_apps/sdcard/pytest_fatfs_sdcard.py +++ b/components/fatfs/test_apps/sdcard/pytest_fatfs_sdcard.py @@ -1,4 +1,4 @@ -# SPDX-FileCopyrightText: 2022-2025 Espressif Systems (Shanghai) CO LTD +# SPDX-FileCopyrightText: 2022-2026 Espressif Systems (Shanghai) CO LTD # SPDX-License-Identifier: CC0-1.0 import pytest from pytest_embedded import Dut @@ -30,30 +30,3 @@ def test_fatfs_sdcard_generic_sdmmc(dut: Dut) -> None: @idf_parametrize('target', ['esp32', 'esp32c3'], indirect=['target']) def test_fatfs_sdcard_generic_sdspi(dut: Dut) -> None: dut.run_all_single_board_cases(group='sdspi', timeout=180) - - -@pytest.mark.sdcard_sdmode -@pytest.mark.psram -@pytest.mark.parametrize( - 'config', - [ - 'psram', - ], -) -@idf_parametrize('target', ['esp32'], indirect=['target']) -def test_fatfs_sdcard_psram_sdmmc(dut: Dut) -> None: - dut.run_all_single_board_cases(group='sdmmc', timeout=180) - - -@pytest.mark.temp_skip_ci(targets=['esp32'], reason='IDFCI-2058, temporary lack runner') -@pytest.mark.sdcard_spimode -@pytest.mark.psram -@pytest.mark.parametrize( - 'config', - [ - 'psram', - ], -) -@idf_parametrize('target', ['esp32'], indirect=['target']) -def test_fatfs_sdcard_psram_sdspi(dut: Dut) -> None: - dut.run_all_single_board_cases(group='sdspi', timeout=180) diff --git a/components/freertos/test_apps/freertos/pytest_freertos.py b/components/freertos/test_apps/freertos/pytest_freertos.py index 81ba1681225..69b7207a7f0 100644 --- a/components/freertos/test_apps/freertos/pytest_freertos.py +++ b/components/freertos/test_apps/freertos/pytest_freertos.py @@ -13,9 +13,6 @@ from pytest_embedded_idf.utils import idf_parametrize ('freertos_options', 'supported_targets'), ('tickless_idle', 'supported_targets'), ('psram', 'esp32'), - ('psram', 'esp32c5'), - ('psram', 'esp32p4'), - ('psram', 'esp32s3'), ('single_core', 'esp32'), # TODO: [ESP32C5] IDF-10335 # TODO: [ESP32C61] IDF-11146 diff --git a/components/lwip/test_apps/pytest_lwip.py b/components/lwip/test_apps/pytest_lwip.py deleted file mode 100644 index 962dbd794b8..00000000000 --- a/components/lwip/test_apps/pytest_lwip.py +++ /dev/null @@ -1,11 +0,0 @@ -# SPDX-FileCopyrightText: 2022-2025 Espressif Systems (Shanghai) CO LTD -# SPDX-License-Identifier: Apache-2.0 -import pytest -from pytest_embedded import Dut -from pytest_embedded_idf.utils import idf_parametrize - - -@pytest.mark.generic -@idf_parametrize('target', ['esp32'], indirect=['target']) -def test_lwip(dut: Dut) -> None: - dut.expect_unity_test_output() diff --git a/components/spiffs/test_apps/.build-test-rules.yml b/components/spiffs/test_apps/.build-test-rules.yml index f3bf52966ab..45824d892d0 100644 --- a/components/spiffs/test_apps/.build-test-rules.yml +++ b/components/spiffs/test_apps/.build-test-rules.yml @@ -1,6 +1,6 @@ components/spiffs/test_apps: disable_test: - - if: IDF_TARGET not in ["esp32", "esp32c3", "esp32s3"] + - if: IDF_TARGET not in ["esp32", "esp32c3"] reason: These chips should be sufficient for test coverage (Xtensa and RISC-V, single and dual core) depends_components: diff --git a/components/spiffs/test_apps/pytest_spiffs.py b/components/spiffs/test_apps/pytest_spiffs.py index 318e0d9f837..f0743781132 100644 --- a/components/spiffs/test_apps/pytest_spiffs.py +++ b/components/spiffs/test_apps/pytest_spiffs.py @@ -1,4 +1,4 @@ -# SPDX-FileCopyrightText: 2022-2025 Espressif Systems (Shanghai) CO LTD +# SPDX-FileCopyrightText: 2022-2026 Espressif Systems (Shanghai) CO LTD # SPDX-License-Identifier: CC0-1.0 import pytest from pytest_embedded import Dut @@ -17,16 +17,3 @@ from pytest_embedded_idf.utils import idf_parametrize @idf_parametrize('target', ['esp32', 'esp32c3'], indirect=['target']) def test_spiffs_generic(dut: Dut) -> None: dut.run_all_single_board_cases(timeout=120) - - -@pytest.mark.quad_psram -@pytest.mark.parametrize( - 'config', - [ - 'psram', - ], - indirect=True, -) -@idf_parametrize('target', ['esp32s3'], indirect=['target']) -def test_spiffs_psram(dut: Dut) -> None: - dut.run_all_single_board_cases(timeout=120) diff --git a/components/vfs/test_apps/.build-test-rules.yml b/components/vfs/test_apps/.build-test-rules.yml index 3d275138511..cd6e9474833 100644 --- a/components/vfs/test_apps/.build-test-rules.yml +++ b/components/vfs/test_apps/.build-test-rules.yml @@ -5,7 +5,7 @@ components/vfs/test_apps: reason: not support yet # TODO: [esp32h21] IDF-11593 [ESP32H4] IDF-12372 disable_test: - - if: IDF_TARGET not in ["esp32", "esp32c2", "esp32c3", "esp32c6", "esp32h2", "esp32s3"] + - if: IDF_TARGET not in ["esp32c2", "esp32c3", "esp32c6", "esp32h2"] temporary: true reason: lack of runners diff --git a/components/vfs/test_apps/pytest_vfs.py b/components/vfs/test_apps/pytest_vfs.py index 038e405e297..1220b7d6764 100644 --- a/components/vfs/test_apps/pytest_vfs.py +++ b/components/vfs/test_apps/pytest_vfs.py @@ -1,4 +1,4 @@ -# SPDX-FileCopyrightText: 2023-2025 Espressif Systems (Shanghai) CO LTD +# SPDX-FileCopyrightText: 2023-2026 Espressif Systems (Shanghai) CO LTD # SPDX-License-Identifier: CC0-1.0 import pytest from pytest_embedded import Dut @@ -17,29 +17,3 @@ from pytest_embedded_idf.utils import idf_parametrize @idf_parametrize('target', ['esp32c2', 'esp32c3', 'esp32c6', 'esp32h2'], indirect=['target']) def test_vfs_default(dut: Dut) -> None: dut.run_all_single_board_cases() - - -@pytest.mark.generic -@pytest.mark.parametrize( - 'config', - [ - 'ccomp', - ], - indirect=True, -) -@idf_parametrize('target', ['esp32'], indirect=['target']) -def test_vfs_ccomp(dut: Dut) -> None: - dut.run_all_single_board_cases() - - -@pytest.mark.quad_psram -@pytest.mark.parametrize( - 'config', - [ - 'psram', - ], - indirect=True, -) -@idf_parametrize('target', ['esp32s3'], indirect=['target']) -def test_vfs_psram(dut: Dut) -> None: - dut.run_all_single_board_cases() diff --git a/examples/system/efuse/pytest_system_efuse_example.py b/examples/system/efuse/pytest_system_efuse_example.py index 7e0df3cfd75..d3e99f6e27c 100644 --- a/examples/system/efuse/pytest_system_efuse_example.py +++ b/examples/system/efuse/pytest_system_efuse_example.py @@ -1,4 +1,4 @@ -# SPDX-FileCopyrightText: 2022-2025 Espressif Systems (Shanghai) CO LTD +# SPDX-FileCopyrightText: 2022-2026 Espressif Systems (Shanghai) CO LTD # SPDX-License-Identifier: Unlicense OR CC0-1.0 import logging import os @@ -6,7 +6,6 @@ import os import pytest from pytest_embedded import Dut from pytest_embedded_idf.utils import idf_parametrize -from pytest_embedded_idf.utils import soc_filtered_targets from pytest_embedded_qemu.dut import QemuDut @@ -68,7 +67,7 @@ def test_examples_efuse_with_virt_flash_enc(dut: Dut) -> None: # check and log bin size binary_file = os.path.join(dut.app.binary_path, 'bootloader', 'bootloader.bin') bin_size = os.path.getsize(binary_file) - logging.info('{}_bootloader_virt_flash_enc_bin_size: {}KB'.format(dut.app.target, bin_size // 1024)) + logging.info(f'{dut.app.target}_bootloader_virt_flash_enc_bin_size: {bin_size // 1024}KB') print(' - Erase flash') dut.serial.erase_flash() @@ -127,7 +126,7 @@ def test_examples_efuse_with_virt_flash_enc_aes_256(dut: Dut) -> None: # check and log bin size binary_file = os.path.join(dut.app.binary_path, 'bootloader', 'bootloader.bin') bin_size = os.path.getsize(binary_file) - logging.info('{}_bootloader_virt_flash_enc_aes_256_bin_size: {}KB'.format(dut.app.target, bin_size // 1024)) + logging.info(f'{dut.app.target}_bootloader_virt_flash_enc_aes_256_bin_size: {bin_size // 1024}KB') print(' - Erase flash') dut.serial.erase_flash() @@ -247,7 +246,7 @@ def test_examples_efuse_with_virt_flash_enc_release(dut: Dut) -> None: # check and log bin size binary_file = os.path.join(dut.app.binary_path, 'bootloader', 'bootloader.bin') bin_size = os.path.getsize(binary_file) - logging.info('{}_bootloader_virt_flash_enc_release_bin_size: {}KB'.format(dut.app.target, bin_size // 1024)) + logging.info(f'{dut.app.target}_bootloader_virt_flash_enc_release_bin_size: {bin_size // 1024}KB') dut.serial.erase_flash() @@ -303,7 +302,7 @@ def test_examples_efuse_with_virt_secure_boot_v1(dut: Dut) -> None: # check and log bin size binary_file = os.path.join(dut.app.binary_path, 'bootloader', 'bootloader.bin') bin_size = os.path.getsize(binary_file) - logging.info('{}_bootloader_virt_secure_boot_v1_bin_size: {}KB'.format(dut.app.target, bin_size // 1024)) + logging.info(f'{dut.app.target}_bootloader_virt_secure_boot_v1_bin_size: {bin_size // 1024}KB') print(' - Erase flash') dut.serial.erase_flash() @@ -415,7 +414,7 @@ def test_examples_efuse_with_virt_secure_boot_v2(dut: Dut) -> None: # only for ESP32 ECO3 binary_file = os.path.join(dut.app.binary_path, 'bootloader', 'bootloader.bin') bin_size = os.path.getsize(binary_file) - logging.info('{}_bootloader_secure_boot_v2_bin_size: {}KB'.format(dut.app.target, bin_size // 1024)) + logging.info(f'{dut.app.target}_bootloader_secure_boot_v2_bin_size: {bin_size // 1024}KB') print(' - Erase flash') dut.serial.erase_flash() @@ -593,7 +592,7 @@ def example_efuse_with_virt_secure_boot_v2_esp32xx(dut: Dut) -> None: # check and log bin size binary_file = os.path.join(dut.app.binary_path, 'bootloader', 'bootloader.bin') bin_size = os.path.getsize(binary_file) - logging.info('{}_bootloader_virt_secure_boot_v2_bin_size: {}KB'.format(dut.app.target, bin_size // 1024)) + logging.info(f'{dut.app.target}_bootloader_virt_secure_boot_v2_bin_size: {bin_size // 1024}KB') print(' - Erase flash') dut.serial.erase_flash() @@ -664,14 +663,6 @@ def test_examples_efuse_with_virt_secure_boot_v2_esp32xx(dut: Dut) -> None: example_efuse_with_virt_secure_boot_v2_esp32xx(dut) -@pytest.mark.generic -@pytest.mark.parametrize('config', ['virt_secure_boot_v2_ecdsa_p384'], indirect=True) -@pytest.mark.parametrize('skip_autoflash', ['y'], indirect=True) -@idf_parametrize('target', soc_filtered_targets('SOC_ECDSA_SUPPORT_CURVE_P384 == 1'), indirect=['target']) -def test_examples_efuse_with_virt_secure_boot_v2_ecdsa_p384_esp32xx(dut: Dut) -> None: - example_efuse_with_virt_secure_boot_v2_esp32xx(dut) - - @pytest.mark.generic @pytest.mark.parametrize('config', ['virt_secure_boot_v2'], indirect=True) @pytest.mark.parametrize('skip_autoflash', ['y'], indirect=True) @@ -764,7 +755,7 @@ def test_examples_efuse_with_virt_sb_v1_and_fe(dut: Dut) -> None: # check and log bin size binary_file = os.path.join(dut.app.binary_path, 'bootloader', 'bootloader.bin') bin_size = os.path.getsize(binary_file) - logging.info('{}_bootloader_virt_sb_v1_and_fe_bin_size: {}KB'.format(dut.app.target, bin_size // 1024)) + logging.info(f'{dut.app.target}_bootloader_virt_sb_v1_and_fe_bin_size: {bin_size // 1024}KB') print(' - Erase flash') dut.serial.erase_flash() @@ -835,7 +826,7 @@ def test_examples_efuse_with_virt_sb_v2_and_fe(dut: Dut) -> None: # check and log bin size binary_file = os.path.join(dut.app.binary_path, 'bootloader', 'bootloader.bin') bin_size = os.path.getsize(binary_file) - logging.info('{}_bootloader_virt_sb_v2_and_fe_bin_size: {}KB'.format(dut.app.target, bin_size // 1024)) + logging.info(f'{dut.app.target}_bootloader_virt_sb_v2_and_fe_bin_size: {bin_size // 1024}KB') print(' - Erase flash') dut.serial.erase_flash() @@ -1003,7 +994,7 @@ def example_efuse_with_virt_sb_v2_and_fe(dut: Dut) -> None: # check and log bin size binary_file = os.path.join(dut.app.binary_path, 'bootloader', 'bootloader.bin') bin_size = os.path.getsize(binary_file) - logging.info('{}_bootloader_virt_sb_v2_and_fe_bin_size: {}KB'.format(dut.app.target, bin_size // 1024)) + logging.info(f'{dut.app.target}_bootloader_virt_sb_v2_and_fe_bin_size: {bin_size // 1024}KB') dut.serial.erase_flash() @@ -1102,11 +1093,3 @@ def example_efuse_with_virt_sb_v2_and_fe(dut: Dut) -> None: ) def test_examples_efuse_with_virt_sb_v2_and_fe_esp32xx(dut: Dut) -> None: example_efuse_with_virt_sb_v2_and_fe(dut) - - -@pytest.mark.generic -@pytest.mark.parametrize('skip_autoflash', ['y'], indirect=True) -@pytest.mark.parametrize('config', ['virt_sb_v2_ecdsa_p384_and_fe'], indirect=True) -@idf_parametrize('target', soc_filtered_targets('SOC_ECDSA_SUPPORT_CURVE_P384 == 1'), indirect=['target']) -def test_examples_efuse_with_virt_sb_v2_ecdsa_p384_and_fe_esp32xx(dut: Dut) -> None: - example_efuse_with_virt_sb_v2_and_fe(dut) diff --git a/examples/system/ota/partitions_ota/pytest_partitions_ota.py b/examples/system/ota/partitions_ota/pytest_partitions_ota.py index 0b52615901e..77a6d708434 100644 --- a/examples/system/ota/partitions_ota/pytest_partitions_ota.py +++ b/examples/system/ota/partitions_ota/pytest_partitions_ota.py @@ -1,12 +1,12 @@ -# SPDX-FileCopyrightText: 2024-2025 Espressif Systems (Shanghai) CO LTD +# SPDX-FileCopyrightText: 2024-2026 Espressif Systems (Shanghai) CO LTD # SPDX-License-Identifier: Unlicense OR CC0-1.0 import http.server +import itertools import multiprocessing import os import ssl import sys from typing import Any -from typing import Optional import pexpect import pytest @@ -77,16 +77,19 @@ server_key = ( '-----END PRIVATE KEY-----\n' ) +CONFIG_PARTITIONS_OTA = [ + ('on_update_no_sb_ecdsa', 'esp32'), + *itertools.product( + ['on_update_no_sb_rsa', 'virt_sb_v2_and_fe', 'virt_sb_v2_and_fe_2'], + ['esp32', 'esp32c3', 'esp32s3'], + ), +] + @pytest.mark.wifi_high_traffic -@pytest.mark.parametrize( - 'config', - ['on_update_no_sb_ecdsa', 'on_update_no_sb_rsa', 'virt_sb_v2_and_fe', 'virt_sb_v2_and_fe_2'], - indirect=True, -) @pytest.mark.parametrize('skip_autoflash', ['y'], indirect=True) @pytest.mark.timeout(2400) -@idf_parametrize('target', ['esp32', 'esp32c3', 'esp32s3'], indirect=['target']) +@idf_parametrize('config, target', CONFIG_PARTITIONS_OTA, indirect=['config', 'target']) def test_examples_partitions_ota(dut: Dut) -> None: print(' - Erase flash') dut.serial.erase_flash() @@ -109,7 +112,7 @@ def test_examples_partitions_ota_with_flash_encryption_wifi(dut: Dut) -> None: update_partitions(dut, 'flash_encryption_wifi_high_traffic') -def update_partitions(dut: Dut, env_name: Optional[str]) -> None: +def update_partitions(dut: Dut, env_name: str | None) -> None: port = 8000 thread1 = multiprocessing.Process(target=start_https_server, args=(dut.app.binary_path, '0.0.0.0', port)) thread1.daemon = True @@ -123,7 +126,7 @@ def update_partitions(dut: Dut, env_name: Optional[str]) -> None: thread1.terminate() -def update(dut: Dut, port: int, path_to_image: str, env_name: Optional[str]) -> None: +def update(dut: Dut, port: int, path_to_image: str, env_name: str | None) -> None: dut.expect('OTA example app_main start', timeout=90) host_ip = setting_connection(dut, env_name) dut.expect('Starting OTA example task', timeout=30) @@ -133,7 +136,7 @@ def update(dut: Dut, port: int, path_to_image: str, env_name: Optional[str]) -> dut.expect('OTA Succeed, Rebooting...', timeout=90) -def setting_connection(dut: Dut, env_name: Optional[str]) -> Any: +def setting_connection(dut: Dut, env_name: str | None) -> Any: if env_name is not None and dut.app.sdkconfig.get('EXAMPLE_WIFI_SSID_PWD_FROM_STDIN') is True: dut.expect('Please input ssid password:') ap_ssid = get_env_config_variable(env_name, 'ap_ssid') @@ -151,8 +154,8 @@ def start_https_server( ota_image_dir: str, server_ip: str, server_port: int, - server_file: Optional[str] = None, - key_file: Optional[str] = None, + server_file: str | None = None, + key_file: str | None = None, ) -> None: os.chdir(ota_image_dir) diff --git a/examples/wifi/getting_started/pytest_wifi_getting_started.py b/examples/wifi/getting_started/pytest_wifi_getting_started.py index 4f2c92075a1..985934e32d1 100644 --- a/examples/wifi/getting_started/pytest_wifi_getting_started.py +++ b/examples/wifi/getting_started/pytest_wifi_getting_started.py @@ -1,4 +1,4 @@ -# SPDX-FileCopyrightText: 2022-2025 Espressif Systems (Shanghai) CO LTD +# SPDX-FileCopyrightText: 2022-2026 Espressif Systems (Shanghai) CO LTD # SPDX-License-Identifier: CC0-1.0 import os.path @@ -112,33 +112,3 @@ def test_wifi_getting_started_esp32c2eco4_xtal_26mhz(dut: tuple[IdfDut, IdfDut]) station.expect(f'{tag}: got ip:', timeout=60) station.expect(f'{tag}: connected to ap SSID:{ssid} password:{password}', timeout=60) softap.expect('station .+ join, AID=', timeout=60) - - -@pytest.mark.two_duts -@pytest.mark.esp32c3eco7 -@pytest.mark.parametrize( - 'count, config, app_path', - [ - ( - 2, - 'esp32c3eco7', - f'{os.path.join(os.path.dirname(__file__), "softAP")}|{os.path.join(os.path.dirname(__file__), "station")}', - ), - ], - indirect=True, -) -@idf_parametrize('target', ['esp32c3'], indirect=['target']) -def test_wifi_getting_started_esp32c3eco7(dut: tuple[IdfDut, IdfDut]) -> None: - softap = dut[0] - station = dut[1] - - assert station.app.sdkconfig['ESP_WIFI_SOFTAP_SUPPORT'] is False - ssid = softap.app.sdkconfig.get('ESP_WIFI_SSID') - password = softap.app.sdkconfig.get('ESP_WIFI_PASSWORD') - assert station.app.sdkconfig.get('ESP_WIFI_SSID') == ssid - assert station.app.sdkconfig.get('ESP_WIFI_PASSWORD') == password - - tag = 'wifi station' - station.expect(f'{tag}: got ip:', timeout=60) - station.expect(f'{tag}: connected to ap SSID:{ssid} password:{password}', timeout=60) - softap.expect('station .+ join, AID=', timeout=60) diff --git a/tools/test_apps/build_system/ld_non_contiguous_memory/pytest_ld_non_contiguous_memory.py b/tools/test_apps/build_system/ld_non_contiguous_memory/pytest_ld_non_contiguous_memory.py index d7ef0b932ba..b34d43c39d2 100644 --- a/tools/test_apps/build_system/ld_non_contiguous_memory/pytest_ld_non_contiguous_memory.py +++ b/tools/test_apps/build_system/ld_non_contiguous_memory/pytest_ld_non_contiguous_memory.py @@ -6,7 +6,6 @@ from pytest_embedded_idf.utils import idf_parametrize @pytest.mark.generic -@idf_parametrize('config', ['app_in_flash'], indirect=['config']) @idf_parametrize('target', ['esp32p4'], indirect=['target']) def test_ld_non_contiguous_memory(dut: Dut) -> None: dut.expect_exact('buf2 placed in low sram') diff --git a/tools/test_apps/security/.build-test-rules.yml b/tools/test_apps/security/.build-test-rules.yml index 8ec9a97eb65..cb02072ea3c 100644 --- a/tools/test_apps/security/.build-test-rules.yml +++ b/tools/test_apps/security/.build-test-rules.yml @@ -10,6 +10,6 @@ tools/test_apps/security/secure_boot: tools/test_apps/security/signed_app_no_secure_boot: enable: - - if: IDF_TARGET in ["esp32c2", "esp32c3"] + - if: IDF_TARGET in ["esp32c3"] temporary: true reason: No need to test on all targets diff --git a/tools/test_apps/security/signed_app_no_secure_boot/README.md b/tools/test_apps/security/signed_app_no_secure_boot/README.md index 7a2105fef33..9e864b59bcf 100644 --- a/tools/test_apps/security/signed_app_no_secure_boot/README.md +++ b/tools/test_apps/security/signed_app_no_secure_boot/README.md @@ -1,5 +1,5 @@ -| Supported Targets | ESP32-C2 | ESP32-C3 | -| ----------------- | -------- | -------- | +| Supported Targets | ESP32-C3 | +| ----------------- | -------- | # Secure Signed On Update No Secure Boot diff --git a/tools/test_apps/security/signed_app_no_secure_boot/pytest_signed_app_no_secure_boot.py b/tools/test_apps/security/signed_app_no_secure_boot/pytest_signed_app_no_secure_boot.py index dedbc9b8daa..9dde2e391a5 100644 --- a/tools/test_apps/security/signed_app_no_secure_boot/pytest_signed_app_no_secure_boot.py +++ b/tools/test_apps/security/signed_app_no_secure_boot/pytest_signed_app_no_secure_boot.py @@ -1,4 +1,4 @@ -# SPDX-FileCopyrightText: 2023-2025 Espressif Systems (Shanghai) CO LTD +# SPDX-FileCopyrightText: 2023-2026 Espressif Systems (Shanghai) CO LTD # SPDX-License-Identifier: Unlicense OR CC0-1.0 import pytest @@ -6,15 +6,6 @@ from pytest_embedded import Dut from pytest_embedded_idf.utils import idf_parametrize -@pytest.mark.generic -@idf_parametrize('target', ['esp32c2', 'esp32c3'], indirect=['target']) -def test_examples_security_on_update_no_secure_boot(dut: Dut) -> None: - dut.expect( - "This app is not signed, but check signature on update is enabled in config. It won't be possible to verify any update.", # noqa : E501 - timeout=10, - ) - - @pytest.mark.host_test @pytest.mark.qemu @pytest.mark.parametrize('config', ['secure_update_with_fe'], indirect=True) diff --git a/tools/test_apps/system/panic/pytest_panic.py b/tools/test_apps/system/panic/pytest_panic.py index 01b0cf29995..82d60bd59c9 100644 --- a/tools/test_apps/system/panic/pytest_panic.py +++ b/tools/test_apps/system/panic/pytest_panic.py @@ -1,4 +1,4 @@ -# SPDX-FileCopyrightText: 2022-2025 Espressif Systems (Shanghai) CO LTD +# SPDX-FileCopyrightText: 2022-2026 Espressif Systems (Shanghai) CO LTD # SPDX-License-Identifier: CC0-1.0 import itertools import re @@ -47,13 +47,6 @@ CONFIG_PANIC = list(itertools.chain(itertools.product(['panic'], ['supported_tar CONFIG_PANIC_DUAL_CORE = list(itertools.chain(itertools.product(['panic'], TARGETS_DUAL_CORE))) CONFIG_PANIC_HALT = list(itertools.chain(itertools.product(['panic_halt'], TARGETS_ALL))) -CONFIGS_BACKTRACE = list( - itertools.chain( - # One single-core target and one dual-core target is enough - itertools.product(['framepointer'], ['esp32c3', 'esp32p4']) - ) -) - CONFIGS_DUAL_CORE = list( itertools.chain( itertools.product( @@ -1371,20 +1364,6 @@ def test_tcb_corrupted(dut: PanicTestDut, target: str, config: str, test_func_na common_test(dut, config, expected_backtrace=None, expected_coredump=coredump_pattern) -@pytest.mark.generic -@idf_parametrize('config, target', CONFIGS_BACKTRACE, indirect=['config', 'target']) -def test_panic_print_backtrace(dut: PanicTestDut, config: str, test_func_name: str) -> None: - dut.run_test_func(test_func_name) - regex_pattern = rb'abort\(\) was called at PC [0-9xa-f]+ on core 0' - dut.expect(regex_pattern) - dut.expect_backtrace() - dut.expect_elf_sha256() - dut.expect_none(['Guru Meditation', 'Re-entered core dump']) - - coredump_pattern = re.compile(PANIC_ABORT_PREFIX + regex_pattern.decode('utf-8')) - common_test(dut, config, expected_backtrace=None, expected_coredump=[coredump_pattern]) - - @pytest.mark.generic @idf_parametrize('config, target', CONFIG_PANIC_HALT, indirect=['config', 'target']) def test_panic_halt(dut: PanicTestDut) -> None: