From 152b5ccb4c60b44eb173a2f5f8050b7de84aedd5 Mon Sep 17 00:00:00 2001 From: "C.S.M" Date: Fri, 3 Apr 2026 10:58:36 +0800 Subject: [PATCH] ci(esp32s31): Add ci target test for esp32s31 --- .gitlab/ci/default-build-test-rules.yml | 1 - .../test_app_update/pytest_app_update_ut.py | 5 ++++- components/efuse/test_apps/pytest_efuse.py | 3 ++- .../test_apps/.build-test-rules.yml | 4 ++++ .../test_apps/dma/pytest_dma.py | 2 +- .../test_apps/i2c_test_apps/pytest_i2c.py | 3 ++- .../test_apps/ledc/pytest_ledc.py | 1 + .../test_apps/mcpwm/pytest_mcpwm.py | 2 +- .../test_apps/master/pytest_spi_master.py | 1 + .../test_apps/param/pytest_spi_param.py | 4 +++- .../test_apps/slave/pytest_spi_slave.py | 1 + .../test_apps/uart/pytest_uart.py | 2 ++ .../sleep_retention/pytest_retention.py | 4 +++- .../wakeup_tests/pytest_wakeup_tests.py | 7 ++++++- .../test_apps/spi_lcd/pytest_spi_lcd.py | 2 ++ .../esp_pm/test_apps/esp_pm/pytest_esp_pm.py | 3 ++- .../test_apps/rom_tests/pytest_esp_rom.py | 2 +- .../pytest_pthread_unity_tests.py | 4 +++- .../test_apps/esp_flash/pytest_esp_flash.py | 1 + .../pytest_esp_flash_stress.py | 3 ++- .../test_apps/flash_mmap/pytest_flash_mmap.py | 2 +- examples/get-started/blink/pytest_blink.py | 5 +++-- .../mcpwm_capture_hc_sr04/pytest_hc_sr04.py | 4 +++- .../pytest_servo_mg996r.py | 4 +++- .../mcpwm/mcpwm_sync/pytest_mcpwm_sync.py | 8 ++++---- .../sdm_dac/pytest_sdm_dac_example.py | 2 +- .../sdm_led/pytest_sdm_led_example.py | 2 +- .../wiegand_interface/pytest_wiegand.py | 2 +- .../pytest_perf_benchmark_example.py | 3 ++- examples/system/.build-test-rules.yml | 4 ++++ .../app_trace_basic/pytest_app_trace_basic.py | 1 + .../system/deep_sleep/pytest_deep_sleep.py | 5 +++-- examples/system/gcov/pytest_gcov.py | 1 + .../system/light_sleep/pytest_light_sleep.py | 1 + .../sysview_tracing/pytest_sysview_tracing.py | 1 + ..._generate_test_child_pipeline_warnings.yml | 1 - tools/ci/idf_pytest/constants.py | 1 + tools/test_apps/system/.build-test-rules.yml | 6 +++++- .../system/eh_frame/pytest_eh_frame.py | 10 +++++++--- tools/test_apps/system/gdb/pytest_gdb.py | 20 +++++++++++-------- tools/test_apps/system/panic/pytest_panic.py | 20 ++++++++++++++++++- 41 files changed, 116 insertions(+), 42 deletions(-) diff --git a/.gitlab/ci/default-build-test-rules.yml b/.gitlab/ci/default-build-test-rules.yml index 06a2329277..fd81a57d27 100644 --- a/.gitlab/ci/default-build-test-rules.yml +++ b/.gitlab/ci/default-build-test-rules.yml @@ -12,7 +12,6 @@ bypass_check_test_targets: - esp32h21 - esp32h4 - - esp32s31 # # These lines would diff --git a/components/app_update/test_apps/test_app_update/pytest_app_update_ut.py b/components/app_update/test_apps/test_app_update/pytest_app_update_ut.py index 7abfb482c4..2a50d13e6c 100644 --- a/components/app_update/test_apps/test_app_update/pytest_app_update_ut.py +++ b/components/app_update/test_apps/test_app_update/pytest_app_update_ut.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 re @@ -19,6 +19,7 @@ TEST_SUBMENU_PATTERN_PYTEST = re.compile(rb'\s+\((\d+)\)\s+"([^"]+)"\r?\n') indirect=True, ) @idf_parametrize('target', ['supported_targets'], indirect=['target']) +@pytest.mark.temp_skip_ci(targets=['esp32s31'], reason='s31 bringup on this module is not done') def test_app_update(dut: Dut) -> None: dut.run_all_single_board_cases(timeout=180) @@ -32,6 +33,7 @@ def test_app_update(dut: Dut) -> None: indirect=True, ) @idf_parametrize('target', ['supported_targets'], indirect=['target']) +@pytest.mark.temp_skip_ci(targets=['esp32s31'], reason='s31 bringup on this module is not done') def test_app_update_xip_psram(dut: Dut) -> None: dut.run_all_single_board_cases(timeout=180) @@ -45,6 +47,7 @@ def test_app_update_xip_psram(dut: Dut) -> None: indirect=True, ) @idf_parametrize('target', ['supported_targets'], indirect=['target']) +@pytest.mark.temp_skip_ci(targets=['esp32s31'], reason='s31 bringup on this module is not done') def test_app_update_xip_psram_rom_impl(dut: Dut) -> None: dut.run_all_single_board_cases(timeout=180) diff --git a/components/efuse/test_apps/pytest_efuse.py b/components/efuse/test_apps/pytest_efuse.py index cc9b564ffc..12c40001f1 100644 --- a/components/efuse/test_apps/pytest_efuse.py +++ b/components/efuse/test_apps/pytest_efuse.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 pytest from pytest_embedded import Dut @@ -10,6 +10,7 @@ from pytest_embedded_idf.utils import idf_parametrize ) @pytest.mark.generic @idf_parametrize('target', ['supported_targets'], indirect=['target']) +@pytest.mark.temp_skip_ci(targets=['esp32s31'], reason='s31 bringup on this module is not done') def test_efuse(dut: Dut) -> None: dut.run_all_single_board_cases() diff --git a/components/esp_driver_dma/test_apps/.build-test-rules.yml b/components/esp_driver_dma/test_apps/.build-test-rules.yml index fb45cdd41f..0c90afe528 100644 --- a/components/esp_driver_dma/test_apps/.build-test-rules.yml +++ b/components/esp_driver_dma/test_apps/.build-test-rules.yml @@ -4,6 +4,10 @@ components/esp_driver_dma/test_apps/dma: disable: - if: SOC_GDMA_SUPPORTED != 1 and SOC_CP_DMA_SUPPORTED != 1 - if: CONFIG_NAME == "flash_enc" and SOC_FLASH_ENC_SUPPORTED != 1 + disable_test: + - if: IDF_TARGET in ["esp32s31"] + temporary: true + reason: cannot pass # TODO: IDF-15527 depends_components: - esp_driver_dma - esp_hal_dma diff --git a/components/esp_driver_dma/test_apps/dma/pytest_dma.py b/components/esp_driver_dma/test_apps/dma/pytest_dma.py index 6c73c61215..f4a9f168c2 100644 --- a/components/esp_driver_dma/test_apps/dma/pytest_dma.py +++ b/components/esp_driver_dma/test_apps/dma/pytest_dma.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 diff --git a/components/esp_driver_i2c/test_apps/i2c_test_apps/pytest_i2c.py b/components/esp_driver_i2c/test_apps/i2c_test_apps/pytest_i2c.py index 174b3fae7f..e59f9eadc7 100644 --- a/components/esp_driver_i2c/test_apps/i2c_test_apps/pytest_i2c.py +++ b/components/esp_driver_i2c/test_apps/i2c_test_apps/pytest_i2c.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 @@ -16,6 +16,7 @@ from pytest_embedded_idf.utils import soc_filtered_targets indirect=True, ) @idf_parametrize('target', ['supported_targets'], indirect=['target']) +@pytest.mark.temp_skip_ci(targets=['esp32s31'], reason='s31 bringup on this module is not done') def test_i2c(dut: Dut) -> None: dut.run_all_single_board_cases() diff --git a/components/esp_driver_ledc/test_apps/ledc/pytest_ledc.py b/components/esp_driver_ledc/test_apps/ledc/pytest_ledc.py index b781bbf485..773911c603 100644 --- a/components/esp_driver_ledc/test_apps/ledc/pytest_ledc.py +++ b/components/esp_driver_ledc/test_apps/ledc/pytest_ledc.py @@ -75,5 +75,6 @@ def test_ledc_psram(dut: IdfDut) -> None: indirect=True, ) @idf_parametrize('target', ['supported_targets'], indirect=['target']) +@pytest.mark.temp_skip_ci(targets=['esp32s31'], reason='s31 bringup on this module is not done') def test_ledc_multi_device(case_tester) -> None: # type: ignore case_tester.run_all_multi_dev_cases(reset=True) diff --git a/components/esp_driver_mcpwm/test_apps/mcpwm/pytest_mcpwm.py b/components/esp_driver_mcpwm/test_apps/mcpwm/pytest_mcpwm.py index 3c4f6c63f6..f8168124ea 100644 --- a/components/esp_driver_mcpwm/test_apps/mcpwm/pytest_mcpwm.py +++ b/components/esp_driver_mcpwm/test_apps/mcpwm/pytest_mcpwm.py @@ -14,7 +14,7 @@ from pytest_embedded_idf.utils import idf_parametrize ], indirect=True, ) -@idf_parametrize('target', ['esp32', 'esp32s3', 'esp32c6', 'esp32h2', 'esp32p4'], indirect=['target']) +@idf_parametrize('target', ['esp32', 'esp32s3', 'esp32c6', 'esp32h2', 'esp32p4', 'esp32s31'], indirect=['target']) def test_mcpwm(dut: Dut) -> None: dut.run_all_single_board_cases() diff --git a/components/esp_driver_spi/test_apps/master/pytest_spi_master.py b/components/esp_driver_spi/test_apps/master/pytest_spi_master.py index 40a6e36af9..0ad809771e 100644 --- a/components/esp_driver_spi/test_apps/master/pytest_spi_master.py +++ b/components/esp_driver_spi/test_apps/master/pytest_spi_master.py @@ -85,5 +85,6 @@ def test_master_esp_flash(case_tester) -> None: # type: ignore indirect=True, ) @idf_parametrize('target', ['supported_targets'], indirect=['target']) +@pytest.mark.temp_skip_ci(targets=['esp32s31'], reason='s31 bringup on this module is not done') def test_master_multi_dev(case_tester) -> None: # type: ignore case_tester.run_all_multi_dev_cases(reset=True) diff --git a/components/esp_driver_spi/test_apps/param/pytest_spi_param.py b/components/esp_driver_spi/test_apps/param/pytest_spi_param.py index bd55a0ab78..93ad65cc09 100644 --- a/components/esp_driver_spi/test_apps/param/pytest_spi_param.py +++ b/components/esp_driver_spi/test_apps/param/pytest_spi_param.py @@ -1,4 +1,4 @@ -# SPDX-FileCopyrightText: 2021-2025 Espressif Systems (Shanghai) CO LTD +# SPDX-FileCopyrightText: 2021-2026 Espressif Systems (Shanghai) CO LTD # SPDX-License-Identifier: Apache-2.0 import pytest from pytest_embedded_idf.utils import idf_parametrize @@ -6,6 +6,7 @@ from pytest_embedded_idf.utils import idf_parametrize @pytest.mark.generic @idf_parametrize('target', ['supported_targets'], indirect=['target']) +@pytest.mark.temp_skip_ci(targets=['esp32s31'], reason='s31 bringup on this module is not done') def test_param_single_dev(case_tester) -> None: # type: ignore case_tester.run_all_normal_cases(reset=True) @@ -13,5 +14,6 @@ def test_param_single_dev(case_tester) -> None: # type: ignore @pytest.mark.generic_multi_device @pytest.mark.parametrize('count', [2], indirect=True) @idf_parametrize('target', ['supported_targets'], indirect=['target']) +@pytest.mark.temp_skip_ci(targets=['esp32s31'], reason='s31 bringup on this module is not done') def test_param_multi_dev(case_tester) -> None: # type: ignore case_tester.run_all_multi_dev_cases(reset=True) diff --git a/components/esp_driver_spi/test_apps/slave/pytest_spi_slave.py b/components/esp_driver_spi/test_apps/slave/pytest_spi_slave.py index 71bee21e81..7cc16d2bef 100644 --- a/components/esp_driver_spi/test_apps/slave/pytest_spi_slave.py +++ b/components/esp_driver_spi/test_apps/slave/pytest_spi_slave.py @@ -32,5 +32,6 @@ def test_slave_single_dev_esp32c5_rev1(case_tester) -> None: # type: ignore @pytest.mark.generic_multi_device @pytest.mark.parametrize('count, config', [(2, 'release'), (2, 'iram_safe')], indirect=True) @idf_parametrize('target', ['supported_targets'], indirect=['target']) +@pytest.mark.temp_skip_ci(targets=['esp32s31'], reason='s31 bringup on this module is not done') def test_slave_multi_dev(case_tester) -> None: # type: ignore case_tester.run_all_multi_dev_cases(reset=True) diff --git a/components/esp_driver_uart/test_apps/uart/pytest_uart.py b/components/esp_driver_uart/test_apps/uart/pytest_uart.py index f476f7366b..6b3167c2e2 100644 --- a/components/esp_driver_uart/test_apps/uart/pytest_uart.py +++ b/components/esp_driver_uart/test_apps/uart/pytest_uart.py @@ -29,6 +29,7 @@ input_argv = { indirect=True, ) @idf_parametrize('target', ['supported_targets'], indirect=['target']) +@pytest.mark.temp_skip_ci(targets=['esp32s31'], reason='s31 bringup on this module is not done') def test_uart_single_dev(case_tester) -> None: # type: ignore dut = case_tester.first_dut chip_type = dut.app.target @@ -82,6 +83,7 @@ def test_uart_single_dev_psram(case_tester) -> None: # type: ignore @pytest.mark.temp_skip_ci(targets=['esp32', 'esp32s3'], reason='no multi-dev runner') @pytest.mark.generic_multi_device @idf_parametrize('target', ['supported_targets'], indirect=['target']) +@pytest.mark.temp_skip_ci(targets=['esp32s31'], reason='s31 bringup on this module is not done') @pytest.mark.parametrize( 'config', [ 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 index 563e9e4ca0..920011d341 100644 --- a/components/esp_hw_support/test_apps/sleep_retention/pytest_retention.py +++ b/components/esp_hw_support/test_apps/sleep_retention/pytest_retention.py @@ -15,6 +15,8 @@ from pytest_embedded_idf.utils import soc_filtered_targets ], indirect=True, ) -@idf_parametrize('target', soc_filtered_targets('SOC_PAU_SUPPORTED == 1'), indirect=['target']) +@idf_parametrize( + 'target', soc_filtered_targets('SOC_PAU_SUPPORTED == 1 and SOC_LIGHT_SLEEP_SUPPORTED == 1'), indirect=['target'] +) def test_sleep_retention(dut: Dut) -> None: dut.run_all_single_board_cases() diff --git a/components/esp_hw_support/test_apps/wakeup_tests/pytest_wakeup_tests.py b/components/esp_hw_support/test_apps/wakeup_tests/pytest_wakeup_tests.py index c0898b3e61..bc242cec9f 100644 --- a/components/esp_hw_support/test_apps/wakeup_tests/pytest_wakeup_tests.py +++ b/components/esp_hw_support/test_apps/wakeup_tests/pytest_wakeup_tests.py @@ -43,7 +43,11 @@ available_rtcio_nums = { @pytest.mark.generic_multi_device @pytest.mark.parametrize('count', [2], indirect=True) @pytest.mark.parametrize('config', TEST_CONFIGS, indirect=True) -@idf_parametrize('target', soc_filtered_targets('SOC_PM_SUPPORT_EXT1_WAKEUP == 1'), indirect=['target']) +@idf_parametrize( + 'target', + soc_filtered_targets('SOC_PM_SUPPORT_EXT1_WAKEUP == 1 and SOC_DEEP_SLEEP_SUPPORTED == 1'), + indirect=['target'], +) def test_ext1_deepsleep(dut: tuple[IdfDut, IdfDut]) -> None: wakee = dut[0] waker = dut[1] @@ -140,6 +144,7 @@ def test_rtcio_deepsleep(dut: tuple[IdfDut, IdfDut]) -> None: @pytest.mark.parametrize('count', [2], indirect=True) @pytest.mark.parametrize('config', TEST_CONFIGS, indirect=True) @idf_parametrize('target', ['supported_targets'], indirect=['target']) +@pytest.mark.temp_skip_ci(targets=['esp32s31'], reason='s31 bringup on this module is not done') def test_gpio_wakeup_enable_lightsleep(dut: tuple[IdfDut, IdfDut]) -> None: wakee = dut[0] waker = dut[1] diff --git a/components/esp_lcd/test_apps/spi_lcd/pytest_spi_lcd.py b/components/esp_lcd/test_apps/spi_lcd/pytest_spi_lcd.py index 5df66ea347..9b581018a9 100644 --- a/components/esp_lcd/test_apps/spi_lcd/pytest_spi_lcd.py +++ b/components/esp_lcd/test_apps/spi_lcd/pytest_spi_lcd.py @@ -14,6 +14,7 @@ from pytest_embedded_idf.utils import idf_parametrize indirect=True, ) @idf_parametrize('target', ['supported_targets'], indirect=['target']) +@pytest.mark.temp_skip_ci(targets=['esp32s31'], reason='s31 bringup on this module is not done') def test_spi_lcd(dut: Dut) -> None: dut.run_all_single_board_cases() @@ -27,6 +28,7 @@ def test_spi_lcd(dut: Dut) -> None: indirect=True, ) @idf_parametrize('target', ['supported_targets'], indirect=['target']) +@pytest.mark.temp_skip_ci(targets=['esp32s31'], reason='s31 bringup on this module is not done') def test_spi_lcd_with_virt_flash_enc(dut: Dut) -> None: print(' - Erase flash') dut.serial.erase_flash() diff --git a/components/esp_pm/test_apps/esp_pm/pytest_esp_pm.py b/components/esp_pm/test_apps/esp_pm/pytest_esp_pm.py index a97cdca8bc..d7a65e6917 100644 --- a/components/esp_pm/test_apps/esp_pm/pytest_esp_pm.py +++ b/components/esp_pm/test_apps/esp_pm/pytest_esp_pm.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: Apache-2.0 import pytest from pytest_embedded import Dut @@ -17,6 +17,7 @@ from pytest_embedded_idf.utils import idf_parametrize indirect=True, ) @idf_parametrize('target', ['supported_targets'], indirect=['target']) +@pytest.mark.temp_skip_ci(targets=['esp32s31'], reason='s31 bringup on this module is not done') def test_esp_pm(dut: Dut) -> None: dut.run_all_single_board_cases() diff --git a/components/esp_rom/test_apps/rom_tests/pytest_esp_rom.py b/components/esp_rom/test_apps/rom_tests/pytest_esp_rom.py index b3e41e01af..36b9cc7e25 100644 --- a/components/esp_rom/test_apps/rom_tests/pytest_esp_rom.py +++ b/components/esp_rom/test_apps/rom_tests/pytest_esp_rom.py @@ -8,7 +8,7 @@ from pytest_embedded_idf.utils import idf_parametrize @pytest.mark.generic @idf_parametrize( 'target', - ['esp32c3', 'esp32s2', 'esp32s3', 'esp32c5', 'esp32c6', 'esp32c61', 'esp32h2', 'esp32p4'], + ['esp32c3', 'esp32s2', 'esp32s3', 'esp32c5', 'esp32c6', 'esp32c61', 'esp32h2', 'esp32p4', 'esp32s31'], indirect=['target'], ) def test_esp_rom(dut: Dut) -> None: diff --git a/components/pthread/test_apps/pthread_unity_tests/pytest_pthread_unity_tests.py b/components/pthread/test_apps/pthread_unity_tests/pytest_pthread_unity_tests.py index 6b81396727..21ebe78823 100644 --- a/components/pthread/test_apps/pthread_unity_tests/pytest_pthread_unity_tests.py +++ b/components/pthread/test_apps/pthread_unity_tests/pytest_pthread_unity_tests.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 @@ -14,6 +14,7 @@ from pytest_embedded_idf.utils import idf_parametrize indirect=True, ) @idf_parametrize('target', ['supported_targets'], indirect=['target']) +@pytest.mark.temp_skip_ci(targets=['esp32s31'], reason='s31 bringup on this module is not done') @pytest.mark.temp_skip_ci(targets=['esp32p4'], reason='p4 rev3 migration # TODO: IDF-14421') def test_pthread(dut: Dut) -> None: dut.run_all_single_board_cases(group='!thread-specific', timeout=300) @@ -36,6 +37,7 @@ def test_pthread_single_core(dut: Dut) -> None: indirect=True, ) @idf_parametrize('target', ['supported_targets'], indirect=['target']) +@pytest.mark.temp_skip_ci(targets=['esp32s31'], reason='s31 bringup on this module is not done') def test_pthread_tls(dut: Dut) -> None: dut.run_all_single_board_cases(group='thread-specific', timeout=300) diff --git a/components/spi_flash/test_apps/esp_flash/pytest_esp_flash.py b/components/spi_flash/test_apps/esp_flash/pytest_esp_flash.py index 75a682fbe6..a570072cef 100644 --- a/components/spi_flash/test_apps/esp_flash/pytest_esp_flash.py +++ b/components/spi_flash/test_apps/esp_flash/pytest_esp_flash.py @@ -17,6 +17,7 @@ from pytest_embedded_idf.utils import idf_parametrize indirect=True, ) @idf_parametrize('target', ['supported_targets'], indirect=['target']) +@pytest.mark.temp_skip_ci(targets=['esp32s31'], reason='s31 bringup on this module is not done') def test_esp_flash(dut: Dut) -> None: dut.run_all_single_board_cases(group='esp_flash') diff --git a/components/spi_flash/test_apps/esp_flash_stress/pytest_esp_flash_stress.py b/components/spi_flash/test_apps/esp_flash_stress/pytest_esp_flash_stress.py index d34314230c..7530179bda 100644 --- a/components/spi_flash/test_apps/esp_flash_stress/pytest_esp_flash_stress.py +++ b/components/spi_flash/test_apps/esp_flash_stress/pytest_esp_flash_stress.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: Apache-2.0 import pytest from pytest_embedded import Dut @@ -14,6 +14,7 @@ from pytest_embedded_idf.utils import idf_parametrize indirect=True, ) @idf_parametrize('target', ['supported_targets'], indirect=['target']) +@pytest.mark.temp_skip_ci(targets=['esp32s31'], reason='s31 bringup on this module is not done') def test_esp_flash_stress(dut: Dut) -> None: dut.run_all_single_board_cases(group='esp_flash') diff --git a/components/spi_flash/test_apps/flash_mmap/pytest_flash_mmap.py b/components/spi_flash/test_apps/flash_mmap/pytest_flash_mmap.py index 68c4f23038..ea73906afd 100644 --- a/components/spi_flash/test_apps/flash_mmap/pytest_flash_mmap.py +++ b/components/spi_flash/test_apps/flash_mmap/pytest_flash_mmap.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: Apache-2.0 import pytest from pytest_embedded import Dut diff --git a/examples/get-started/blink/pytest_blink.py b/examples/get-started/blink/pytest_blink.py index 55be95a566..78bb71a0e2 100644 --- a/examples/get-started/blink/pytest_blink.py +++ b/examples/get-started/blink/pytest_blink.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 logging import os @@ -10,8 +10,9 @@ from pytest_embedded_idf.utils import idf_parametrize @pytest.mark.generic @idf_parametrize('target', ['supported_targets'], indirect=['target']) +@pytest.mark.temp_skip_ci(targets=['esp32s31'], reason='s31 bringup on this module is not done') def test_blink(dut: IdfDut) -> None: # check and log bin size binary_file = os.path.join(dut.app.binary_path, 'blink.bin') bin_size = os.path.getsize(binary_file) - logging.info('blink_bin_size : {}KB'.format(bin_size // 1024)) + logging.info(f'blink_bin_size : {bin_size // 1024}KB') diff --git a/examples/peripherals/mcpwm/mcpwm_capture_hc_sr04/pytest_hc_sr04.py b/examples/peripherals/mcpwm/mcpwm_capture_hc_sr04/pytest_hc_sr04.py index 141b0c83ff..ee879543f9 100644 --- a/examples/peripherals/mcpwm/mcpwm_capture_hc_sr04/pytest_hc_sr04.py +++ b/examples/peripherals/mcpwm/mcpwm_capture_hc_sr04/pytest_hc_sr04.py @@ -6,7 +6,9 @@ from pytest_embedded_idf.utils import idf_parametrize @pytest.mark.generic -@idf_parametrize('target', ['esp32', 'esp32s3', 'esp32c6', 'esp32c5', 'esp32h2', 'esp32p4'], indirect=['target']) +@idf_parametrize( + 'target', ['esp32', 'esp32s3', 'esp32c6', 'esp32c5', 'esp32h2', 'esp32p4', 'esp32s31'], indirect=['target'] +) def test_hc_sr04_example(dut: Dut) -> None: dut.expect_exact('example: Install capture timer') dut.expect_exact('example: Install capture channel') diff --git a/examples/peripherals/mcpwm/mcpwm_servo_control/pytest_servo_mg996r.py b/examples/peripherals/mcpwm/mcpwm_servo_control/pytest_servo_mg996r.py index 0f92ed3336..1da97dbfed 100644 --- a/examples/peripherals/mcpwm/mcpwm_servo_control/pytest_servo_mg996r.py +++ b/examples/peripherals/mcpwm/mcpwm_servo_control/pytest_servo_mg996r.py @@ -6,7 +6,9 @@ from pytest_embedded_idf.utils import idf_parametrize @pytest.mark.generic -@idf_parametrize('target', ['esp32', 'esp32s3', 'esp32c5', 'esp32c6', 'esp32h2', 'esp32p4'], indirect=['target']) +@idf_parametrize( + 'target', ['esp32', 'esp32s3', 'esp32c5', 'esp32c6', 'esp32h2', 'esp32p4', 'esp32s31'], indirect=['target'] +) def test_servo_mg996r_example(dut: Dut) -> None: dut.expect_exact('example: Create timer and operator') dut.expect_exact('example: Connect timer and operator') diff --git a/examples/peripherals/mcpwm/mcpwm_sync/pytest_mcpwm_sync.py b/examples/peripherals/mcpwm/mcpwm_sync/pytest_mcpwm_sync.py index 62f3dc79d0..ae63848e79 100644 --- a/examples/peripherals/mcpwm/mcpwm_sync/pytest_mcpwm_sync.py +++ b/examples/peripherals/mcpwm/mcpwm_sync/pytest_mcpwm_sync.py @@ -1,4 +1,4 @@ -# SPDX-FileCopyrightText: 2021-2025 Espressif Systems (Shanghai) CO LTD +# SPDX-FileCopyrightText: 2021-2026 Espressif Systems (Shanghai) CO LTD # SPDX-License-Identifier: CC0-1.0 import itertools @@ -11,9 +11,9 @@ from pytest_embedded_idf.utils import idf_parametrize @idf_parametrize( 'config,target', itertools.chain( - itertools.product(['gpio'], ['esp32', 'esp32s3', 'esp32c5', 'esp32c6', 'esp32h2', 'esp32p4']), - itertools.product(['tez'], ['esp32', 'esp32s3', 'esp32c5', 'esp32c6', 'esp32h2', 'esp32p4']), - itertools.product(['soft'], ['esp32s3', 'esp32c5', 'esp32c6', 'esp32h2', 'esp32p4']), + itertools.product(['gpio'], ['esp32', 'esp32s3', 'esp32c5', 'esp32c6', 'esp32h2', 'esp32p4', 'esp32s31']), + itertools.product(['tez'], ['esp32', 'esp32s3', 'esp32c5', 'esp32c6', 'esp32h2', 'esp32p4', 'esp32s31']), + itertools.product(['soft'], ['esp32s3', 'esp32c5', 'esp32c6', 'esp32h2', 'esp32p4', 'esp32s31']), ), indirect=['config', 'target'], ) diff --git a/examples/peripherals/sigma_delta/sdm_dac/pytest_sdm_dac_example.py b/examples/peripherals/sigma_delta/sdm_dac/pytest_sdm_dac_example.py index 99d1837f46..6e82772027 100644 --- a/examples/peripherals/sigma_delta/sdm_dac/pytest_sdm_dac_example.py +++ b/examples/peripherals/sigma_delta/sdm_dac/pytest_sdm_dac_example.py @@ -8,7 +8,7 @@ from pytest_embedded_idf.utils import idf_parametrize @pytest.mark.generic @idf_parametrize( 'target', - ['esp32', 'esp32s2', 'esp32s3', 'esp32c3', 'esp32c5', 'esp32c6', 'esp32h2', 'esp32p4'], + ['esp32', 'esp32s2', 'esp32s3', 'esp32c3', 'esp32c5', 'esp32c6', 'esp32h2', 'esp32p4', 'esp32s31'], indirect=['target'], ) def test_sdm_dac_example(dut: Dut) -> None: diff --git a/examples/peripherals/sigma_delta/sdm_led/pytest_sdm_led_example.py b/examples/peripherals/sigma_delta/sdm_led/pytest_sdm_led_example.py index 7e5aa2f87a..22aed8522e 100644 --- a/examples/peripherals/sigma_delta/sdm_led/pytest_sdm_led_example.py +++ b/examples/peripherals/sigma_delta/sdm_led/pytest_sdm_led_example.py @@ -8,7 +8,7 @@ from pytest_embedded_idf.utils import idf_parametrize @pytest.mark.generic @idf_parametrize( 'target', - ['esp32', 'esp32s2', 'esp32s3', 'esp32c3', 'esp32c5', 'esp32c6', 'esp32h2', 'esp32p4'], + ['esp32', 'esp32s2', 'esp32s3', 'esp32c3', 'esp32c5', 'esp32c6', 'esp32h2', 'esp32p4', 'esp32s31'], indirect=['target'], ) def test_sdm_led_example(dut: Dut) -> None: diff --git a/examples/peripherals/timer_group/wiegand_interface/pytest_wiegand.py b/examples/peripherals/timer_group/wiegand_interface/pytest_wiegand.py index 50e23ceded..ede7ae12f8 100644 --- a/examples/peripherals/timer_group/wiegand_interface/pytest_wiegand.py +++ b/examples/peripherals/timer_group/wiegand_interface/pytest_wiegand.py @@ -8,7 +8,7 @@ from pytest_embedded_idf.utils import idf_parametrize @pytest.mark.generic @idf_parametrize( 'target', - ['esp32', 'esp32c3', 'esp32c5', 'esp32c6', 'esp32c61', 'esp32h2', 'esp32s2', 'esp32s3', 'esp32p4'], + ['esp32', 'esp32c3', 'esp32c5', 'esp32c6', 'esp32c61', 'esp32h2', 'esp32s2', 'esp32s3', 'esp32p4', 'esp32s31'], indirect=['target'], ) def test_gptimer_wiegand(dut: Dut) -> None: diff --git a/examples/storage/perf_benchmark/pytest_perf_benchmark_example.py b/examples/storage/perf_benchmark/pytest_perf_benchmark_example.py index 7bd3c2be76..e7f9ccd445 100644 --- a/examples/storage/perf_benchmark/pytest_perf_benchmark_example.py +++ b/examples/storage/perf_benchmark/pytest_perf_benchmark_example.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 from pytest_embedded import Dut @@ -9,6 +9,7 @@ from pytest_embedded_idf.utils import idf_parametrize @pytest.mark.generic @pytest.mark.parametrize('config', ['spiflash'], indirect=True) @idf_parametrize('target', ['supported_targets'], indirect=['target']) +@pytest.mark.temp_skip_ci(targets=['esp32s31'], reason='s31 bringup on this module is not done') def test_examples_perf_benchmark_spiflash(dut: Dut) -> None: # SPI flash dut.expect('example: Mountig WL layer...', timeout=10) diff --git a/examples/system/.build-test-rules.yml b/examples/system/.build-test-rules.yml index 2539468823..ae9a81b828 100644 --- a/examples/system/.build-test-rules.yml +++ b/examples/system/.build-test-rules.yml @@ -305,3 +305,7 @@ examples/system/xip_from_psram: disable: - if: IDF_TARGET == "esp32" reason: target esp32 doesn't support this feature. + disable_test: + - if: IDF_TARGET == "esp32s31" + temporary: true + reason: cannot pass # TODO: IDF-15526 diff --git a/examples/system/app_trace_basic/pytest_app_trace_basic.py b/examples/system/app_trace_basic/pytest_app_trace_basic.py index 69104e64ad..e1226d9488 100644 --- a/examples/system/app_trace_basic/pytest_app_trace_basic.py +++ b/examples/system/app_trace_basic/pytest_app_trace_basic.py @@ -66,6 +66,7 @@ def test_examples_app_trace_basic_usj(openocd_dut: 'OpenOCD', dut: IdfDut) -> No @pytest.mark.generic @idf_parametrize('config', ['apptrace_uart'], indirect=['config']) @idf_parametrize('target', ['supported_targets'], indirect=['target']) +@pytest.mark.temp_skip_ci(targets=['esp32s31'], reason='s31 bringup on this module is not done') def test_examples_app_trace_basic_uart(dut: IdfDut) -> None: dut.serial.close() with serial.Serial(dut.serial.port, baudrate=1000000, timeout=3) as ser: diff --git a/examples/system/deep_sleep/pytest_deep_sleep.py b/examples/system/deep_sleep/pytest_deep_sleep.py index dcdff422f7..9e6ef09c3e 100644 --- a/examples/system/deep_sleep/pytest_deep_sleep.py +++ b/examples/system/deep_sleep/pytest_deep_sleep.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 logging import time @@ -12,6 +12,7 @@ from pytest_embedded_idf.utils import idf_parametrize @idf_parametrize( 'config,target', [('esp32_singlecore', 'esp32'), ('basic', 'supported_targets')], indirect=['config', 'target'] ) +@pytest.mark.temp_skip_ci(targets=['esp32s31'], reason='s31 bringup on this module is not done') def test_deep_sleep(dut: Dut) -> None: dut.expect_exact('Enabling timer wakeup, 20s', timeout=10) dut.expect_exact('Not a deep sleep reset') @@ -22,7 +23,7 @@ def test_deep_sleep(dut: Dut) -> None: dut.expect_exact('boot: ESP-IDF') # first output that's the same on all chips sleep_time = time.time() - start_sleep - logging.info('Host measured sleep time at {:.2f}s'.format(sleep_time)) + logging.info(f'Host measured sleep time at {sleep_time:.2f}s') assert 18 < sleep_time < 22 # note: high tolerance as measuring time on the host may have some timing skew dut.expect_exact('boot: Fast booting app from partition', timeout=2) diff --git a/examples/system/gcov/pytest_gcov.py b/examples/system/gcov/pytest_gcov.py index 120beab663..0a136679df 100644 --- a/examples/system/gcov/pytest_gcov.py +++ b/examples/system/gcov/pytest_gcov.py @@ -200,5 +200,6 @@ def _test_gcov_uart(dut: IdfDut) -> None: @pytest.mark.generic @idf_parametrize('config', ['gcov_uart'], indirect=['config']) @idf_parametrize('target', ['supported_targets'], indirect=['target']) +@pytest.mark.temp_skip_ci(targets=['esp32s31'], reason='s31 bringup on this module is not done') def test_gcov_uart(dut: IdfDut) -> None: _test_gcov_uart(dut) diff --git a/examples/system/light_sleep/pytest_light_sleep.py b/examples/system/light_sleep/pytest_light_sleep.py index dc56b44325..14b2393521 100644 --- a/examples/system/light_sleep/pytest_light_sleep.py +++ b/examples/system/light_sleep/pytest_light_sleep.py @@ -10,6 +10,7 @@ from pytest_embedded_idf.utils import idf_parametrize @pytest.mark.generic @idf_parametrize('target', ['supported_targets'], indirect=['target']) +@pytest.mark.temp_skip_ci(targets=['esp32s31'], reason='s31 bringup on this module is not done') def test_light_sleep(dut: Dut) -> None: ENTERING_SLEEP_STR = 'Entering light sleep' EXIT_SLEEP_REGEX = r'Returned from light sleep, reason: (\w+), t=(\d+) ms, slept for (\d+) ms' diff --git a/examples/system/sysview_tracing/pytest_sysview_tracing.py b/examples/system/sysview_tracing/pytest_sysview_tracing.py index df48afb8f6..76dadd3564 100644 --- a/examples/system/sysview_tracing/pytest_sysview_tracing.py +++ b/examples/system/sysview_tracing/pytest_sysview_tracing.py @@ -159,6 +159,7 @@ def _test_sysview_tracing_uart(dut: IdfDut) -> None: @pytest.mark.generic @idf_parametrize('config', ['sysview_uart'], indirect=['config']) @idf_parametrize('target', ['supported_targets'], indirect=['target']) +@pytest.mark.temp_skip_ci(targets=['esp32s31'], reason='s31 bringup on this module is not done') def test_sysview_tracing_uart(dut: IdfDut) -> None: _test_sysview_tracing_uart(dut) 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 b4f07ccafb..05efc0b22f 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 @@ -26,4 +26,3 @@ no_runner_tags: - esp32h2,jtag - esp32p4,jtag - esp32s2,usb_host_flash_disk - - esp32s31,generic,rev_default # TODO: IDF-14694 diff --git a/tools/ci/idf_pytest/constants.py b/tools/ci/idf_pytest/constants.py index 7fa612c5e2..8675eb9e4a 100644 --- a/tools/ci/idf_pytest/constants.py +++ b/tools/ci/idf_pytest/constants.py @@ -15,6 +15,7 @@ SUPPORTED_TARGETS = [ 'esp32p4', 'esp32c5', 'esp32c61', + 'esp32s31', ] PREVIEW_TARGETS: list[str] = [] # this PREVIEW_TARGETS excludes 'linux' target diff --git a/tools/test_apps/system/.build-test-rules.yml b/tools/test_apps/system/.build-test-rules.yml index adcec0764f..9355ce5e2a 100644 --- a/tools/test_apps/system/.build-test-rules.yml +++ b/tools/test_apps/system/.build-test-rules.yml @@ -76,7 +76,7 @@ tools/test_apps/system/g1_components: tools/test_apps/system/gdb: disable_test: - - if: IDF_TARGET in ["esp32p4", "esp32c5", "esp32c61"] + - if: IDF_TARGET in ["esp32p4", "esp32c5", "esp32c61", "esp32s31"] temporary: true reason: not supported yet # TODO: IDF-13142 @@ -149,6 +149,10 @@ tools/test_apps/system/ram_loadable_app: - if: IDF_TARGET == "esp32p4" temporary: true reason: p4 rev3 migration # TODO: IDF-14370 + disable_test: + - if: IDF_TARGET == "esp32s31" + temporary: true + reason: cannot pass # TODO: IDF-15525 tools/test_apps/system/rtc_mem_reserve: enable: diff --git a/tools/test_apps/system/eh_frame/pytest_eh_frame.py b/tools/test_apps/system/eh_frame/pytest_eh_frame.py index ca6de919f4..0b7f0c14e2 100644 --- a/tools/test_apps/system/eh_frame/pytest_eh_frame.py +++ b/tools/test_apps/system/eh_frame/pytest_eh_frame.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 pytest from pytest_embedded import Dut @@ -7,7 +7,9 @@ from pytest_embedded_idf.utils import idf_parametrize @pytest.mark.generic @idf_parametrize( - 'target', ['esp32c2', 'esp32c3', 'esp32c5', 'esp32c6', 'esp32c61', 'esp32h2', 'esp32p4'], indirect=['target'] + 'target', + ['esp32c2', 'esp32c3', 'esp32c5', 'esp32c6', 'esp32c61', 'esp32h2', 'esp32p4', 'esp32s31'], + indirect=['target'], ) def test_eh_frame_wdt(dut: Dut) -> None: dut.expect_exact('Press ENTER to see the list of tests') @@ -19,7 +21,9 @@ def test_eh_frame_wdt(dut: Dut) -> None: @pytest.mark.generic @idf_parametrize( - 'target', ['esp32c2', 'esp32c3', 'esp32c5', 'esp32c6', 'esp32c61', 'esp32h2', 'esp32p4'], indirect=['target'] + 'target', + ['esp32c2', 'esp32c3', 'esp32c5', 'esp32c6', 'esp32c61', 'esp32h2', 'esp32p4', 'esp32s31'], + indirect=['target'], ) def test_eh_frame_panic(dut: Dut) -> None: dut.expect_exact('Press ENTER to see the list of tests') diff --git a/tools/test_apps/system/gdb/pytest_gdb.py b/tools/test_apps/system/gdb/pytest_gdb.py index 3e2ffdc97d..6ddf6ff5ec 100644 --- a/tools/test_apps/system/gdb/pytest_gdb.py +++ b/tools/test_apps/system/gdb/pytest_gdb.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 os import re @@ -21,13 +21,17 @@ def _test_idf_gdb(openocd_dut: 'OpenOCD', dut: IdfDut) -> None: # Don't need to have output from UART anymore dut.serial.stop_redirect_thread() - with openocd_dut.run(), open(os.path.join(dut.logdir, 'gdb.txt'), 'w') as gdb_log, pexpect.spawn( - f'idf.py -B {dut.app.binary_path} gdb --batch', - timeout=60, - logfile=gdb_log, - encoding='utf-8', - codec_errors='ignore', - ) as p: + with ( + openocd_dut.run(), + open(os.path.join(dut.logdir, 'gdb.txt'), 'w') as gdb_log, + pexpect.spawn( + f'idf.py -B {dut.app.binary_path} gdb --batch', + timeout=60, + logfile=gdb_log, + encoding='utf-8', + codec_errors='ignore', + ) as p, + ): p.expect(re.compile(r'add symbol table from file.*bootloader.elf')) p.expect( re.compile(r'add symbol table from file.*rom.elf') diff --git a/tools/test_apps/system/panic/pytest_panic.py b/tools/test_apps/system/panic/pytest_panic.py index 0a0df29994..8bf8c5e7fa 100644 --- a/tools/test_apps/system/panic/pytest_panic.py +++ b/tools/test_apps/system/panic/pytest_panic.py @@ -55,7 +55,25 @@ CONFIGS_UBSAN = list( ) ) -CONFIG_PANIC = list(itertools.chain(itertools.product(['panic'], ['supported_targets']))) +CONFIG_PANIC = list( + itertools.chain( + itertools.product( + ['panic'], + [ + 'esp32', + 'esp32c2', + 'esp32c3', + 'esp32s2', + 'esp32s3', + 'esp32p4', + 'esp32c5', + 'esp32c6', + 'esp32c61', + 'esp32h2', + ], + ) + ) +) 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)))