test: format all test scripts

This commit is contained in:
igor.udot 2025-02-24 10:18:03 +08:00
parent 717c18a58e
commit daf2d31008
381 changed files with 6180 additions and 4289 deletions

View File

@ -1,16 +1,18 @@
# SPDX-FileCopyrightText: 2022-2024 Espressif Systems (Shanghai) CO LTD # SPDX-FileCopyrightText: 2022-2025 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
from pytest_embedded import Dut from pytest_embedded import Dut
from pytest_embedded_idf.utils import idf_parametrize
DEFAULT_TIMEOUT = 20 DEFAULT_TIMEOUT = 20
TEST_SUBMENU_PATTERN_PYTEST = re.compile(rb'\s+\((\d+)\)\s+"([^"]+)"\r?\n') TEST_SUBMENU_PATTERN_PYTEST = re.compile(rb'\s+\((\d+)\)\s+"([^"]+)"\r?\n')
@pytest.mark.supported_targets @pytest.mark.temp_skip_ci(
@pytest.mark.temp_skip_ci(targets=['esp32c5'], reason='C5 has not supported deep sleep') # TODO: [ESP32C5] IDF-8640, IDF-10317 targets=['esp32c5'], reason='C5 has not supported deep sleep'
) # TODO: [ESP32C5] IDF-8640, IDF-10317
@pytest.mark.generic @pytest.mark.generic
@pytest.mark.parametrize( @pytest.mark.parametrize(
'config', 'config',
@ -19,11 +21,11 @@ TEST_SUBMENU_PATTERN_PYTEST = re.compile(rb'\s+\((\d+)\)\s+"([^"]+)"\r?\n')
], ],
indirect=True, indirect=True,
) )
@idf_parametrize('target', ['supported_targets'], indirect=['target'])
def test_app_update(dut: Dut) -> None: def test_app_update(dut: Dut) -> None:
dut.run_all_single_board_cases(timeout=90) dut.run_all_single_board_cases(timeout=90)
@pytest.mark.supported_targets
# TODO: [ESP32C61] IDF-9245, IDF-10983 # TODO: [ESP32C61] IDF-9245, IDF-10983
@pytest.mark.temp_skip_ci(targets=['esp32c61'], reason='C61 has not supported deep sleep') @pytest.mark.temp_skip_ci(targets=['esp32c61'], reason='C61 has not supported deep sleep')
@pytest.mark.generic @pytest.mark.generic
@ -34,12 +36,14 @@ def test_app_update(dut: Dut) -> None:
], ],
indirect=True, indirect=True,
) )
@idf_parametrize('target', ['supported_targets'], indirect=['target'])
def test_app_update_xip_psram(dut: Dut) -> None: def test_app_update_xip_psram(dut: Dut) -> None:
dut.run_all_single_board_cases(timeout=90) dut.run_all_single_board_cases(timeout=90)
@pytest.mark.supported_targets @pytest.mark.temp_skip_ci(
@pytest.mark.temp_skip_ci(targets=['esp32c5'], reason='C5 has not supported deep sleep') # TODO: [ESP32C5] IDF-8640, IDF-10317 targets=['esp32c5'], reason='C5 has not supported deep sleep'
) # TODO: [ESP32C5] IDF-8640, IDF-10317
@pytest.mark.generic @pytest.mark.generic
@pytest.mark.parametrize( @pytest.mark.parametrize(
'config', 'config',
@ -48,14 +52,11 @@ def test_app_update_xip_psram(dut: Dut) -> None:
], ],
indirect=True, indirect=True,
) )
@idf_parametrize('target', ['supported_targets'], indirect=['target'])
def test_app_update_xip_psram_rom_impl(dut: Dut) -> None: def test_app_update_xip_psram_rom_impl(dut: Dut) -> None:
dut.run_all_single_board_cases(timeout=90) dut.run_all_single_board_cases(timeout=90)
@pytest.mark.esp32
@pytest.mark.esp32c3
@pytest.mark.esp32s3
@pytest.mark.esp32p4
@pytest.mark.generic @pytest.mark.generic
@pytest.mark.parametrize( @pytest.mark.parametrize(
'config', 'config',
@ -64,5 +65,6 @@ def test_app_update_xip_psram_rom_impl(dut: Dut) -> None:
], ],
indirect=True, indirect=True,
) )
@idf_parametrize('target', ['esp32', 'esp32c3', 'esp32s3', 'esp32p4'], indirect=['target'])
def test_app_update_with_rollback(dut: Dut) -> None: def test_app_update_with_rollback(dut: Dut) -> None:
dut.run_all_single_board_cases(timeout=90) dut.run_all_single_board_cases(timeout=90)

View File

@ -1,26 +1,26 @@
# SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD # SPDX-FileCopyrightText: 2022-2025 Espressif Systems (Shanghai) CO LTD
# SPDX-License-Identifier: CC0-1.0 # SPDX-License-Identifier: CC0-1.0
import pytest import pytest
from pytest_embedded import Dut from pytest_embedded import Dut
from pytest_embedded_idf.utils import idf_parametrize
@pytest.mark.generic @pytest.mark.generic
@pytest.mark.supported_targets @idf_parametrize('target', ['supported_targets'], indirect=['target'])
def test_bootloader_support(dut: Dut) -> None: def test_bootloader_support(dut: Dut) -> None:
dut.run_all_single_board_cases() dut.run_all_single_board_cases()
@pytest.mark.host_test @pytest.mark.host_test
@pytest.mark.qemu @pytest.mark.qemu
@pytest.mark.esp32 @idf_parametrize('target', ['esp32'], indirect=['target'])
def test_bootloader_support_qemu_esp32(dut: Dut) -> None: def test_bootloader_support_qemu_esp32(dut: Dut) -> None:
dut.run_all_single_board_cases() dut.run_all_single_board_cases()
@pytest.mark.host_test @pytest.mark.host_test
@pytest.mark.qemu @pytest.mark.qemu
@pytest.mark.esp32c3 @idf_parametrize('target', ['esp32c3'], indirect=['target'])
def test_bootloader_support_qemu_esp32c3(dut: Dut) -> None: def test_bootloader_support_qemu_esp32c3(dut: Dut) -> None:
for case in dut.test_menu: for case in dut.test_menu:
if 'qemu-ignore-c3' not in case.groups: if 'qemu-ignore-c3' not in case.groups:

View File

@ -1,17 +1,15 @@
# SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD # SPDX-FileCopyrightText: 2022-2025 Espressif Systems (Shanghai) CO LTD
# SPDX-License-Identifier: CC0-1.0 # SPDX-License-Identifier: CC0-1.0
import pytest import pytest
from pytest_embedded import Dut from pytest_embedded import Dut
from pytest_embedded_idf.utils import idf_parametrize
@pytest.mark.generic @pytest.mark.generic
@pytest.mark.esp32 @idf_parametrize(
@pytest.mark.esp32c3 'target',
@pytest.mark.esp32c5 ['esp32', 'esp32c3', 'esp32c5', 'esp32c6', 'esp32h2', 'esp32s2', 'esp32s3', 'esp32p4'],
@pytest.mark.esp32c6 indirect=['target'],
@pytest.mark.esp32h2 )
@pytest.mark.esp32s2
@pytest.mark.esp32s3
@pytest.mark.esp32p4
def test_rtc_reserved_memory(dut: Dut) -> None: def test_rtc_reserved_memory(dut: Dut) -> None:
dut.expect_exact('SUCCESS: data were saved across reboot', timeout=10) dut.expect_exact('SUCCESS: data were saved across reboot', timeout=10)

View File

@ -1,11 +1,11 @@
# SPDX-FileCopyrightText: 2022-2024 Espressif Systems (Shanghai) CO LTD # SPDX-FileCopyrightText: 2022-2025 Espressif Systems (Shanghai) CO LTD
# SPDX-License-Identifier: CC0-1.0 # SPDX-License-Identifier: CC0-1.0
import pytest import pytest
from pytest_embedded import Dut from pytest_embedded import Dut
from pytest_embedded_idf.utils import idf_parametrize
@pytest.mark.generic @pytest.mark.generic
@pytest.mark.esp32 @idf_parametrize('target', ['esp32', 'esp32c3'], indirect=['target'])
@pytest.mark.esp32c3
def test_bt(dut: Dut) -> None: def test_bt(dut: Dut) -> None:
dut.run_all_single_board_cases() dut.run_all_single_board_cases()

View File

@ -1,14 +1,20 @@
# SPDX-FileCopyrightText: 2022-2024 Espressif Systems (Shanghai) CO LTD # SPDX-FileCopyrightText: 2022-2025 Espressif Systems (Shanghai) CO LTD
# SPDX-License-Identifier: Apache-2.0 # SPDX-License-Identifier: Apache-2.0
import pytest import pytest
from pytest_embedded import Dut from pytest_embedded import Dut
from pytest_embedded_idf.utils import idf_parametrize
@pytest.mark.parametrize('config', [ @idf_parametrize(
pytest.param('default', marks=[pytest.mark.esp32, pytest.mark.esp32c2, pytest.mark.generic]), 'config,target,markers',
pytest.param('iram', marks=[pytest.mark.esp32c2, pytest.mark.generic]), [
pytest.param('psram', marks=[pytest.mark.esp32, pytest.mark.psram]), ('default', 'esp32', (pytest.mark.generic,)),
], indirect=True) ('default', 'esp32c2', (pytest.mark.generic,)),
('iram', 'esp32c2', (pytest.mark.generic,)),
('psram', 'esp32', (pytest.mark.psram,)),
],
indirect=['config', 'target'],
)
def test_bt_memory_release(dut: Dut) -> None: def test_bt_memory_release(dut: Dut) -> None:
dut.expect_exact('BLE Host Task Started', timeout=6) dut.expect_exact('BLE Host Task Started', timeout=6)
dut.expect_exact('BLE Host Task Stopped', timeout=8) dut.expect_exact('BLE Host Task Stopped', timeout=8)

View File

@ -1,7 +1,8 @@
# SPDX-FileCopyrightText: 2022-2024 Espressif Systems (Shanghai) CO LTD # SPDX-FileCopyrightText: 2022-2025 Espressif Systems (Shanghai) CO LTD
# SPDX-License-Identifier: CC0-1.0 # SPDX-License-Identifier: CC0-1.0
import pytest import pytest
from pytest_embedded import Dut from pytest_embedded import Dut
from pytest_embedded_idf.utils import idf_parametrize
def do_test_quit(dut: Dut) -> None: def do_test_quit(dut: Dut) -> None:
@ -44,69 +45,61 @@ def do_test_help_quit(dut: Dut) -> None:
dut.expect(r'quit\s+Quit REPL environment\s+esp>') dut.expect(r'quit\s+Quit REPL environment\s+esp>')
@pytest.mark.parametrize( @idf_parametrize('config', ['defaults'], indirect=['config'])
'config', [ @idf_parametrize(
pytest.param('defaults'), 'target,test_on,markers',
] [
) ('linux', 'host', (pytest.mark.host_test,)),
@pytest.mark.parametrize( ('esp32', 'target', (pytest.mark.generic,)),
'test_on', [ ('esp32c3', 'target', (pytest.mark.generic,)),
pytest.param('host', marks=[pytest.mark.linux, pytest.mark.host_test]), ('esp32', 'qemu', (pytest.mark.host_test, pytest.mark.qemu)),
pytest.param('target', marks=[pytest.mark.esp32, pytest.mark.generic]), ],
pytest.param('target', marks=[pytest.mark.esp32c3, pytest.mark.generic]), indirect=['target'],
pytest.param('qemu', marks=[pytest.mark.esp32, pytest.mark.host_test, pytest.mark.qemu]),
]
) )
def test_console(dut: Dut, test_on: str) -> None: def test_console(dut: Dut, test_on: str) -> None:
dut.run_all_single_board_cases(group='!ignore', timeout=120) dut.run_all_single_board_cases(group='!ignore', timeout=120)
@pytest.mark.parametrize( @idf_parametrize('config', ['defaults'], indirect=['config'])
'config', [ @idf_parametrize(
pytest.param('defaults'), 'target,test_on,markers',
] [
) ('linux', 'host', (pytest.mark.host_test,)),
@pytest.mark.parametrize( ('esp32', 'target', (pytest.mark.generic,)),
'test_on', [ ('esp32c3', 'target', (pytest.mark.generic,)),
pytest.param('host', marks=[pytest.mark.linux, pytest.mark.host_test]), ('esp32', 'qemu', (pytest.mark.host_test, pytest.mark.qemu)),
pytest.param('target', marks=[pytest.mark.esp32, pytest.mark.generic]), ],
pytest.param('target', marks=[pytest.mark.esp32c3, pytest.mark.generic]), indirect=['target'],
pytest.param('qemu', marks=[pytest.mark.esp32, pytest.mark.host_test, pytest.mark.qemu]),
]
) )
def test_console_repl(dut: Dut, test_on: str) -> None: def test_console_repl(dut: Dut, test_on: str) -> None:
do_test_quit(dut) do_test_quit(dut)
@pytest.mark.parametrize( @idf_parametrize('config', ['defaults'], indirect=['config'])
'config', [ @idf_parametrize(
pytest.param('defaults'), 'target,test_on,markers',
] [
) ('linux', 'host', (pytest.mark.host_test,)),
@pytest.mark.parametrize( ('esp32', 'target', (pytest.mark.generic,)),
'test_on', [ ('esp32c3', 'target', (pytest.mark.generic,)),
pytest.param('host', marks=[pytest.mark.linux, pytest.mark.host_test]), ('esp32', 'qemu', (pytest.mark.host_test, pytest.mark.qemu)),
pytest.param('target', marks=[pytest.mark.esp32, pytest.mark.generic]), ],
pytest.param('target', marks=[pytest.mark.esp32c3, pytest.mark.generic]), indirect=['target'],
pytest.param('qemu', marks=[pytest.mark.esp32, pytest.mark.host_test, pytest.mark.qemu]),
]
) )
def test_console_help_sorted_registration(dut: Dut, test_on: str) -> None: def test_console_help_sorted_registration(dut: Dut, test_on: str) -> None:
do_test_help_generic(dut, 'sorted') do_test_help_generic(dut, 'sorted')
@pytest.mark.parametrize( @idf_parametrize('config', ['defaults'], indirect=['config'])
'config', [ @idf_parametrize(
pytest.param('defaults'), 'target,test_on,markers',
] [
) ('linux', 'host', (pytest.mark.host_test,)),
@pytest.mark.parametrize( ('esp32', 'target', (pytest.mark.generic,)),
'test_on', [ ('esp32c3', 'target', (pytest.mark.generic,)),
pytest.param('host', marks=[pytest.mark.linux, pytest.mark.host_test]), ('esp32', 'qemu', (pytest.mark.host_test, pytest.mark.qemu)),
pytest.param('target', marks=[pytest.mark.esp32, pytest.mark.generic]), ],
pytest.param('target', marks=[pytest.mark.esp32c3, pytest.mark.generic]), indirect=['target'],
pytest.param('qemu', marks=[pytest.mark.esp32, pytest.mark.host_test, pytest.mark.qemu]),
]
) )
def test_console_help_reverse_registration(dut: Dut, test_on: str) -> None: def test_console_help_reverse_registration(dut: Dut, test_on: str) -> None:
dut.expect_exact('Press ENTER to see the list of tests') dut.expect_exact('Press ENTER to see the list of tests')
@ -131,63 +124,45 @@ def test_console_help_reverse_registration(dut: Dut, test_on: str) -> None:
dut.expect_exact('esp>') dut.expect_exact('esp>')
@pytest.mark.parametrize( @idf_parametrize('config', ['sorted'], indirect=['config'])
'config', [ @idf_parametrize('target', ['linux'], indirect=['target'])
pytest.param('sorted'), @idf_parametrize('test_on,markers', [('host', (pytest.mark.host_test,))])
]
)
@pytest.mark.parametrize(
'test_on', [
pytest.param('host', marks=[pytest.mark.linux, pytest.mark.host_test]),
]
)
def test_console_sorted_help_sorted_registration(dut: Dut, test_on: str) -> None: def test_console_sorted_help_sorted_registration(dut: Dut, test_on: str) -> None:
do_test_help_generic(dut, 'sorted') do_test_help_generic(dut, 'sorted')
@pytest.mark.parametrize( @idf_parametrize('config', ['sorted'], indirect=['config'])
'config', [ @idf_parametrize('target', ['linux'], indirect=['target'])
pytest.param('sorted', marks=[pytest.mark.linux, pytest.mark.host_test]), @idf_parametrize('test_on,markers', [('host', (pytest.mark.host_test,))])
]
)
@pytest.mark.parametrize(
'test_on', [
pytest.param('host', marks=[pytest.mark.linux, pytest.mark.host_test]),
]
)
def test_console_sorted_help_reverse_registration(dut: Dut, test_on: str) -> None: def test_console_sorted_help_reverse_registration(dut: Dut, test_on: str) -> None:
do_test_help_generic(dut, 'reverse') do_test_help_generic(dut, 'reverse')
@pytest.mark.parametrize( @idf_parametrize('config', ['defaults'], indirect=['config'])
'config', [ @idf_parametrize(
pytest.param('defaults'), 'target,test_on,markers',
] [
) ('linux', 'host', (pytest.mark.host_test,)),
@pytest.mark.parametrize( ('esp32', 'target', (pytest.mark.generic,)),
'test_on', [ ('esp32c3', 'target', (pytest.mark.generic,)),
pytest.param('host', marks=[pytest.mark.linux, pytest.mark.host_test]), ('esp32', 'qemu', (pytest.mark.host_test, pytest.mark.qemu)),
pytest.param('target', marks=[pytest.mark.esp32, pytest.mark.generic]), ],
pytest.param('target', marks=[pytest.mark.esp32c3, pytest.mark.generic]), indirect=['target'],
pytest.param('qemu', marks=[pytest.mark.esp32, pytest.mark.host_test, pytest.mark.qemu]),
]
) )
def test_console_help_quit(dut: Dut, test_on: str) -> None: def test_console_help_quit(dut: Dut, test_on: str) -> None:
do_test_help_quit(dut) do_test_help_quit(dut)
@pytest.mark.parametrize( @idf_parametrize('config', ['defaults'], indirect=['config'])
'config', [ @idf_parametrize(
pytest.param('defaults'), 'target,test_on,markers',
] [
) ('linux', 'host', (pytest.mark.host_test,)),
@pytest.mark.parametrize( ('esp32', 'target', (pytest.mark.generic,)),
'test_on', [ ('esp32c3', 'target', (pytest.mark.generic,)),
pytest.param('host', marks=[pytest.mark.linux, pytest.mark.host_test]), ('esp32', 'qemu', (pytest.mark.host_test, pytest.mark.qemu)),
pytest.param('target', marks=[pytest.mark.esp32, pytest.mark.generic]), ],
pytest.param('target', marks=[pytest.mark.esp32c3, pytest.mark.generic]), indirect=['target'],
pytest.param('qemu', marks=[pytest.mark.esp32, pytest.mark.host_test, pytest.mark.qemu]),
]
) )
def test_console_help_verbose_level_0(dut: Dut, test_on: str) -> None: def test_console_help_verbose_level_0(dut: Dut, test_on: str) -> None:
help_verbose_info = 'Print the summary of all registered commands if no arguments are given,' help_verbose_info = 'Print the summary of all registered commands if no arguments are given,'
@ -200,18 +175,16 @@ def test_console_help_verbose_level_0(dut: Dut, test_on: str) -> None:
dut.expect_exact('help', not_matching=help_verbose_info) dut.expect_exact('help', not_matching=help_verbose_info)
@pytest.mark.parametrize( @idf_parametrize('config', ['defaults'], indirect=['config'])
'config', [ @idf_parametrize(
pytest.param('defaults'), 'target,test_on,markers',
] [
) ('linux', 'host', (pytest.mark.host_test,)),
@pytest.mark.parametrize( ('esp32', 'target', (pytest.mark.generic,)),
'test_on', [ ('esp32c3', 'target', (pytest.mark.generic,)),
pytest.param('host', marks=[pytest.mark.linux, pytest.mark.host_test]), ('esp32', 'qemu', (pytest.mark.host_test, pytest.mark.qemu)),
pytest.param('target', marks=[pytest.mark.esp32, pytest.mark.generic]), ],
pytest.param('target', marks=[pytest.mark.esp32c3, pytest.mark.generic]), indirect=['target'],
pytest.param('qemu', marks=[pytest.mark.esp32, pytest.mark.host_test, pytest.mark.qemu]),
]
) )
def test_console_help_verbose_level_1(dut: Dut, test_on: str) -> None: def test_console_help_verbose_level_1(dut: Dut, test_on: str) -> None:
help_verbose_info = 'Print the summary of all registered commands if no arguments are given,' help_verbose_info = 'Print the summary of all registered commands if no arguments are given,'
@ -223,18 +196,16 @@ def test_console_help_verbose_level_1(dut: Dut, test_on: str) -> None:
dut.expect_exact(help_verbose_info) dut.expect_exact(help_verbose_info)
@pytest.mark.parametrize( @idf_parametrize('config', ['defaults'], indirect=['config'])
'config', [ @idf_parametrize(
pytest.param('defaults'), 'target,test_on,markers',
] [
) ('linux', 'host', (pytest.mark.host_test,)),
@pytest.mark.parametrize( ('esp32', 'target', (pytest.mark.generic,)),
'test_on', [ ('esp32c3', 'target', (pytest.mark.generic,)),
pytest.param('host', marks=[pytest.mark.linux, pytest.mark.host_test]), ('esp32', 'qemu', (pytest.mark.host_test, pytest.mark.qemu)),
pytest.param('target', marks=[pytest.mark.esp32, pytest.mark.generic]), ],
pytest.param('target', marks=[pytest.mark.esp32c3, pytest.mark.generic]), indirect=['target'],
pytest.param('qemu', marks=[pytest.mark.esp32, pytest.mark.host_test, pytest.mark.qemu]),
]
) )
def test_console_help_verbose_subcommand(dut: Dut, test_on: str) -> None: def test_console_help_verbose_subcommand(dut: Dut, test_on: str) -> None:
help_verbose_info = 'Print the summary of all registered commands if no arguments are given,' help_verbose_info = 'Print the summary of all registered commands if no arguments are given,'
@ -244,24 +215,23 @@ def test_console_help_verbose_subcommand(dut: Dut, test_on: str) -> None:
# verify help --verbose=0 subcommand # verify help --verbose=0 subcommand
dut.write('help --verbose=0') dut.write('help --verbose=0')
dut.write('help --verbose=0') dut.write('help --verbose=0')
dut.expect_exact('help --verbose=0',not_matching=help_verbose_info) dut.expect_exact('help --verbose=0', not_matching=help_verbose_info)
# verify help --verbose=1 subcommand # verify help --verbose=1 subcommand
dut.write('help --verbose=1') dut.write('help --verbose=1')
dut.expect_exact(help_verbose_info) dut.expect_exact(help_verbose_info)
@pytest.mark.parametrize( @idf_parametrize('config', ['defaults'], indirect=['config'])
'config', [ @idf_parametrize(
pytest.param('defaults'), 'target,test_on,markers',
] [
) ('linux', 'host', (pytest.mark.host_test,)),
@pytest.mark.parametrize( ('esp32', 'target', (pytest.mark.generic,)),
'test_on', [ ('esp32c3', 'target', (pytest.mark.generic,)),
pytest.param('host', marks=[pytest.mark.linux, pytest.mark.host_test]), ('esp32', 'qemu', (pytest.mark.host_test, pytest.mark.qemu)),
pytest.param('target', marks=[pytest.mark.esp32, pytest.mark.esp32c3, pytest.mark.generic]), ],
pytest.param('qemu', marks=[pytest.mark.esp32, pytest.mark.host_test, pytest.mark.qemu]), indirect=['target'],
]
) )
def test_console_help_deregister(dut: Dut, test_on: str) -> None: def test_console_help_deregister(dut: Dut, test_on: str) -> None:
dut.expect_exact('Press ENTER to see the list of tests') dut.expect_exact('Press ENTER to see the list of tests')
@ -275,17 +245,16 @@ def test_console_help_deregister(dut: Dut, test_on: str) -> None:
dut.expect_exact(cmd_z_description, not_matching=cmd_a_description) dut.expect_exact(cmd_z_description, not_matching=cmd_a_description)
@pytest.mark.parametrize( @idf_parametrize('config', ['defaults'], indirect=['config'])
'config', [ @idf_parametrize(
pytest.param('defaults'), 'target,test_on,markers',
] [
) ('linux', 'host', (pytest.mark.host_test,)),
@pytest.mark.parametrize( ('esp32', 'target', (pytest.mark.generic,)),
'test_on', [ ('esp32c3', 'target', (pytest.mark.generic,)),
pytest.param('host', marks=[pytest.mark.linux, pytest.mark.host_test]), ('esp32', 'qemu', (pytest.mark.host_test, pytest.mark.qemu)),
pytest.param('target', marks=[pytest.mark.esp32, pytest.mark.esp32c3, pytest.mark.generic]), ],
pytest.param('qemu', marks=[pytest.mark.esp32, pytest.mark.host_test, pytest.mark.qemu]), indirect=['target'],
]
) )
def test_console_help_re_register(dut: Dut, test_on: str) -> None: def test_console_help_re_register(dut: Dut, test_on: str) -> 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

@ -1,12 +1,11 @@
# SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD # SPDX-FileCopyrightText: 2022-2025 Espressif Systems (Shanghai) CO LTD
# SPDX-License-Identifier: CC0-1.0 # SPDX-License-Identifier: CC0-1.0
import pytest import pytest
from pytest_embedded import Dut from pytest_embedded import Dut
from pytest_embedded_idf.utils import idf_parametrize
@pytest.mark.esp32
@pytest.mark.esp32c3
@pytest.mark.generic @pytest.mark.generic
@idf_parametrize('target', ['esp32', 'esp32c3'], indirect=['target'])
def test_cxx_exception(dut: Dut) -> None: def test_cxx_exception(dut: Dut) -> None:
dut.run_all_single_board_cases() dut.run_all_single_board_cases()

View File

@ -1,13 +1,12 @@
# SPDX-FileCopyrightText: 2022 Espressif Systems (Shanghai) CO LTD # SPDX-FileCopyrightText: 2022-2025 Espressif Systems (Shanghai) CO LTD
# SPDX-License-Identifier: CC0-1.0 # SPDX-License-Identifier: CC0-1.0
import pytest import pytest
from pytest_embedded import Dut from pytest_embedded import Dut
from pytest_embedded_idf.utils import idf_parametrize
@pytest.mark.esp32
@pytest.mark.esp32c3
@pytest.mark.generic @pytest.mark.generic
@idf_parametrize('target', ['esp32', 'esp32c3'], indirect=['target'])
def test_cxx_noexcept_out_of_range(dut: Dut) -> None: def test_cxx_noexcept_out_of_range(dut: Dut) -> None:
dut.expect_exact('Press ENTER to see the list of tests') dut.expect_exact('Press ENTER to see the list of tests')
dut.write('1') dut.write('1')
@ -15,9 +14,8 @@ def test_cxx_noexcept_out_of_range(dut: Dut) -> None:
dut.expect_exact('Rebooting...') dut.expect_exact('Rebooting...')
@pytest.mark.esp32
@pytest.mark.esp32c3
@pytest.mark.generic @pytest.mark.generic
@idf_parametrize('target', ['esp32', 'esp32c3'], indirect=['target'])
def test_cxx_noexcept_bad_alloc(dut: Dut) -> None: def test_cxx_noexcept_bad_alloc(dut: Dut) -> None:
dut.expect_exact('Press ENTER to see the list of tests') dut.expect_exact('Press ENTER to see the list of tests')
dut.write('2') dut.write('2')

View File

@ -1,36 +1,31 @@
# SPDX-FileCopyrightText: 2022-2024 Espressif Systems (Shanghai) CO LTD # SPDX-FileCopyrightText: 2022-2025 Espressif Systems (Shanghai) CO LTD
# SPDX-License-Identifier: CC0-1.0 # SPDX-License-Identifier: CC0-1.0
import pytest import pytest
from pytest_embedded import Dut from pytest_embedded import Dut
from pytest_embedded_idf.utils import idf_parametrize
configurations = [ configurations = ['noexcept', 'exceptions_rtti']
'noexcept',
'exceptions_rtti'
]
@pytest.mark.esp32
@pytest.mark.esp32c3
@pytest.mark.generic @pytest.mark.generic
@pytest.mark.parametrize('config', configurations, indirect=True) @pytest.mark.parametrize('config', configurations, indirect=True)
@idf_parametrize('target', ['esp32', 'esp32c3'], indirect=['target'])
def test_cxx_static_init_non_pod(dut: Dut) -> None: def test_cxx_static_init_non_pod(dut: Dut) -> None:
dut.run_all_single_board_cases(name=['can use static initializers for non-POD types']) dut.run_all_single_board_cases(name=['can use static initializers for non-POD types'])
@pytest.mark.esp32
@pytest.mark.esp32c3
@pytest.mark.generic @pytest.mark.generic
@pytest.mark.parametrize('config', configurations, indirect=True) @pytest.mark.parametrize('config', configurations, indirect=True)
@idf_parametrize('target', ['esp32', 'esp32c3'], indirect=['target'])
def test_cxx_misc(dut: Dut) -> None: def test_cxx_misc(dut: Dut) -> None:
dut.run_all_single_board_cases(group='misc') dut.run_all_single_board_cases(group='misc')
@pytest.mark.esp32
@pytest.mark.esp32c3
@pytest.mark.generic @pytest.mark.generic
@pytest.mark.parametrize('config', configurations, indirect=True) @pytest.mark.parametrize('config', configurations, indirect=True)
@idf_parametrize('target', ['esp32', 'esp32c3'], indirect=['target'])
def test_cxx_stack_smash(dut: Dut) -> None: def test_cxx_stack_smash(dut: Dut) -> None:
dut.expect_exact('Press ENTER to see the list of tests') dut.expect_exact('Press ENTER to see the list of tests')
dut.write('\"stack smashing protection CXX\"') dut.write('"stack smashing protection CXX"')
dut.expect_exact('Stack smashing protect failure!') dut.expect_exact('Stack smashing protect failure!')
dut.expect_exact('Rebooting...') dut.expect_exact('Rebooting...')

View File

@ -1,12 +1,11 @@
# SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD # SPDX-FileCopyrightText: 2022-2025 Espressif Systems (Shanghai) CO LTD
# SPDX-License-Identifier: CC0-1.0 # SPDX-License-Identifier: CC0-1.0
import pytest import pytest
from pytest_embedded import Dut from pytest_embedded import Dut
from pytest_embedded_idf.utils import idf_parametrize
@pytest.mark.esp32
@pytest.mark.esp32c3
@pytest.mark.generic @pytest.mark.generic
@idf_parametrize('target', ['esp32', 'esp32c3'], indirect=['target'])
def test_cxx_rtti(dut: Dut) -> None: def test_cxx_rtti(dut: Dut) -> None:
dut.run_all_single_board_cases() dut.run_all_single_board_cases()

View File

@ -1,12 +1,10 @@
# SPDX-FileCopyrightText: 2021-2022 Espressif Systems (Shanghai) CO LTD # SPDX-FileCopyrightText: 2021-2025 Espressif Systems (Shanghai) CO LTD
# SPDX-License-Identifier: CC0-1.0 # SPDX-License-Identifier: CC0-1.0
import pytest import pytest
from pytest_embedded import Dut from pytest_embedded import Dut
from pytest_embedded_idf.utils import idf_parametrize
@pytest.mark.esp32
@pytest.mark.esp32s2
@pytest.mark.generic @pytest.mark.generic
@pytest.mark.parametrize( @pytest.mark.parametrize(
'config', 'config',
@ -15,5 +13,6 @@ from pytest_embedded import Dut
], ],
indirect=True, indirect=True,
) )
@idf_parametrize('target', ['esp32', 'esp32s2'], indirect=['target'])
def test_legacy_dac(dut: Dut) -> None: def test_legacy_dac(dut: Dut) -> None:
dut.run_all_single_board_cases() dut.run_all_single_board_cases()

View File

@ -1,11 +1,10 @@
# SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD # SPDX-FileCopyrightText: 2022-2025 Espressif Systems (Shanghai) CO LTD
# SPDX-License-Identifier: Apache-2.0 # SPDX-License-Identifier: Apache-2.0
import pytest import pytest
from pytest_embedded import Dut from pytest_embedded import Dut
from pytest_embedded_idf.utils import idf_parametrize
@pytest.mark.esp32
@pytest.mark.generic @pytest.mark.generic
@pytest.mark.parametrize( @pytest.mark.parametrize(
'config', 'config',
@ -14,6 +13,7 @@ from pytest_embedded import Dut
], ],
indirect=True, indirect=True,
) )
@idf_parametrize('target', ['esp32'], indirect=['target'])
def test_i2s_adc_dac(dut: Dut) -> None: def test_i2s_adc_dac(dut: Dut) -> None:
# ADC_DMA_read test takes more than 30 sec # ADC_DMA_read test takes more than 30 sec
dut.run_all_single_board_cases(timeout=60) dut.run_all_single_board_cases(timeout=60)

View File

@ -1,18 +1,10 @@
# SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD # SPDX-FileCopyrightText: 2022-2025 Espressif Systems (Shanghai) CO LTD
# SPDX-License-Identifier: Apache-2.0 # SPDX-License-Identifier: Apache-2.0
import pytest import pytest
from pytest_embedded import Dut from pytest_embedded import Dut
from pytest_embedded_idf.utils import idf_parametrize
@pytest.mark.esp32
@pytest.mark.esp32s2
@pytest.mark.esp32c3
@pytest.mark.esp32c5
@pytest.mark.esp32s3
@pytest.mark.esp32c6
@pytest.mark.esp32h2
@pytest.mark.esp32p4
@pytest.mark.esp32c61
@pytest.mark.generic @pytest.mark.generic
@pytest.mark.parametrize( @pytest.mark.parametrize(
'config', 'config',
@ -21,5 +13,10 @@ from pytest_embedded import Dut
], ],
indirect=True, indirect=True,
) )
@idf_parametrize(
'target',
['esp32', 'esp32s2', 'esp32c3', 'esp32c5', 'esp32s3', 'esp32c6', 'esp32h2', 'esp32p4', 'esp32c61'],
indirect=['target'],
)
def test_legacy_i2s(dut: Dut) -> None: def test_legacy_i2s(dut: Dut) -> None:
dut.run_all_single_board_cases() dut.run_all_single_board_cases()

View File

@ -1,17 +1,10 @@
# SPDX-FileCopyrightText: 2021-2022 Espressif Systems (Shanghai) CO LTD # SPDX-FileCopyrightText: 2021-2025 Espressif Systems (Shanghai) CO LTD
# SPDX-License-Identifier: CC0-1.0 # SPDX-License-Identifier: CC0-1.0
import pytest import pytest
from pytest_embedded import Dut from pytest_embedded import Dut
from pytest_embedded_idf.utils import idf_parametrize
@pytest.mark.esp32
@pytest.mark.esp32s2
@pytest.mark.esp32s3
@pytest.mark.esp32c3
@pytest.mark.esp32c6
@pytest.mark.esp32h2
@pytest.mark.esp32c5
@pytest.mark.esp32p4
@pytest.mark.adc @pytest.mark.adc
@pytest.mark.parametrize( @pytest.mark.parametrize(
'config', 'config',
@ -20,11 +13,15 @@ from pytest_embedded import Dut
], ],
indirect=True, indirect=True,
) )
@idf_parametrize(
'target',
['esp32', 'esp32s2', 'esp32s3', 'esp32c3', 'esp32c6', 'esp32h2', 'esp32c5', 'esp32p4'],
indirect=['target'],
)
def test_legacy_adc(dut: Dut) -> None: def test_legacy_adc(dut: Dut) -> None:
dut.run_all_single_board_cases() dut.run_all_single_board_cases()
@pytest.mark.esp32c2
@pytest.mark.adc @pytest.mark.adc
@pytest.mark.xtal_26mhz @pytest.mark.xtal_26mhz
@pytest.mark.parametrize( @pytest.mark.parametrize(
@ -34,5 +31,6 @@ def test_legacy_adc(dut: Dut) -> None:
], ],
indirect=True, indirect=True,
) )
@idf_parametrize('target', ['esp32c2'], indirect=['target'])
def test_legacy_adc_esp32c2_xtal_26mhz(dut: Dut) -> None: def test_legacy_adc_esp32c2_xtal_26mhz(dut: Dut) -> None:
dut.run_all_single_board_cases() dut.run_all_single_board_cases()

View File

@ -1,15 +1,10 @@
# SPDX-FileCopyrightText: 2022-2024 Espressif Systems (Shanghai) CO LTD # SPDX-FileCopyrightText: 2022-2025 Espressif Systems (Shanghai) CO LTD
# SPDX-License-Identifier: CC0-1.0 # SPDX-License-Identifier: CC0-1.0
import pytest import pytest
from pytest_embedded import Dut from pytest_embedded import Dut
from pytest_embedded_idf.utils import idf_parametrize
@pytest.mark.esp32
@pytest.mark.esp32s3
@pytest.mark.esp32c5
@pytest.mark.esp32c6
@pytest.mark.esp32h2
@pytest.mark.esp32p4
@pytest.mark.generic @pytest.mark.generic
@pytest.mark.parametrize( @pytest.mark.parametrize(
'config', 'config',
@ -18,5 +13,6 @@ from pytest_embedded import Dut
], ],
indirect=True, indirect=True,
) )
@idf_parametrize('target', ['esp32', 'esp32s3', 'esp32c5', 'esp32c6', 'esp32h2', 'esp32p4'], indirect=['target'])
def test_legacy_mcpwm(dut: Dut) -> None: def test_legacy_mcpwm(dut: Dut) -> None:
dut.run_all_single_board_cases() dut.run_all_single_board_cases()

View File

@ -1,16 +1,10 @@
# SPDX-FileCopyrightText: 2021-2022 Espressif Systems (Shanghai) CO LTD # SPDX-FileCopyrightText: 2021-2025 Espressif Systems (Shanghai) CO LTD
# SPDX-License-Identifier: CC0-1.0 # SPDX-License-Identifier: CC0-1.0
import pytest import pytest
from pytest_embedded import Dut from pytest_embedded import Dut
from pytest_embedded_idf.utils import idf_parametrize
@pytest.mark.esp32
@pytest.mark.esp32s2
@pytest.mark.esp32s3
@pytest.mark.esp32c5
@pytest.mark.esp32c6
@pytest.mark.esp32h2
@pytest.mark.esp32p4
@pytest.mark.generic @pytest.mark.generic
@pytest.mark.parametrize( @pytest.mark.parametrize(
'config', 'config',
@ -19,5 +13,8 @@ from pytest_embedded import Dut
], ],
indirect=True, indirect=True,
) )
@idf_parametrize(
'target', ['esp32', 'esp32s2', 'esp32s3', 'esp32c5', 'esp32c6', 'esp32h2', 'esp32p4'], indirect=['target']
)
def test_legacy_pcnt(dut: Dut) -> None: def test_legacy_pcnt(dut: Dut) -> None:
dut.run_all_single_board_cases(timeout=240) dut.run_all_single_board_cases(timeout=240)

View File

@ -1,20 +1,22 @@
# SPDX-FileCopyrightText: 2021-2022 Espressif Systems (Shanghai) CO LTD # SPDX-FileCopyrightText: 2021-2025 Espressif Systems (Shanghai) CO LTD
# SPDX-License-Identifier: CC0-1.0 # SPDX-License-Identifier: CC0-1.0
import pytest import pytest
from pytest_embedded import Dut from pytest_embedded import Dut
from pytest_embedded_idf.utils import idf_parametrize
@pytest.mark.esp32
@pytest.mark.esp32s2
@pytest.mark.esp32s3
@pytest.mark.esp32c3
@pytest.mark.esp32c5
@pytest.mark.esp32c6
@pytest.mark.esp32h2
@pytest.mark.esp32p4
@pytest.mark.generic @pytest.mark.generic
@pytest.mark.parametrize('config', [ @pytest.mark.parametrize(
'release', 'config',
], indirect=True) [
'release',
],
indirect=True,
)
@idf_parametrize(
'target',
['esp32', 'esp32s2', 'esp32s3', 'esp32c3', 'esp32c5', 'esp32c6', 'esp32h2', 'esp32p4'],
indirect=['target'],
)
def test_legacy_rmt(dut: Dut) -> None: def test_legacy_rmt(dut: Dut) -> None:
dut.run_all_single_board_cases(timeout=120) dut.run_all_single_board_cases(timeout=120)

View File

@ -1,21 +1,22 @@
# SPDX-FileCopyrightText: 2021-2024 Espressif Systems (Shanghai) CO LTD # SPDX-FileCopyrightText: 2021-2025 Espressif Systems (Shanghai) CO LTD
# SPDX-License-Identifier: CC0-1.0 # SPDX-License-Identifier: CC0-1.0
import pytest import pytest
from pytest_embedded import Dut from pytest_embedded import Dut
from pytest_embedded_idf.utils import idf_parametrize
@pytest.mark.esp32s2
@pytest.mark.esp32c3
@pytest.mark.esp32s3
@pytest.mark.esp32c2
@pytest.mark.esp32c6
@pytest.mark.esp32h2
@pytest.mark.esp32p4
@pytest.mark.esp32c5
@pytest.mark.esp32c61
@pytest.mark.generic @pytest.mark.generic
@pytest.mark.parametrize('config', [ @pytest.mark.parametrize(
'release', 'config',
], indirect=True) [
'release',
],
indirect=True,
)
@idf_parametrize(
'target',
['esp32s2', 'esp32c3', 'esp32s3', 'esp32c2', 'esp32c6', 'esp32h2', 'esp32p4', 'esp32c5', 'esp32c61'],
indirect=['target'],
)
def test_legacy_temp_sensor_driver(dut: Dut) -> None: def test_legacy_temp_sensor_driver(dut: Dut) -> None:
dut.run_all_single_board_cases(timeout=120) dut.run_all_single_board_cases(timeout=120)

View File

@ -1,23 +1,22 @@
# SPDX-FileCopyrightText: 2023 Espressif Systems (Shanghai) CO LTD # SPDX-FileCopyrightText: 2023-2025 Espressif Systems (Shanghai) CO LTD
# SPDX-License-Identifier: CC0-1.0 # SPDX-License-Identifier: CC0-1.0
import pytest import pytest
from pytest_embedded_idf import IdfDut from pytest_embedded_idf import IdfDut
from pytest_embedded_idf.utils import idf_parametrize
@pytest.mark.esp32
@pytest.mark.esp32c3
@pytest.mark.esp32c5
@pytest.mark.esp32c6
@pytest.mark.esp32h2
@pytest.mark.esp32s2
@pytest.mark.esp32s3
@pytest.mark.esp32p4
@pytest.mark.generic @pytest.mark.generic
@pytest.mark.parametrize( @pytest.mark.parametrize(
'config', 'config',
[ [
'release', 'release',
], ],
indirect=True) indirect=True,
)
@idf_parametrize(
'target',
['esp32', 'esp32c3', 'esp32c5', 'esp32c6', 'esp32h2', 'esp32s2', 'esp32s3', 'esp32p4'],
indirect=['target'],
)
def test_legacy_sigma_delta(dut: IdfDut) -> None: def test_legacy_sigma_delta(dut: IdfDut) -> None:
dut.run_all_single_board_cases(group='sigma_delta') dut.run_all_single_board_cases(group='sigma_delta')

View File

@ -1,13 +1,18 @@
# SPDX-FileCopyrightText: 2021-2022 Espressif Systems (Shanghai) CO LTD # SPDX-FileCopyrightText: 2021-2025 Espressif Systems (Shanghai) CO LTD
# SPDX-License-Identifier: CC0-1.0 # SPDX-License-Identifier: CC0-1.0
import pytest import pytest
from pytest_embedded import Dut from pytest_embedded import Dut
from pytest_embedded_idf.utils import idf_parametrize
@pytest.mark.supported_targets
@pytest.mark.generic @pytest.mark.generic
@pytest.mark.parametrize('config', [ @pytest.mark.parametrize(
'release', 'config',
], indirect=True) [
'release',
],
indirect=True,
)
@idf_parametrize('target', ['supported_targets'], indirect=['target'])
def test_legacy_timer_driver(dut: Dut) -> None: def test_legacy_timer_driver(dut: Dut) -> None:
dut.run_all_single_board_cases(timeout=120) dut.run_all_single_board_cases(timeout=120)

View File

@ -1,10 +1,10 @@
# SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD # SPDX-FileCopyrightText: 2022-2025 Espressif Systems (Shanghai) CO LTD
# SPDX-License-Identifier: Unlicense OR CC0-1.0 # SPDX-License-Identifier: Unlicense OR CC0-1.0
import pytest import pytest
from pytest_embedded import Dut from pytest_embedded import Dut
from pytest_embedded_idf.utils import idf_parametrize
@pytest.mark.esp32
@pytest.mark.generic @pytest.mark.generic
@pytest.mark.parametrize( @pytest.mark.parametrize(
'config', 'config',
@ -13,5 +13,6 @@ from pytest_embedded import Dut
], ],
indirect=True, indirect=True,
) )
@idf_parametrize('target', ['esp32'], indirect=['target'])
def test_touch_sensor_v1(dut: Dut) -> None: def test_touch_sensor_v1(dut: Dut) -> None:
dut.run_all_single_board_cases(timeout=60) dut.run_all_single_board_cases(timeout=60)

View File

@ -1,11 +1,10 @@
# SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD # SPDX-FileCopyrightText: 2022-2025 Espressif Systems (Shanghai) CO LTD
# SPDX-License-Identifier: Unlicense OR CC0-1.0 # SPDX-License-Identifier: Unlicense OR CC0-1.0
import pytest import pytest
from pytest_embedded import Dut from pytest_embedded import Dut
from pytest_embedded_idf.utils import idf_parametrize
@pytest.mark.esp32s2
@pytest.mark.esp32s3
@pytest.mark.generic @pytest.mark.generic
@pytest.mark.parametrize( @pytest.mark.parametrize(
'config', 'config',
@ -14,5 +13,6 @@ from pytest_embedded import Dut
], ],
indirect=True, indirect=True,
) )
@idf_parametrize('target', ['esp32s2', 'esp32s3'], indirect=['target'])
def test_touch_sensor_v2(dut: Dut) -> None: def test_touch_sensor_v2(dut: Dut) -> None:
dut.run_all_single_board_cases(timeout=120) dut.run_all_single_board_cases(timeout=120)

View File

@ -1,4 +1,4 @@
# SPDX-FileCopyrightText: 2021-2023 Espressif Systems (Shanghai) CO LTD # SPDX-FileCopyrightText: 2021-2025 Espressif Systems (Shanghai) CO LTD
# SPDX-License-Identifier: CC0-1.0 # SPDX-License-Identifier: CC0-1.0
import logging import logging
import subprocess import subprocess
@ -8,15 +8,9 @@ import pytest
from can import Bus from can import Bus
from can import Message from can import Message
from pytest_embedded import Dut from pytest_embedded import Dut
from pytest_embedded_idf.utils import idf_parametrize
@pytest.mark.esp32
@pytest.mark.esp32c3
@pytest.mark.esp32c6
@pytest.mark.esp32h2
@pytest.mark.esp32s2
@pytest.mark.esp32s3
@pytest.mark.esp32p4
@pytest.mark.generic @pytest.mark.generic
@pytest.mark.parametrize( @pytest.mark.parametrize(
'config', 'config',
@ -25,6 +19,9 @@ from pytest_embedded import Dut
], ],
indirect=True, indirect=True,
) )
@idf_parametrize(
'target', ['esp32', 'esp32c3', 'esp32c6', 'esp32h2', 'esp32s2', 'esp32s3', 'esp32p4'], indirect=['target']
)
def test_twai_self(dut: Dut) -> None: def test_twai_self(dut: Dut) -> None:
dut.run_all_single_board_cases(group='twai-loop-back') dut.run_all_single_board_cases(group='twai-loop-back')
@ -36,18 +33,11 @@ def fixture_create_socket_can() -> Bus:
stop_command = 'sudo ip link set can0 down' stop_command = 'sudo ip link set can0 down'
subprocess.run(start_command, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True) subprocess.run(start_command, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True)
bus = Bus(interface='socketcan', channel='can0', bitrate=250000) bus = Bus(interface='socketcan', channel='can0', bitrate=250000)
yield bus # test invoked here yield bus # test invoked here
bus.shutdown() bus.shutdown()
subprocess.run(stop_command, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True) subprocess.run(stop_command, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True)
@pytest.mark.esp32
@pytest.mark.esp32c3
@pytest.mark.esp32c6
@pytest.mark.esp32h2
@pytest.mark.esp32s2
@pytest.mark.esp32s3
@pytest.mark.esp32p4
@pytest.mark.twai_std @pytest.mark.twai_std
@pytest.mark.parametrize( @pytest.mark.parametrize(
'config', 'config',
@ -56,6 +46,9 @@ def fixture_create_socket_can() -> Bus:
], ],
indirect=True, indirect=True,
) )
@idf_parametrize(
'target', ['esp32', 'esp32c3', 'esp32c6', 'esp32h2', 'esp32s2', 'esp32s3', 'esp32p4'], indirect=['target']
)
def test_twai_listen_only(dut: Dut, socket_can: Bus) -> None: def test_twai_listen_only(dut: Dut, socket_can: Bus) -> None:
dut.serial.hard_reset() dut.serial.hard_reset()
dut.expect_exact('Press ENTER to see the list of tests') dut.expect_exact('Press ENTER to see the list of tests')
@ -75,13 +68,6 @@ def test_twai_listen_only(dut: Dut, socket_can: Bus) -> None:
dut.expect_unity_test_output() dut.expect_unity_test_output()
@pytest.mark.esp32
@pytest.mark.esp32c3
@pytest.mark.esp32c6
@pytest.mark.esp32h2
@pytest.mark.esp32s2
@pytest.mark.esp32s3
@pytest.mark.esp32p4
@pytest.mark.twai_std @pytest.mark.twai_std
@pytest.mark.parametrize( @pytest.mark.parametrize(
'config', 'config',
@ -90,6 +76,9 @@ def test_twai_listen_only(dut: Dut, socket_can: Bus) -> None:
], ],
indirect=True, indirect=True,
) )
@idf_parametrize(
'target', ['esp32', 'esp32c3', 'esp32c6', 'esp32h2', 'esp32s2', 'esp32s3', 'esp32p4'], indirect=['target']
)
def test_twai_remote_request(dut: Dut, socket_can: Bus) -> None: def test_twai_remote_request(dut: Dut, socket_can: Bus) -> None:
dut.serial.hard_reset() dut.serial.hard_reset()
dut.expect_exact('Press ENTER to see the list of tests') dut.expect_exact('Press ENTER to see the list of tests')

View File

@ -1,24 +1,27 @@
# SPDX-FileCopyrightText: 2022-2024 Espressif Systems (Shanghai) CO LTD # SPDX-FileCopyrightText: 2022-2025 Espressif Systems (Shanghai) CO LTD
# SPDX-License-Identifier: Unlicense OR CC0-1.0 # SPDX-License-Identifier: Unlicense OR CC0-1.0
import pytest import pytest
from pytest_embedded import Dut from pytest_embedded import Dut
from pytest_embedded_idf.utils import idf_parametrize
@pytest.mark.supported_targets @pytest.mark.temp_skip_ci(
@pytest.mark.temp_skip_ci(targets=['esp32s2', 'esp32s3'], reason='eFuse for S2 and S3 is similar to the C3 chip, so testing on C3 is enough') targets=['esp32s2', 'esp32s3'], reason='eFuse for S2 and S3 is similar to the C3 chip, so testing on C3 is enough'
)
@pytest.mark.generic @pytest.mark.generic
@idf_parametrize('target', ['supported_targets'], indirect=['target'])
def test_efuse(dut: Dut) -> None: def test_efuse(dut: Dut) -> None:
dut.run_all_single_board_cases() dut.run_all_single_board_cases()
@pytest.mark.qemu @pytest.mark.qemu
@pytest.mark.esp32
@pytest.mark.host_test @pytest.mark.host_test
@idf_parametrize('target', ['esp32'], indirect=['target'])
def test_efuse_qemu(dut: Dut) -> None: def test_efuse_qemu(dut: Dut) -> None:
dut.run_all_single_board_cases() dut.run_all_single_board_cases()
@pytest.mark.linux
@pytest.mark.host_test @pytest.mark.host_test
@idf_parametrize('target', ['linux'], indirect=['target'])
def test_efuse_linux(dut: Dut) -> None: def test_efuse_linux(dut: Dut) -> None:
dut.run_all_single_board_cases(timeout=60) dut.run_all_single_board_cases(timeout=60)

View File

@ -1,10 +1,11 @@
# SPDX-FileCopyrightText: 2021-2022 Espressif Systems (Shanghai) CO LTD # SPDX-FileCopyrightText: 2021-2025 Espressif Systems (Shanghai) CO LTD
# SPDX-License-Identifier: Apache-2.0 # SPDX-License-Identifier: Apache-2.0
import pytest import pytest
from pytest_embedded import Dut from pytest_embedded import Dut
from pytest_embedded_idf.utils import idf_parametrize
@pytest.mark.supported_targets
@pytest.mark.generic @pytest.mark.generic
@idf_parametrize('target', ['supported_targets'], indirect=['target'])
def test_esp_tls(dut: Dut) -> None: def test_esp_tls(dut: Dut) -> None:
dut.run_all_single_board_cases() dut.run_all_single_board_cases()

View File

@ -1,29 +1,22 @@
# SPDX-FileCopyrightText: 2021-2024 Espressif Systems (Shanghai) CO LTD # SPDX-FileCopyrightText: 2021-2025 Espressif Systems (Shanghai) CO LTD
# SPDX-License-Identifier: CC0-1.0 # SPDX-License-Identifier: CC0-1.0
import pytest import pytest
from pytest_embedded import Dut from pytest_embedded import Dut
from pytest_embedded_idf.utils import idf_parametrize
@pytest.mark.esp32
@pytest.mark.esp32s2
@pytest.mark.esp32s3
@pytest.mark.esp32c3
@pytest.mark.esp32c6
@pytest.mark.esp32h2
@pytest.mark.esp32c5
@pytest.mark.esp32p4
@pytest.mark.adc @pytest.mark.adc
@pytest.mark.parametrize('config', [ @pytest.mark.parametrize('config', ['iram_safe', 'release', 'pm_enable'], indirect=True)
'iram_safe', @idf_parametrize(
'release', 'target',
'pm_enable' ['esp32', 'esp32s2', 'esp32s3', 'esp32c3', 'esp32c6', 'esp32h2', 'esp32c5', 'esp32p4'],
], indirect=True) indirect=['target'],
)
def test_adc(dut: Dut) -> None: def test_adc(dut: Dut) -> None:
dut.run_all_single_board_cases(timeout=120, reset=True) dut.run_all_single_board_cases(timeout=120, reset=True)
# No PM test, as C2 doesn't support ADC continuous mode # No PM test, as C2 doesn't support ADC continuous mode
@pytest.mark.esp32c2
@pytest.mark.adc @pytest.mark.adc
@pytest.mark.xtal_26mhz @pytest.mark.xtal_26mhz
@pytest.mark.parametrize( @pytest.mark.parametrize(
@ -34,19 +27,19 @@ def test_adc(dut: Dut) -> None:
], ],
indirect=True, indirect=True,
) )
@idf_parametrize('target', ['esp32c2'], indirect=['target'])
def test_adc_esp32c2_xtal_26mhz(dut: Dut) -> None: def test_adc_esp32c2_xtal_26mhz(dut: Dut) -> None:
dut.run_all_single_board_cases(timeout=120, reset=True) dut.run_all_single_board_cases(timeout=120, reset=True)
@pytest.mark.esp32s3
@pytest.mark.esp32c3
@pytest.mark.esp32c6
@pytest.mark.esp32h2
@pytest.mark.esp32c5
@pytest.mark.esp32p4
@pytest.mark.adc @pytest.mark.adc
@pytest.mark.parametrize('config', [ @pytest.mark.parametrize(
'gdma_iram_safe', 'config',
], indirect=True) [
'gdma_iram_safe',
],
indirect=True,
)
@idf_parametrize('target', ['esp32s3', 'esp32c3', 'esp32c6', 'esp32h2', 'esp32c5', 'esp32p4'], indirect=['target'])
def test_adc_gdma_iram(dut: Dut) -> None: def test_adc_gdma_iram(dut: Dut) -> None:
dut.run_all_single_board_cases(timeout=120, reset=True) dut.run_all_single_board_cases(timeout=120, reset=True)

View File

@ -1,18 +1,17 @@
# SPDX-FileCopyrightText: 2022-2024 Espressif Systems (Shanghai) CO LTD # SPDX-FileCopyrightText: 2022-2025 Espressif Systems (Shanghai) CO LTD
# SPDX-License-Identifier: CC0-1.0 # SPDX-License-Identifier: CC0-1.0
import pytest import pytest
from pytest_embedded import Dut from pytest_embedded import Dut
from pytest_embedded_idf.utils import idf_parametrize
@pytest.mark.esp32
@pytest.mark.esp32s2
@pytest.mark.esp32c3
@pytest.mark.generic @pytest.mark.generic
@idf_parametrize('target', ['esp32', 'esp32s2', 'esp32c3'], indirect=['target'])
def test_esp_app_format(dut: Dut) -> None: def test_esp_app_format(dut: Dut) -> None:
dut.expect_unity_test_output() dut.expect_unity_test_output()
@pytest.mark.linux
@pytest.mark.host_test @pytest.mark.host_test
@idf_parametrize('target', ['linux'], indirect=['target'])
def test_esp_app_format_linux(dut: Dut) -> None: def test_esp_app_format_linux(dut: Dut) -> None:
dut.expect_unity_test_output() dut.expect_unity_test_output()

View File

@ -1,10 +1,11 @@
# SPDX-FileCopyrightText: 2023 Espressif Systems (Shanghai) CO LTD # SPDX-FileCopyrightText: 2023-2025 Espressif Systems (Shanghai) CO LTD
# SPDX-License-Identifier: CC0-1.0 # SPDX-License-Identifier: CC0-1.0
import pytest import pytest
from pytest_embedded import Dut from pytest_embedded import Dut
from pytest_embedded_idf.utils import idf_parametrize
@pytest.mark.esp32
@pytest.mark.generic @pytest.mark.generic
@idf_parametrize('target', ['esp32'], indirect=['target'])
def test_esp_bootloader_format(dut: Dut) -> None: def test_esp_bootloader_format(dut: Dut) -> None:
dut.expect_unity_test_output() dut.expect_unity_test_output()

View File

@ -1,30 +1,24 @@
# SPDX-FileCopyrightText: 2022-2024 Espressif Systems (Shanghai) CO LTD # SPDX-FileCopyrightText: 2022-2025 Espressif Systems (Shanghai) CO LTD
# SPDX-License-Identifier: CC0-1.0 # SPDX-License-Identifier: CC0-1.0
from typing import Any from typing import Any
import pytest import pytest
from pytest_embedded import Dut from pytest_embedded import Dut
from pytest_embedded_idf.utils import idf_parametrize
@pytest.mark.generic @pytest.mark.generic
@pytest.mark.supported_targets
@pytest.mark.parametrize( @pytest.mark.parametrize(
'config', 'config',
[ ['default'],
'default'
],
indirect=True, indirect=True,
) )
@idf_parametrize('target', ['supported_targets'], indirect=['target'])
def test_esp_common(dut: Dut) -> None: def test_esp_common(dut: Dut) -> None:
dut.run_all_single_board_cases() dut.run_all_single_board_cases()
# psram noinit attr tests with psram enabled # psram noinit attr tests with psram enabled
@pytest.mark.esp32
@pytest.mark.esp32s2
@pytest.mark.esp32s3
@pytest.mark.esp32p4
@pytest.mark.esp32c5
@pytest.mark.generic @pytest.mark.generic
@pytest.mark.parametrize( @pytest.mark.parametrize(
'config', 'config',
@ -33,35 +27,24 @@ def test_esp_common(dut: Dut) -> None:
], ],
indirect=True, indirect=True,
) )
@idf_parametrize('target', ['esp32', 'esp32s2', 'esp32s3', 'esp32p4', 'esp32c5'], indirect=['target'])
def test_esp_attr_psram_noinit(dut: Dut) -> None: def test_esp_attr_psram_noinit(dut: Dut) -> None:
dut.run_all_single_board_cases() dut.run_all_single_board_cases()
# psram noinit memory tests with psram enabled # psram noinit memory tests with psram enabled
@pytest.mark.esp32
@pytest.mark.esp32s2
@pytest.mark.esp32s3
@pytest.mark.esp32p4
@pytest.mark.esp32c5
@pytest.mark.generic @pytest.mark.generic
@pytest.mark.supported_targets
@pytest.mark.parametrize( @pytest.mark.parametrize(
'config', 'config',
[ ['psram_noinit'],
'psram_noinit'
],
indirect=True, indirect=True,
) )
@idf_parametrize('target', ['supported_targets'], indirect=['target'])
def test_esp_attr_psram_noinit_multiple_stages(case_tester: Any) -> None: def test_esp_attr_psram_noinit_multiple_stages(case_tester: Any) -> None:
case_tester.run_all_multi_stage_cases() case_tester.run_all_multi_stage_cases()
# psram attr tests with psram enabled # psram attr tests with psram enabled
@pytest.mark.esp32
@pytest.mark.esp32s2
@pytest.mark.esp32s3
@pytest.mark.esp32p4
@pytest.mark.esp32c5
@pytest.mark.generic @pytest.mark.generic
@pytest.mark.parametrize( @pytest.mark.parametrize(
'config', 'config',
@ -70,47 +53,42 @@ def test_esp_attr_psram_noinit_multiple_stages(case_tester: Any) -> None:
], ],
indirect=True, indirect=True,
) )
@idf_parametrize('target', ['esp32', 'esp32s2', 'esp32s3', 'esp32p4', 'esp32c5'], indirect=['target'])
def test_esp_attr_psram(dut: Dut) -> None: def test_esp_attr_psram(dut: Dut) -> None:
dut.run_all_single_board_cases() dut.run_all_single_board_cases()
# psram attr tests with xip_psram # psram attr tests with xip_psram
@pytest.mark.esp32s2
@pytest.mark.generic @pytest.mark.generic
@pytest.mark.parametrize( @pytest.mark.parametrize(
'config', 'config',
[ ['xip_psram_esp32s2'],
'xip_psram_esp32s2'
],
indirect=True, indirect=True,
) )
@idf_parametrize('target', ['esp32s2'], indirect=['target'])
def test_esp_attr_xip_psram_esp32s2(dut: Dut) -> None: def test_esp_attr_xip_psram_esp32s2(dut: Dut) -> None:
dut.run_all_single_board_cases() dut.run_all_single_board_cases()
# psram attr tests with xip_psram # psram attr tests with xip_psram
@pytest.mark.esp32s3
@pytest.mark.generic @pytest.mark.generic
@pytest.mark.parametrize( @pytest.mark.parametrize(
'config', 'config',
[ ['xip_psram_esp32s3'],
'xip_psram_esp32s3'
],
indirect=True, indirect=True,
) )
@idf_parametrize('target', ['esp32s3'], indirect=['target'])
def test_esp_attr_xip_psram_esp32s3(dut: Dut) -> None: def test_esp_attr_xip_psram_esp32s3(dut: Dut) -> None:
dut.run_all_single_board_cases() dut.run_all_single_board_cases()
# psram attr tests with xip_psram # psram attr tests with xip_psram
@pytest.mark.esp32p4
@pytest.mark.generic @pytest.mark.generic
@pytest.mark.parametrize( @pytest.mark.parametrize(
'config', 'config',
[ ['xip_psram_esp32p4'],
'xip_psram_esp32p4'
],
indirect=True, indirect=True,
) )
@idf_parametrize('target', ['esp32p4'], indirect=['target'])
def test_esp_attr_xip_psram_esp32p4(dut: Dut) -> None: def test_esp_attr_xip_psram_esp32p4(dut: Dut) -> None:
dut.run_all_single_board_cases() dut.run_all_single_board_cases()

View File

@ -1,13 +1,10 @@
# SPDX-FileCopyrightText: 2023 Espressif Systems (Shanghai) CO LTD # SPDX-FileCopyrightText: 2023-2025 Espressif Systems (Shanghai) CO LTD
# SPDX-License-Identifier: CC0-1.0 # SPDX-License-Identifier: CC0-1.0
import pytest import pytest
from pytest_embedded import Dut from pytest_embedded import Dut
from pytest_embedded_idf.utils import idf_parametrize
@pytest.mark.esp32h2
@pytest.mark.esp32p4
@pytest.mark.esp32c5
@pytest.mark.esp32c61
@pytest.mark.generic @pytest.mark.generic
@pytest.mark.parametrize( @pytest.mark.parametrize(
'config', 'config',
@ -17,5 +14,6 @@ from pytest_embedded import Dut
], ],
indirect=True, indirect=True,
) )
@idf_parametrize('target', ['esp32h2', 'esp32p4', 'esp32c5', 'esp32c61'], indirect=['target'])
def test_ana_cmpr(dut: Dut) -> None: def test_ana_cmpr(dut: Dut) -> None:
dut.run_all_single_board_cases() dut.run_all_single_board_cases()

View File

@ -2,10 +2,10 @@
# SPDX-License-Identifier: CC0-1.0 # SPDX-License-Identifier: CC0-1.0
import pytest import pytest
from pytest_embedded import Dut from pytest_embedded import Dut
from pytest_embedded_idf.utils import idf_parametrize
@pytest.mark.esp32p4
@pytest.mark.esp32c5
@pytest.mark.generic @pytest.mark.generic
@idf_parametrize('target', ['esp32p4', 'esp32c5'], indirect=['target'])
def test_bitscrambler(dut: Dut) -> None: def test_bitscrambler(dut: Dut) -> None:
dut.run_all_single_board_cases() dut.run_all_single_board_cases()

View File

@ -1,10 +1,11 @@
# SPDX-FileCopyrightText: 2024 Espressif Systems (Shanghai) CO LTD # SPDX-FileCopyrightText: 2024-2025 Espressif Systems (Shanghai) CO LTD
# SPDX-License-Identifier: CC0-1.0 # SPDX-License-Identifier: CC0-1.0
import pytest import pytest
from pytest_embedded import Dut from pytest_embedded import Dut
from pytest_embedded_idf.utils import idf_parametrize
@pytest.mark.esp32p4
@pytest.mark.generic @pytest.mark.generic
@idf_parametrize('target', ['esp32p4'], indirect=['target'])
def test_csi(dut: Dut) -> None: def test_csi(dut: Dut) -> None:
dut.run_all_single_board_cases() dut.run_all_single_board_cases()

View File

@ -1,10 +1,11 @@
# SPDX-FileCopyrightText: 2024 Espressif Systems (Shanghai) CO LTD # SPDX-FileCopyrightText: 2024-2025 Espressif Systems (Shanghai) CO LTD
# SPDX-License-Identifier: CC0-1.0 # SPDX-License-Identifier: CC0-1.0
import pytest import pytest
from pytest_embedded import Dut from pytest_embedded import Dut
from pytest_embedded_idf.utils import idf_parametrize
@pytest.mark.esp32p4
@pytest.mark.generic @pytest.mark.generic
@idf_parametrize('target', ['esp32p4'], indirect=['target'])
def test_dvp(dut: Dut) -> None: def test_dvp(dut: Dut) -> None:
dut.run_all_single_board_cases() dut.run_all_single_board_cases()

View File

@ -1,10 +1,11 @@
# SPDX-FileCopyrightText: 2024 Espressif Systems (Shanghai) CO LTD # SPDX-FileCopyrightText: 2024-2025 Espressif Systems (Shanghai) CO LTD
# SPDX-License-Identifier: CC0-1.0 # SPDX-License-Identifier: CC0-1.0
import pytest import pytest
from pytest_embedded import Dut from pytest_embedded import Dut
from pytest_embedded_idf.utils import idf_parametrize
@pytest.mark.esp32p4
@pytest.mark.generic @pytest.mark.generic
@idf_parametrize('target', ['esp32p4'], indirect=['target'])
def test_isp_dvp(dut: Dut) -> None: def test_isp_dvp(dut: Dut) -> None:
dut.run_all_single_board_cases() dut.run_all_single_board_cases()

View File

@ -1,12 +1,10 @@
# SPDX-FileCopyrightText: 2021-2022 Espressif Systems (Shanghai) CO LTD # SPDX-FileCopyrightText: 2021-2025 Espressif Systems (Shanghai) CO LTD
# SPDX-License-Identifier: CC0-1.0 # SPDX-License-Identifier: CC0-1.0
import pytest import pytest
from pytest_embedded import Dut from pytest_embedded import Dut
from pytest_embedded_idf.utils import idf_parametrize
@pytest.mark.esp32
@pytest.mark.esp32s2
@pytest.mark.generic @pytest.mark.generic
@pytest.mark.parametrize( @pytest.mark.parametrize(
'config', 'config',
@ -16,5 +14,6 @@ from pytest_embedded import Dut
], ],
indirect=True, indirect=True,
) )
@idf_parametrize('target', ['esp32', 'esp32s2'], indirect=['target'])
def test_dac(dut: Dut) -> None: def test_dac(dut: Dut) -> None:
dut.run_all_single_board_cases() dut.run_all_single_board_cases()

View File

@ -1,7 +1,8 @@
# SPDX-FileCopyrightText: 2021-2022 Espressif Systems (Shanghai) CO LTD # SPDX-FileCopyrightText: 2021-2025 Espressif Systems (Shanghai) CO LTD
# SPDX-License-Identifier: CC0-1.0 # SPDX-License-Identifier: CC0-1.0
import pytest import pytest
from pytest_embedded_idf import IdfDut from pytest_embedded_idf import IdfDut
from pytest_embedded_idf.utils import idf_parametrize
CONFIGS = [ CONFIGS = [
'iram_safe', 'iram_safe',
@ -9,21 +10,17 @@ CONFIGS = [
] ]
@pytest.mark.supported_targets
@pytest.mark.generic @pytest.mark.generic
@pytest.mark.parametrize('config', CONFIGS, indirect=True) @pytest.mark.parametrize('config', CONFIGS, indirect=True)
@idf_parametrize('target', ['supported_targets'], indirect=['target'])
def test_gpio(dut: IdfDut) -> None: def test_gpio(dut: IdfDut) -> None:
dut.run_all_single_board_cases(group='gpio') dut.run_all_single_board_cases(group='gpio')
@pytest.mark.esp32
@pytest.mark.esp32s2
@pytest.mark.esp32s3
@pytest.mark.esp32c6
@pytest.mark.esp32h2
@pytest.mark.esp32p4
@pytest.mark.esp32c5
@pytest.mark.generic @pytest.mark.generic
@pytest.mark.parametrize('config', CONFIGS, indirect=True) @pytest.mark.parametrize('config', CONFIGS, indirect=True)
@idf_parametrize(
'target', ['esp32', 'esp32s2', 'esp32s3', 'esp32c6', 'esp32h2', 'esp32p4', 'esp32c5'], indirect=['target']
)
def test_rtc_io(dut: IdfDut) -> None: def test_rtc_io(dut: IdfDut) -> None:
dut.run_all_single_board_cases(group='rtcio') dut.run_all_single_board_cases(group='rtcio')

View File

@ -1,7 +1,8 @@
# SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD # SPDX-FileCopyrightText: 2022-2025 Espressif Systems (Shanghai) CO LTD
# SPDX-License-Identifier: CC0-1.0 # SPDX-License-Identifier: CC0-1.0
import pytest import pytest
from pytest_embedded_idf import IdfDut from pytest_embedded_idf import IdfDut
from pytest_embedded_idf.utils import idf_parametrize
CONFIGS = [ CONFIGS = [
'iram_safe', 'iram_safe',
@ -9,31 +10,23 @@ CONFIGS = [
] ]
@pytest.mark.esp32c2
@pytest.mark.esp32c3
@pytest.mark.esp32c5
@pytest.mark.esp32c6
@pytest.mark.esp32c61
@pytest.mark.esp32h2
@pytest.mark.esp32s2
@pytest.mark.esp32s3
@pytest.mark.esp32p4
@pytest.mark.generic @pytest.mark.generic
@pytest.mark.parametrize('config', CONFIGS, indirect=True) @pytest.mark.parametrize('config', CONFIGS, indirect=True)
@idf_parametrize(
'target',
['esp32c2', 'esp32c3', 'esp32c5', 'esp32c6', 'esp32c61', 'esp32h2', 'esp32s2', 'esp32s3', 'esp32p4'],
indirect=['target'],
)
def test_gpio_filter(dut: IdfDut) -> None: def test_gpio_filter(dut: IdfDut) -> None:
dut.run_all_single_board_cases(group='gpio_filter') dut.run_all_single_board_cases(group='gpio_filter')
@pytest.mark.esp32c2
@pytest.mark.esp32c3
@pytest.mark.esp32c5
@pytest.mark.esp32c6
@pytest.mark.esp32c61
@pytest.mark.esp32h2
@pytest.mark.esp32s2
@pytest.mark.esp32s3
@pytest.mark.esp32p4
@pytest.mark.generic @pytest.mark.generic
@pytest.mark.parametrize('config', CONFIGS, indirect=True) @pytest.mark.parametrize('config', CONFIGS, indirect=True)
@idf_parametrize(
'target',
['esp32c2', 'esp32c3', 'esp32c5', 'esp32c6', 'esp32c61', 'esp32h2', 'esp32s2', 'esp32s3', 'esp32p4'],
indirect=['target'],
)
def test_dedic_gpio(dut: IdfDut) -> None: def test_dedic_gpio(dut: IdfDut) -> None:
dut.run_all_single_board_cases(group='dedic_gpio') dut.run_all_single_board_cases(group='dedic_gpio')

View File

@ -1,11 +1,10 @@
# SPDX-FileCopyrightText: 2021-2022 Espressif Systems (Shanghai) CO LTD # SPDX-FileCopyrightText: 2021-2025 Espressif Systems (Shanghai) CO LTD
# SPDX-License-Identifier: CC0-1.0 # SPDX-License-Identifier: CC0-1.0
import pytest import pytest
from pytest_embedded import Dut from pytest_embedded import Dut
from pytest_embedded_idf.utils import idf_parametrize
@pytest.mark.supported_targets
@pytest.mark.generic @pytest.mark.generic
@pytest.mark.parametrize( @pytest.mark.parametrize(
'config', 'config',
@ -15,11 +14,11 @@ from pytest_embedded import Dut
], ],
indirect=True, indirect=True,
) )
@idf_parametrize('target', ['supported_targets'], indirect=['target'])
def test_gptimer(dut: Dut) -> None: def test_gptimer(dut: Dut) -> None:
dut.run_all_single_board_cases() dut.run_all_single_board_cases()
@pytest.mark.esp32c2
@pytest.mark.generic @pytest.mark.generic
@pytest.mark.xtal_26mhz @pytest.mark.xtal_26mhz
@pytest.mark.parametrize( @pytest.mark.parametrize(
@ -29,5 +28,6 @@ def test_gptimer(dut: Dut) -> None:
], ],
indirect=True, indirect=True,
) )
@idf_parametrize('target', ['esp32c2'], indirect=['target'])
def test_gptimer_esp32c2_xtal_26mhz(dut: Dut) -> None: def test_gptimer_esp32c2_xtal_26mhz(dut: Dut) -> None:
dut.run_all_single_board_cases() dut.run_all_single_board_cases()

View File

@ -2,9 +2,9 @@
# SPDX-License-Identifier: CC0-1.0 # SPDX-License-Identifier: CC0-1.0
import pytest import pytest
from pytest_embedded import Dut from pytest_embedded import Dut
from pytest_embedded_idf.utils import idf_parametrize
@pytest.mark.supported_targets
@pytest.mark.generic @pytest.mark.generic
@pytest.mark.parametrize( @pytest.mark.parametrize(
'config', 'config',
@ -14,30 +14,40 @@ from pytest_embedded import Dut
], ],
indirect=True, indirect=True,
) )
@idf_parametrize('target', ['supported_targets'], indirect=['target'])
def test_i2c(dut: Dut) -> None: def test_i2c(dut: Dut) -> None:
dut.run_all_single_board_cases() dut.run_all_single_board_cases()
@pytest.mark.esp32
@pytest.mark.esp32c3
@pytest.mark.esp32c5
@pytest.mark.esp32c6
@pytest.mark.esp32h2
@pytest.mark.esp32p4
@pytest.mark.esp32s2
@pytest.mark.esp32s3
@pytest.mark.generic_multi_device @pytest.mark.generic_multi_device
@pytest.mark.parametrize( @pytest.mark.parametrize(
'count, config', 'count, config',
[ [
(2, 'defaults',), (
(2, 'release',), 2,
(2, 'iram_safe',), 'defaults',
(2, 'slave_v2',), ),
(
2,
'release',
),
(
2,
'iram_safe',
),
(
2,
'slave_v2',
),
], ],
indirect=True indirect=True,
) )
def test_i2c_multi_device(case_tester) -> None: # type: ignore @idf_parametrize(
'target',
['esp32', 'esp32c3', 'esp32c5', 'esp32c6', 'esp32h2', 'esp32p4', 'esp32s2', 'esp32s3'],
indirect=['target'],
)
def test_i2c_multi_device(case_tester) -> None: # type: ignore
for case in case_tester.test_menu: for case in case_tester.test_menu:
if case.attributes.get('test_env', 'generic_multi_device') == 'generic_multi_device': if case.attributes.get('test_env', 'generic_multi_device') == 'generic_multi_device':
case_tester.run_multi_dev_case(case=case, reset=True) case_tester.run_multi_dev_case(case=case, reset=True)

View File

@ -1,18 +1,10 @@
# SPDX-FileCopyrightText: 2022-2024 Espressif Systems (Shanghai) CO LTD # SPDX-FileCopyrightText: 2022-2025 Espressif Systems (Shanghai) CO LTD
# SPDX-License-Identifier: Apache-2.0 # SPDX-License-Identifier: Apache-2.0
import pytest import pytest
from pytest_embedded import Dut from pytest_embedded import Dut
from pytest_embedded_idf.utils import idf_parametrize
@pytest.mark.esp32
@pytest.mark.esp32s2
@pytest.mark.esp32c3
@pytest.mark.esp32c5
@pytest.mark.esp32c6
@pytest.mark.esp32s3
@pytest.mark.esp32h2
@pytest.mark.esp32p4
@pytest.mark.esp32c61
@pytest.mark.generic @pytest.mark.generic
@pytest.mark.parametrize( @pytest.mark.parametrize(
'config', 'config',
@ -22,5 +14,10 @@ from pytest_embedded import Dut
], ],
indirect=True, indirect=True,
) )
@idf_parametrize(
'target',
['esp32', 'esp32s2', 'esp32c3', 'esp32c5', 'esp32c6', 'esp32s3', 'esp32h2', 'esp32p4', 'esp32c61'],
indirect=['target'],
)
def test_i2s(dut: Dut) -> None: def test_i2s(dut: Dut) -> None:
dut.run_all_single_board_cases() dut.run_all_single_board_cases()

View File

@ -1,17 +1,17 @@
# SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD # SPDX-FileCopyrightText: 2022-2025 Espressif Systems (Shanghai) CO LTD
# SPDX-License-Identifier: Unlicense OR CC0-1.0 # SPDX-License-Identifier: Unlicense OR CC0-1.0
import pytest import pytest
from pytest_embedded_idf.utils import idf_parametrize
@pytest.mark.esp32s3
@pytest.mark.esp32c3
@pytest.mark.esp32c5
@pytest.mark.esp32c6
@pytest.mark.esp32h2
@pytest.mark.esp32p4
@pytest.mark.generic_multi_device @pytest.mark.generic_multi_device
@pytest.mark.parametrize('count', [ @pytest.mark.parametrize(
2, 'count',
], indirect=True) [
2,
],
indirect=True,
)
@idf_parametrize('target', ['esp32s3', 'esp32c3', 'esp32c5', 'esp32c6', 'esp32h2', 'esp32p4'], indirect=['target'])
def test_i2s_multi_dev(case_tester) -> None: # type: ignore def test_i2s_multi_dev(case_tester) -> None: # type: ignore
case_tester.run_all_multi_dev_cases(reset=True, timeout=30) case_tester.run_all_multi_dev_cases(reset=True, timeout=30)

View File

@ -1,10 +1,11 @@
# SPDX-FileCopyrightText: 2024 Espressif Systems (Shanghai) CO LTD # SPDX-FileCopyrightText: 2024-2025 Espressif Systems (Shanghai) CO LTD
# SPDX-License-Identifier: Apache-2.0 # SPDX-License-Identifier: Apache-2.0
import pytest import pytest
from pytest_embedded import Dut from pytest_embedded import Dut
from pytest_embedded_idf.utils import idf_parametrize
@pytest.mark.esp32p4
@pytest.mark.lp_i2s @pytest.mark.lp_i2s
@idf_parametrize('target', ['esp32p4'], indirect=['target'])
def test_lp_i2s(dut: Dut) -> None: def test_lp_i2s(dut: Dut) -> None:
dut.run_all_single_board_cases(timeout=200) dut.run_all_single_board_cases(timeout=200)

View File

@ -1,10 +1,10 @@
# SPDX-FileCopyrightText: 2024 Espressif Systems (Shanghai) CO LTD # SPDX-FileCopyrightText: 2024-2025 Espressif Systems (Shanghai) CO LTD
# SPDX-License-Identifier: CC0-1.0 # SPDX-License-Identifier: CC0-1.0
import pytest import pytest
from pytest_embedded import Dut from pytest_embedded import Dut
from pytest_embedded_idf.utils import idf_parametrize
@pytest.mark.esp32p4
@pytest.mark.generic @pytest.mark.generic
@pytest.mark.parametrize( @pytest.mark.parametrize(
'config', 'config',
@ -13,5 +13,6 @@ from pytest_embedded import Dut
], ],
indirect=True, indirect=True,
) )
@idf_parametrize('target', ['esp32p4'], indirect=['target'])
def test_jpeg(dut: Dut) -> None: def test_jpeg(dut: Dut) -> None:
dut.run_all_single_board_cases() dut.run_all_single_board_cases()

View File

@ -1,12 +1,11 @@
# SPDX-FileCopyrightText: 2021-2024 Espressif Systems (Shanghai) CO LTD # SPDX-FileCopyrightText: 2021-2025 Espressif Systems (Shanghai) CO LTD
# SPDX-License-Identifier: CC0-1.0 # SPDX-License-Identifier: CC0-1.0
import pytest import pytest
from pytest_embedded_idf import IdfDut from pytest_embedded_idf import IdfDut
from pytest_embedded_idf.utils import idf_parametrize
@pytest.mark.supported_targets @pytest.mark.temp_skip_ci(targets=['esp32s3'], reason='skip due to duplication with test_ledc_psram')
@pytest.mark.temp_skip_ci(targets=['esp32s3'],
reason='skip due to duplication with test_ledc_psram')
@pytest.mark.generic @pytest.mark.generic
@pytest.mark.parametrize( @pytest.mark.parametrize(
'config', 'config',
@ -16,11 +15,11 @@ from pytest_embedded_idf import IdfDut
], ],
indirect=True, indirect=True,
) )
@idf_parametrize('target', ['supported_targets'], indirect=['target'])
def test_ledc(dut: IdfDut) -> None: def test_ledc(dut: IdfDut) -> None:
dut.run_all_single_board_cases(reset=True) dut.run_all_single_board_cases(reset=True)
@pytest.mark.esp32s3
@pytest.mark.octal_psram @pytest.mark.octal_psram
@pytest.mark.parametrize( @pytest.mark.parametrize(
'config', 'config',
@ -30,21 +29,29 @@ def test_ledc(dut: IdfDut) -> None:
], ],
indirect=True, indirect=True,
) )
@idf_parametrize('target', ['esp32s3'], indirect=['target'])
def test_ledc_psram(dut: IdfDut) -> None: def test_ledc_psram(dut: IdfDut) -> None:
dut.run_all_single_board_cases(reset=True) dut.run_all_single_board_cases(reset=True)
@pytest.mark.supported_targets @pytest.mark.temp_skip_ci(
@pytest.mark.temp_skip_ci(targets=['esp32s3', 'esp32c61'], targets=['esp32s3', 'esp32c61'], reason='s3 multi device runner has no psram, c61 lack of runner IDF-10949'
reason='s3 multi device runner has no psram, c61 lack of runner IDF-10949') )
@pytest.mark.generic_multi_device @pytest.mark.generic_multi_device
@pytest.mark.parametrize( @pytest.mark.parametrize(
'count, config', 'count, config',
[ [
(2, 'iram_safe',), (
(2, 'release',), 2,
'iram_safe',
),
(
2,
'release',
),
], ],
indirect=True indirect=True,
) )
def test_ledc_multi_device(case_tester) -> None: # type: ignore @idf_parametrize('target', ['supported_targets'], indirect=['target'])
def test_ledc_multi_device(case_tester) -> None: # type: ignore
case_tester.run_all_multi_dev_cases(reset=True) case_tester.run_all_multi_dev_cases(reset=True)

View File

@ -1,15 +1,10 @@
# SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD # SPDX-FileCopyrightText: 2022-2025 Espressif Systems (Shanghai) CO LTD
# SPDX-License-Identifier: CC0-1.0 # SPDX-License-Identifier: CC0-1.0
import pytest import pytest
from pytest_embedded import Dut from pytest_embedded import Dut
from pytest_embedded_idf.utils import idf_parametrize
@pytest.mark.esp32
@pytest.mark.esp32s3
@pytest.mark.esp32c5
@pytest.mark.esp32c6
@pytest.mark.esp32h2
@pytest.mark.esp32p4
@pytest.mark.generic @pytest.mark.generic
@pytest.mark.parametrize( @pytest.mark.parametrize(
'config', 'config',
@ -19,5 +14,6 @@ from pytest_embedded import Dut
], ],
indirect=True, indirect=True,
) )
@idf_parametrize('target', ['esp32', 'esp32s3', 'esp32c5', 'esp32c6', 'esp32h2', 'esp32p4'], indirect=['target'])
def test_mcpwm(dut: Dut) -> None: def test_mcpwm(dut: Dut) -> None:
dut.run_all_single_board_cases() dut.run_all_single_board_cases()

View File

@ -1,13 +1,10 @@
# SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD # SPDX-FileCopyrightText: 2022-2025 Espressif Systems (Shanghai) CO LTD
# SPDX-License-Identifier: CC0-1.0 # SPDX-License-Identifier: CC0-1.0
import pytest import pytest
from pytest_embedded import Dut from pytest_embedded import Dut
from pytest_embedded_idf.utils import idf_parametrize
@pytest.mark.esp32c5
@pytest.mark.esp32c6
@pytest.mark.esp32h2
@pytest.mark.esp32p4
@pytest.mark.generic @pytest.mark.generic
@pytest.mark.parametrize( @pytest.mark.parametrize(
'config', 'config',
@ -17,5 +14,6 @@ from pytest_embedded import Dut
], ],
indirect=True, indirect=True,
) )
@idf_parametrize('target', ['esp32c5', 'esp32c6', 'esp32h2', 'esp32p4'], indirect=['target'])
def test_parlio(dut: Dut) -> None: def test_parlio(dut: Dut) -> None:
dut.run_all_single_board_cases() dut.run_all_single_board_cases()

View File

@ -1,16 +1,10 @@
# SPDX-FileCopyrightText: 2021-2022 Espressif Systems (Shanghai) CO LTD # SPDX-FileCopyrightText: 2021-2025 Espressif Systems (Shanghai) CO LTD
# SPDX-License-Identifier: CC0-1.0 # SPDX-License-Identifier: CC0-1.0
import pytest import pytest
from pytest_embedded import Dut from pytest_embedded import Dut
from pytest_embedded_idf.utils import idf_parametrize
@pytest.mark.esp32
@pytest.mark.esp32s2
@pytest.mark.esp32s3
@pytest.mark.esp32c5
@pytest.mark.esp32c6
@pytest.mark.esp32h2
@pytest.mark.esp32p4
@pytest.mark.generic @pytest.mark.generic
@pytest.mark.parametrize( @pytest.mark.parametrize(
'config', 'config',
@ -20,5 +14,8 @@ from pytest_embedded import Dut
], ],
indirect=True, indirect=True,
) )
@idf_parametrize(
'target', ['esp32', 'esp32s2', 'esp32s3', 'esp32c5', 'esp32c6', 'esp32h2', 'esp32p4'], indirect=['target']
)
def test_pulse_cnt(dut: Dut) -> None: def test_pulse_cnt(dut: Dut) -> None:
dut.run_all_single_board_cases() dut.run_all_single_board_cases()

View File

@ -1,10 +1,10 @@
# SPDX-FileCopyrightText: 2024 Espressif Systems (Shanghai) CO LTD # SPDX-FileCopyrightText: 2024-2025 Espressif Systems (Shanghai) CO LTD
# SPDX-License-Identifier: CC0-1.0 # SPDX-License-Identifier: CC0-1.0
import pytest import pytest
from pytest_embedded import Dut from pytest_embedded import Dut
from pytest_embedded_idf.utils import idf_parametrize
@pytest.mark.esp32p4
@pytest.mark.generic @pytest.mark.generic
@pytest.mark.parametrize( @pytest.mark.parametrize(
'config', 'config',
@ -13,5 +13,6 @@ from pytest_embedded import Dut
], ],
indirect=True, indirect=True,
) )
@idf_parametrize('target', ['esp32p4'], indirect=['target'])
def test_ppa(dut: Dut) -> None: def test_ppa(dut: Dut) -> None:
dut.run_all_single_board_cases() dut.run_all_single_board_cases()

View File

@ -1,16 +1,10 @@
# SPDX-FileCopyrightText: 2021-2024 Espressif Systems (Shanghai) CO LTD # SPDX-FileCopyrightText: 2021-2025 Espressif Systems (Shanghai) CO LTD
# SPDX-License-Identifier: CC0-1.0 # SPDX-License-Identifier: CC0-1.0
import pytest import pytest
from pytest_embedded import Dut from pytest_embedded import Dut
from pytest_embedded_idf.utils import idf_parametrize
@pytest.mark.esp32
@pytest.mark.esp32s2
@pytest.mark.esp32c3
@pytest.mark.esp32c5
@pytest.mark.esp32c6
@pytest.mark.esp32h2
@pytest.mark.esp32p4
@pytest.mark.generic @pytest.mark.generic
@pytest.mark.parametrize( @pytest.mark.parametrize(
'config', 'config',
@ -20,11 +14,13 @@ from pytest_embedded import Dut
], ],
indirect=True, indirect=True,
) )
@idf_parametrize(
'target', ['esp32', 'esp32s2', 'esp32c3', 'esp32c5', 'esp32c6', 'esp32h2', 'esp32p4'], indirect=['target']
)
def test_rmt(dut: Dut) -> None: def test_rmt(dut: Dut) -> None:
dut.run_all_single_board_cases() dut.run_all_single_board_cases()
@pytest.mark.esp32s3
@pytest.mark.octal_psram @pytest.mark.octal_psram
@pytest.mark.parametrize( @pytest.mark.parametrize(
'config', 'config',
@ -34,5 +30,6 @@ def test_rmt(dut: Dut) -> None:
], ],
indirect=True, indirect=True,
) )
@idf_parametrize('target', ['esp32s3'], indirect=['target'])
def test_rmt_psram(dut: Dut) -> None: def test_rmt_psram(dut: Dut) -> None:
dut.run_all_single_board_cases() dut.run_all_single_board_cases()

View File

@ -1,4 +1,4 @@
# SPDX-FileCopyrightText: 2022-2024 Espressif Systems (Shanghai) CO LTD # SPDX-FileCopyrightText: 2022-2025 Espressif Systems (Shanghai) CO LTD
# SPDX-License-Identifier: CC0-1.0 # SPDX-License-Identifier: CC0-1.0
import os.path import os.path
from typing import List from typing import List
@ -16,8 +16,18 @@ def parameter_expand(existing_parameters: List[List[str]], value_list: List[str]
return ret return ret
esp32_32_param = [[f'{os.path.join(os.path.dirname(__file__), "host_sdmmc")}|{os.path.join(os.path.dirname(__file__), "sdio")}', 'esp32|esp32']] esp32_32_param = [
esp32_c6_param = [[f'{os.path.join(os.path.dirname(__file__), "host_sdmmc")}|{os.path.join(os.path.dirname(__file__), "sdio")}', 'esp32|esp32c6']] [
f'{os.path.join(os.path.dirname(__file__), "host_sdmmc")}|{os.path.join(os.path.dirname(__file__), "sdio")}',
'esp32|esp32',
]
]
esp32_c6_param = [
[
f'{os.path.join(os.path.dirname(__file__), "host_sdmmc")}|{os.path.join(os.path.dirname(__file__), "sdio")}',
'esp32|esp32c6',
]
]
esp32_param_default = [pytest.param(*param) for param in parameter_expand(esp32_32_param, ['default|default'])] esp32_param_default = [pytest.param(*param) for param in parameter_expand(esp32_32_param, ['default|default'])]
c6_param_default = [pytest.param(*param) for param in parameter_expand(esp32_c6_param, ['default|default'])] c6_param_default = [pytest.param(*param) for param in parameter_expand(esp32_c6_param, ['default|default'])]
@ -26,7 +36,7 @@ c6_param_retention = [pytest.param(*param) for param in parameter_expand(esp32_c
# Normal tests # Normal tests
def test_sdio_flow(dut:Tuple[IdfDut, IdfDut]) -> None: def test_sdio_flow(dut: Tuple[IdfDut, IdfDut]) -> None:
dut[1].expect('Press ENTER to see the list of tests') dut[1].expect('Press ENTER to see the list of tests')
dut[1].write('[sdio]') dut[1].write('[sdio]')
dut[1].expect('test_sdio: slave ready') dut[1].expect('test_sdio: slave ready')
@ -38,24 +48,34 @@ def test_sdio_flow(dut:Tuple[IdfDut, IdfDut]) -> None:
dut[0].expect_unity_test_output() dut[0].expect_unity_test_output()
@pytest.mark.esp32c6
@pytest.mark.sdio_multidev_32_c6 @pytest.mark.sdio_multidev_32_c6
@pytest.mark.parametrize('count', [2,], indirect=True) @pytest.mark.parametrize(
'count',
[
2,
],
indirect=True,
)
@pytest.mark.parametrize('app_path, target, config', c6_param_default, indirect=True) @pytest.mark.parametrize('app_path, target, config', c6_param_default, indirect=True)
def test_sdio_esp32_esp32c6(dut:Tuple[IdfDut, IdfDut]) -> None: def test_sdio_esp32_esp32c6(dut: Tuple[IdfDut, IdfDut]) -> None:
test_sdio_flow(dut) test_sdio_flow(dut)
@pytest.mark.esp32
@pytest.mark.sdio_master_slave @pytest.mark.sdio_master_slave
@pytest.mark.parametrize('count', [2,], indirect=True) @pytest.mark.parametrize(
'count',
[
2,
],
indirect=True,
)
@pytest.mark.parametrize('app_path, target, config', esp32_param_default, indirect=True) @pytest.mark.parametrize('app_path, target, config', esp32_param_default, indirect=True)
def test_sdio_esp32_esp32(dut:Tuple[IdfDut, IdfDut]) -> None: def test_sdio_esp32_esp32(dut: Tuple[IdfDut, IdfDut]) -> None:
test_sdio_flow(dut) test_sdio_flow(dut)
# From host speed tests # From host speed tests
def test_sdio_speed_frhost_flow(dut:Tuple[IdfDut, IdfDut], expected_4b_speed:int, expected_1b_speed:int) -> None: def test_sdio_speed_frhost_flow(dut: Tuple[IdfDut, IdfDut], expected_4b_speed: int, expected_1b_speed: int) -> None:
dut[1].expect('Press ENTER to see the list of tests') dut[1].expect('Press ENTER to see the list of tests')
dut[1].write('"SDIO_Slave: test from host (Performance)"') dut[1].write('"SDIO_Slave: test from host (Performance)"')
dut[1].expect('test_sdio: slave ready') dut[1].expect('test_sdio: slave ready')
@ -66,32 +86,42 @@ def test_sdio_speed_frhost_flow(dut:Tuple[IdfDut, IdfDut], expected_4b_speed:int
dut[0].expect('Probe using SD 4-bit') dut[0].expect('Probe using SD 4-bit')
res = dut[0].expect(r'Throughput: compensated (\d+)') res = dut[0].expect(r'Throughput: compensated (\d+)')
frhost_speed_4bit = res.group(1).decode('utf8') frhost_speed_4bit = res.group(1).decode('utf8')
assert (int(frhost_speed_4bit) > expected_4b_speed) assert int(frhost_speed_4bit) > expected_4b_speed
dut[0].expect('Probe using SD 1-bit') dut[0].expect('Probe using SD 1-bit')
res = dut[0].expect(r'Throughput: compensated (\d+)') res = dut[0].expect(r'Throughput: compensated (\d+)')
frhost_speed_1bit = res.group(1).decode('utf8') frhost_speed_1bit = res.group(1).decode('utf8')
assert (int(frhost_speed_1bit) > expected_1b_speed) assert int(frhost_speed_1bit) > expected_1b_speed
@pytest.mark.esp32c6
@pytest.mark.sdio_multidev_32_c6 @pytest.mark.sdio_multidev_32_c6
@pytest.mark.parametrize('count', [2,], indirect=True) @pytest.mark.parametrize(
'count',
[
2,
],
indirect=True,
)
@pytest.mark.parametrize('app_path, target, config', c6_param_default, indirect=True) @pytest.mark.parametrize('app_path, target, config', c6_param_default, indirect=True)
def test_sdio_speed_frhost_esp32_esp32c6(dut:Tuple[IdfDut, IdfDut]) -> None: def test_sdio_speed_frhost_esp32_esp32c6(dut: Tuple[IdfDut, IdfDut]) -> None:
test_sdio_speed_frhost_flow(dut, 10000, 4000) test_sdio_speed_frhost_flow(dut, 10000, 4000)
@pytest.mark.esp32
@pytest.mark.sdio_master_slave @pytest.mark.sdio_master_slave
@pytest.mark.parametrize('count', [2,], indirect=True) @pytest.mark.parametrize(
'count',
[
2,
],
indirect=True,
)
@pytest.mark.parametrize('app_path, target, config', esp32_param_default, indirect=True) @pytest.mark.parametrize('app_path, target, config', esp32_param_default, indirect=True)
def test_sdio_speed_frhost_esp32_esp32(dut:Tuple[IdfDut, IdfDut]) -> None: def test_sdio_speed_frhost_esp32_esp32(dut: Tuple[IdfDut, IdfDut]) -> None:
test_sdio_speed_frhost_flow(dut, 12200, 4000) test_sdio_speed_frhost_flow(dut, 12200, 4000)
# To host speed tests # To host speed tests
def test_sdio_speed_tohost_flow(dut:Tuple[IdfDut, IdfDut], expected_4b_speed:int, expected_1b_speed:int) -> None: def test_sdio_speed_tohost_flow(dut: Tuple[IdfDut, IdfDut], expected_4b_speed: int, expected_1b_speed: int) -> None:
dut[1].expect('Press ENTER to see the list of tests') dut[1].expect('Press ENTER to see the list of tests')
dut[1].write('"SDIO_Slave: test to host (Performance)"') dut[1].write('"SDIO_Slave: test to host (Performance)"')
dut[1].expect('test_sdio: slave ready') dut[1].expect('test_sdio: slave ready')
@ -102,32 +132,42 @@ def test_sdio_speed_tohost_flow(dut:Tuple[IdfDut, IdfDut], expected_4b_speed:int
dut[0].expect('Probe using SD 4-bit') dut[0].expect('Probe using SD 4-bit')
res = dut[0].expect(r'Throughput: compensated (\d+)') res = dut[0].expect(r'Throughput: compensated (\d+)')
tohost_speed_4bit = res.group(1).decode('utf8') tohost_speed_4bit = res.group(1).decode('utf8')
assert (int(tohost_speed_4bit) > expected_4b_speed) assert int(tohost_speed_4bit) > expected_4b_speed
dut[0].expect('Probe using SD 1-bit') dut[0].expect('Probe using SD 1-bit')
res = dut[0].expect(r'Throughput: compensated (\d+)') res = dut[0].expect(r'Throughput: compensated (\d+)')
tohost_speed_1bit = res.group(1).decode('utf8') tohost_speed_1bit = res.group(1).decode('utf8')
assert (int(tohost_speed_1bit) > expected_1b_speed) assert int(tohost_speed_1bit) > expected_1b_speed
@pytest.mark.esp32c6
@pytest.mark.sdio_multidev_32_c6 @pytest.mark.sdio_multidev_32_c6
@pytest.mark.parametrize('count', [2,], indirect=True) @pytest.mark.parametrize(
'count',
[
2,
],
indirect=True,
)
@pytest.mark.parametrize('app_path, target, config', c6_param_default, indirect=True) @pytest.mark.parametrize('app_path, target, config', c6_param_default, indirect=True)
def test_sdio_speed_tohost_esp32_esp32c6(dut:Tuple[IdfDut, IdfDut]) -> None: def test_sdio_speed_tohost_esp32_esp32c6(dut: Tuple[IdfDut, IdfDut]) -> None:
test_sdio_speed_tohost_flow(dut, 9000, 4000) test_sdio_speed_tohost_flow(dut, 9000, 4000)
@pytest.mark.esp32
@pytest.mark.sdio_master_slave @pytest.mark.sdio_master_slave
@pytest.mark.parametrize('count', [2,], indirect=True) @pytest.mark.parametrize(
'count',
[
2,
],
indirect=True,
)
@pytest.mark.parametrize('app_path, target, config', esp32_param_default, indirect=True) @pytest.mark.parametrize('app_path, target, config', esp32_param_default, indirect=True)
def test_sdio_speed_tohost_esp32_esp32(dut:Tuple[IdfDut, IdfDut]) -> None: def test_sdio_speed_tohost_esp32_esp32(dut: Tuple[IdfDut, IdfDut]) -> None:
test_sdio_speed_tohost_flow(dut, 12200, 4000) test_sdio_speed_tohost_flow(dut, 12200, 4000)
# Retention tests # Retention tests
def test_sdio_retention(dut:Tuple[IdfDut, IdfDut]) -> None: def test_sdio_retention(dut: Tuple[IdfDut, IdfDut]) -> None:
dut[1].expect('Press ENTER to see the list of tests') dut[1].expect('Press ENTER to see the list of tests')
dut[1].write('[sdio_retention]') dut[1].write('[sdio_retention]')
dut[1].expect('test_sdio: slave ready') dut[1].expect('test_sdio: slave ready')
@ -139,9 +179,14 @@ def test_sdio_retention(dut:Tuple[IdfDut, IdfDut]) -> None:
dut[0].expect_unity_test_output() dut[0].expect_unity_test_output()
@pytest.mark.esp32c6
@pytest.mark.sdio_multidev_32_c6 @pytest.mark.sdio_multidev_32_c6
@pytest.mark.parametrize('count', [2,], indirect=True) @pytest.mark.parametrize(
'count',
[
2,
],
indirect=True,
)
@pytest.mark.parametrize('app_path, target, config', c6_param_retention, indirect=True) @pytest.mark.parametrize('app_path, target, config', c6_param_retention, indirect=True)
def test_sdio_retention_esp32_esp32c6(dut:Tuple[IdfDut, IdfDut]) -> None: def test_sdio_retention_esp32_esp32c6(dut: Tuple[IdfDut, IdfDut]) -> None:
test_sdio_retention(dut) test_sdio_retention(dut)

View File

@ -1,7 +1,8 @@
# SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD # SPDX-FileCopyrightText: 2022-2025 Espressif Systems (Shanghai) CO LTD
# SPDX-License-Identifier: CC0-1.0 # SPDX-License-Identifier: CC0-1.0
import pytest import pytest
from pytest_embedded_idf import IdfDut from pytest_embedded_idf import IdfDut
from pytest_embedded_idf.utils import idf_parametrize
CONFIGS = [ CONFIGS = [
'iram_safe', 'iram_safe',
@ -9,16 +10,12 @@ CONFIGS = [
] ]
@pytest.mark.esp32
@pytest.mark.esp32c3
@pytest.mark.esp32c5
@pytest.mark.esp32c6
@pytest.mark.esp32h2
@pytest.mark.esp32s2
@pytest.mark.esp32s3
@pytest.mark.esp32h2
@pytest.mark.esp32p4
@pytest.mark.generic @pytest.mark.generic
@pytest.mark.parametrize('config', CONFIGS, indirect=True) @pytest.mark.parametrize('config', CONFIGS, indirect=True)
@idf_parametrize(
'target',
['esp32', 'esp32c3', 'esp32c5', 'esp32c6', 'esp32h2', 'esp32s2', 'esp32s3', 'esp32h2', 'esp32p4'],
indirect=['target'],
)
def test_sdm(dut: IdfDut) -> None: def test_sdm(dut: IdfDut) -> None:
dut.run_all_single_board_cases(group='sdm') dut.run_all_single_board_cases(group='sdm')

View File

@ -1,13 +1,12 @@
# SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD # SPDX-FileCopyrightText: 2022-2025 Espressif Systems (Shanghai) CO LTD
# SPDX-License-Identifier: CC0-1.0 # SPDX-License-Identifier: CC0-1.0
import pytest import pytest
from pytest_embedded_idf import IdfDut from pytest_embedded_idf import IdfDut
from pytest_embedded_idf.utils import idf_parametrize
@pytest.mark.esp32
@pytest.mark.esp32s3
@pytest.mark.esp32p4
@pytest.mark.sdcard @pytest.mark.sdcard
@idf_parametrize('target', ['esp32', 'esp32s3', 'esp32p4'], indirect=['target'])
def test_sdmmc(dut: IdfDut) -> None: def test_sdmmc(dut: IdfDut) -> None:
# SDMMC driver can't be reinitialized if the test fails, # SDMMC driver can't be reinitialized if the test fails,
# so we need to reset the board between tests to avoid failing # so we need to reset the board between tests to avoid failing

View File

@ -1,15 +1,12 @@
# SPDX-FileCopyrightText: 2022-2024 Espressif Systems (Shanghai) CO LTD # SPDX-FileCopyrightText: 2022-2025 Espressif Systems (Shanghai) CO LTD
# SPDX-License-Identifier: CC0-1.0 # SPDX-License-Identifier: CC0-1.0
import pytest import pytest
from pytest_embedded_idf import IdfDut from pytest_embedded_idf import IdfDut
from pytest_embedded_idf.utils import idf_parametrize
@pytest.mark.temp_skip_ci(targets=['esp32c61'], reason='C5 C61 GPSPI same, so testing on C5 is enough') @pytest.mark.temp_skip_ci(targets=['esp32c61'], reason='C5 C61 GPSPI same, so testing on C5 is enough')
@pytest.mark.esp32
@pytest.mark.esp32s3
@pytest.mark.esp32c3
@pytest.mark.esp32p4
@pytest.mark.esp32c5
@pytest.mark.sdcard_spimode @pytest.mark.sdcard_spimode
@idf_parametrize('target', ['esp32', 'esp32s3', 'esp32c3', 'esp32p4', 'esp32c5'], indirect=['target'])
def test_sdspi(dut: IdfDut) -> None: def test_sdspi(dut: IdfDut) -> None:
dut.run_all_single_board_cases(reset=True) dut.run_all_single_board_cases(reset=True)

View File

@ -1,13 +1,22 @@
# SPDX-FileCopyrightText: 2021-2024 Espressif Systems (Shanghai) CO LTD # SPDX-FileCopyrightText: 2021-2025 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.utils import idf_parametrize
# If `test_env` is define, should not run on generic runner # If `test_env` is define, should not run on generic runner
@pytest.mark.supported_targets
@pytest.mark.generic @pytest.mark.generic
@pytest.mark.parametrize('config', ['release', 'freertos_compliance', 'freertos_flash',], indirect=True) @pytest.mark.parametrize(
def test_master_single_dev(case_tester) -> None: # type: ignore 'config',
[
'release',
'freertos_compliance',
'freertos_flash',
],
indirect=True,
)
@idf_parametrize('target', ['supported_targets'], indirect=['target'])
def test_master_single_dev(case_tester) -> None: # type: ignore
for case in case_tester.test_menu: for case in case_tester.test_menu:
if 'test_env' in case.attributes: if 'test_env' in case.attributes:
continue continue
@ -15,10 +24,16 @@ def test_master_single_dev(case_tester) -> None: # type: ignore
# Job for test_env `external_flash` just for esp32 only # Job for test_env `external_flash` just for esp32 only
@pytest.mark.esp32
@pytest.mark.flash_multi @pytest.mark.flash_multi
@pytest.mark.parametrize('config', ['release',], indirect=True) @pytest.mark.parametrize(
def test_master_esp_flash(case_tester) -> None: # type: ignore 'config',
[
'release',
],
indirect=True,
)
@idf_parametrize('target', ['esp32'], indirect=['target'])
def test_master_esp_flash(case_tester) -> None: # type: ignore
for case in case_tester.test_menu: for case in case_tester.test_menu:
# test case `spi_bus_lock_with_flash` use difference test env # test case `spi_bus_lock_with_flash` use difference test env
if case.attributes.get('test_env') == 'external_flash': if case.attributes.get('test_env') == 'external_flash':
@ -28,19 +43,28 @@ def test_master_esp_flash(case_tester) -> None: # type: ignore
# if `test_env` not defined, will run on `generic_multi_device` by default # if `test_env` not defined, will run on `generic_multi_device` by default
# TODO: [ESP32C61] IDF-10949 # TODO: [ESP32C61] IDF-10949
@pytest.mark.temp_skip_ci(targets=['esp32c61'], reason='no multi-dev runner') @pytest.mark.temp_skip_ci(targets=['esp32c61'], reason='no multi-dev runner')
@pytest.mark.supported_targets
@pytest.mark.generic_multi_device @pytest.mark.generic_multi_device
@pytest.mark.parametrize( @pytest.mark.parametrize(
'count, config', 'count, config',
[ [
(2, 'release',), (
(2, 'freertos_compliance',), 2,
(2, 'freertos_flash',), 'release',
),
(
2,
'freertos_compliance',
),
(
2,
'freertos_flash',
),
(2, 'iram_safe'), (2, 'iram_safe'),
], ],
indirect=True indirect=True,
) )
def test_master_multi_dev(case_tester) -> None: # type: ignore @idf_parametrize('target', ['supported_targets'], indirect=['target'])
def test_master_multi_dev(case_tester) -> None: # type: ignore
for case in case_tester.test_menu: for case in case_tester.test_menu:
if case.attributes.get('test_env', 'generic_multi_device') == 'generic_multi_device': if case.attributes.get('test_env', 'generic_multi_device') == 'generic_multi_device':
case_tester.run_multi_dev_case(case=case, reset=True) case_tester.run_multi_dev_case(case=case, reset=True)

View File

@ -1,12 +1,13 @@
# SPDX-FileCopyrightText: 2021-2022 Espressif Systems (Shanghai) CO LTD # SPDX-FileCopyrightText: 2021-2025 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.utils import idf_parametrize
# If `test_env` is define, should not run on generic runner # If `test_env` is define, should not run on generic runner
@pytest.mark.supported_targets
@pytest.mark.generic @pytest.mark.generic
def test_param_single_dev(case_tester) -> None: # type: ignore @idf_parametrize('target', ['supported_targets'], indirect=['target'])
def test_param_single_dev(case_tester) -> None: # type: ignore
for case in case_tester.test_menu: for case in case_tester.test_menu:
if 'test_env' in case.attributes: if 'test_env' in case.attributes:
continue continue
@ -16,10 +17,16 @@ def test_param_single_dev(case_tester) -> None: # type: ignore
# if `test_env` not defined, will run on `generic_multi_device` by default # if `test_env` not defined, will run on `generic_multi_device` by default
# TODO: [ESP32C61] IDF-10949 # TODO: [ESP32C61] IDF-10949
@pytest.mark.temp_skip_ci(targets=['esp32c61'], reason='no multi-dev runner') @pytest.mark.temp_skip_ci(targets=['esp32c61'], reason='no multi-dev runner')
@pytest.mark.supported_targets
@pytest.mark.generic_multi_device @pytest.mark.generic_multi_device
@pytest.mark.parametrize('count', [2,], indirect=True) @pytest.mark.parametrize(
def test_param_multi_dev(case_tester) -> None: # type: ignore 'count',
[
2,
],
indirect=True,
)
@idf_parametrize('target', ['supported_targets'], indirect=['target'])
def test_param_multi_dev(case_tester) -> None: # type: ignore
for case in case_tester.test_menu: for case in case_tester.test_menu:
if case.attributes.get('test_env', 'generic_multi_device') == 'generic_multi_device': if case.attributes.get('test_env', 'generic_multi_device') == 'generic_multi_device':
case_tester.run_multi_dev_case(case=case, reset=True) case_tester.run_multi_dev_case(case=case, reset=True)

View File

@ -1,13 +1,14 @@
# SPDX-FileCopyrightText: 2021-2024 Espressif Systems (Shanghai) CO LTD # SPDX-FileCopyrightText: 2021-2025 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.utils import idf_parametrize
# If `test_env` is define, should not run on generic runner # If `test_env` is define, should not run on generic runner
@pytest.mark.supported_targets
@pytest.mark.generic @pytest.mark.generic
@pytest.mark.parametrize('config', ['release', 'iram_safe'], indirect=True) @pytest.mark.parametrize('config', ['release', 'iram_safe'], indirect=True)
def test_slave_single_dev(case_tester) -> None: # type: ignore @idf_parametrize('target', ['supported_targets'], indirect=['target'])
def test_slave_single_dev(case_tester) -> None: # type: ignore
for case in case_tester.test_menu: for case in case_tester.test_menu:
if 'test_env' in case.attributes: if 'test_env' in case.attributes:
continue continue
@ -17,10 +18,10 @@ def test_slave_single_dev(case_tester) -> None: # type: ignore
# if `test_env` not defined, will run on `generic_multi_device` by default # if `test_env` not defined, will run on `generic_multi_device` by default
# TODO: [ESP32C61] IDF-10949 # TODO: [ESP32C61] IDF-10949
@pytest.mark.temp_skip_ci(targets=['esp32c61'], reason='no multi-dev runner') @pytest.mark.temp_skip_ci(targets=['esp32c61'], reason='no multi-dev runner')
@pytest.mark.supported_targets
@pytest.mark.generic_multi_device @pytest.mark.generic_multi_device
@pytest.mark.parametrize('count, config', [(2, 'release'), (2, 'iram_safe')], indirect=True) @pytest.mark.parametrize('count, config', [(2, 'release'), (2, 'iram_safe')], indirect=True)
def test_slave_multi_dev(case_tester) -> None: # type: ignore @idf_parametrize('target', ['supported_targets'], indirect=['target'])
def test_slave_multi_dev(case_tester) -> None: # type: ignore
for case in case_tester.test_menu: for case in case_tester.test_menu:
if case.attributes.get('test_env', 'generic_multi_device') == 'generic_multi_device': if case.attributes.get('test_env', 'generic_multi_device') == 'generic_multi_device':
case_tester.run_multi_dev_case(case=case, reset=True) case_tester.run_multi_dev_case(case=case, reset=True)

View File

@ -1,21 +1,18 @@
# SPDX-FileCopyrightText: 2021-2022 Espressif Systems (Shanghai) CO LTD # SPDX-FileCopyrightText: 2021-2025 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.utils import idf_parametrize
# If `test_env` is define, should not run on generic runner # If `test_env` is define, should not run on generic runner
@pytest.mark.esp32s2
@pytest.mark.esp32s3
@pytest.mark.esp32c2
@pytest.mark.esp32c3
@pytest.mark.esp32c5
@pytest.mark.esp32c6
@pytest.mark.esp32c61
@pytest.mark.esp32h2
@pytest.mark.esp32p4
@pytest.mark.generic @pytest.mark.generic
@pytest.mark.parametrize('config', ['release'], indirect=True) @pytest.mark.parametrize('config', ['release'], indirect=True)
def test_slave_hd_single_dev(case_tester) -> None: # type: ignore @idf_parametrize(
'target',
['esp32s2', 'esp32s3', 'esp32c2', 'esp32c3', 'esp32c5', 'esp32c6', 'esp32c61', 'esp32h2', 'esp32p4'],
indirect=['target'],
)
def test_slave_hd_single_dev(case_tester) -> None: # type: ignore
for case in case_tester.test_menu: for case in case_tester.test_menu:
if 'test_env' in case.attributes: if 'test_env' in case.attributes:
continue continue
@ -23,17 +20,14 @@ def test_slave_hd_single_dev(case_tester) -> None: # type: ignore
# if `test_env` not defined, will run on `generic_multi_device` by default # if `test_env` not defined, will run on `generic_multi_device` by default
@pytest.mark.esp32s2
@pytest.mark.esp32s3
@pytest.mark.esp32c2
@pytest.mark.esp32c3
@pytest.mark.esp32c5
@pytest.mark.esp32c6
@pytest.mark.esp32h2
@pytest.mark.esp32p4
@pytest.mark.generic_multi_device @pytest.mark.generic_multi_device
@pytest.mark.parametrize('count, config', [(2, 'release')], indirect=True) @pytest.mark.parametrize('count, config', [(2, 'release')], indirect=True)
def test_slave_hd_multi_dev(case_tester) -> None: # type: ignore @idf_parametrize(
'target',
['esp32s2', 'esp32s3', 'esp32c2', 'esp32c3', 'esp32c5', 'esp32c6', 'esp32h2', 'esp32p4'],
indirect=['target'],
)
def test_slave_hd_multi_dev(case_tester) -> None: # type: ignore
for case in case_tester.test_menu: for case in case_tester.test_menu:
if case.attributes.get('test_env', 'generic_multi_device') == 'generic_multi_device': if case.attributes.get('test_env', 'generic_multi_device') == 'generic_multi_device':
case_tester.run_multi_dev_case(case=case, reset=True) case_tester.run_multi_dev_case(case=case, reset=True)

View File

@ -1,12 +1,10 @@
# SPDX-FileCopyrightText: 2024 Espressif Systems (Shanghai) CO LTD # SPDX-FileCopyrightText: 2024-2025 Espressif Systems (Shanghai) CO LTD
# SPDX-License-Identifier: CC0-1.0 # SPDX-License-Identifier: CC0-1.0
import pytest import pytest
from pytest_embedded import Dut from pytest_embedded import Dut
from pytest_embedded_idf.utils import idf_parametrize
@pytest.mark.esp32s2
@pytest.mark.esp32s3
@pytest.mark.esp32p4
@pytest.mark.generic @pytest.mark.generic
@pytest.mark.parametrize( @pytest.mark.parametrize(
'config', 'config',
@ -16,5 +14,6 @@ from pytest_embedded import Dut
], ],
indirect=True, indirect=True,
) )
@idf_parametrize('target', ['esp32s2', 'esp32s3', 'esp32p4'], indirect=['target'])
def test_touch_sens(dut: Dut) -> None: def test_touch_sens(dut: Dut) -> None:
dut.run_all_single_board_cases() dut.run_all_single_board_cases()

View File

@ -1,48 +1,44 @@
# SPDX-FileCopyrightText: 2021-2023 Espressif Systems (Shanghai) CO LTD # SPDX-FileCopyrightText: 2021-2025 Espressif Systems (Shanghai) CO LTD
# SPDX-License-Identifier: CC0-1.0 # SPDX-License-Identifier: CC0-1.0
import pytest import pytest
from pytest_embedded import Dut from pytest_embedded import Dut
from pytest_embedded_idf.unity_tester import CaseTester from pytest_embedded_idf.unity_tester import CaseTester
from pytest_embedded_idf.utils import idf_parametrize
@pytest.mark.esp32s2
@pytest.mark.esp32c3
@pytest.mark.esp32s3
@pytest.mark.esp32c2
@pytest.mark.esp32c6
@pytest.mark.esp32h2
@pytest.mark.esp32p4
@pytest.mark.esp32c5
@pytest.mark.esp32c61
@pytest.mark.generic @pytest.mark.generic
@pytest.mark.parametrize('config', [ @pytest.mark.parametrize(
'release', 'config',
], indirect=True) [
'release',
],
indirect=True,
)
@idf_parametrize(
'target',
['esp32s2', 'esp32c3', 'esp32s3', 'esp32c2', 'esp32c6', 'esp32h2', 'esp32p4', 'esp32c5', 'esp32c61'],
indirect=['target'],
)
def test_temperature_sensor_driver(dut: Dut) -> None: def test_temperature_sensor_driver(dut: Dut) -> None:
dut.run_all_single_board_cases() dut.run_all_single_board_cases()
@pytest.mark.esp32c6
@pytest.mark.esp32h2
@pytest.mark.esp32p4
@pytest.mark.esp32c5
@pytest.mark.esp32c61
@pytest.mark.generic @pytest.mark.generic
@pytest.mark.parametrize('config', [ @pytest.mark.parametrize(
'iram_safe', 'config',
], indirect=True) [
'iram_safe',
],
indirect=True,
)
@idf_parametrize('target', ['esp32c6', 'esp32h2', 'esp32p4', 'esp32c5', 'esp32c61'], indirect=['target'])
def test_temperature_sensor_cbs(dut: Dut) -> None: def test_temperature_sensor_cbs(dut: Dut) -> None:
dut.run_all_single_board_cases() dut.run_all_single_board_cases()
@pytest.mark.esp32s2
@pytest.mark.esp32c3
@pytest.mark.esp32s3
@pytest.mark.esp32c2
@pytest.mark.esp32c6
@pytest.mark.esp32c61
@pytest.mark.wifi_two_dut @pytest.mark.wifi_two_dut
@pytest.mark.parametrize('count', [2], indirect=True) @pytest.mark.parametrize('count', [2], indirect=True)
@idf_parametrize('target', ['esp32s2', 'esp32c3', 'esp32s3', 'esp32c2', 'esp32c6', 'esp32c61'], indirect=['target'])
def test_temperature_phy_cases(case_tester: CaseTester) -> None: # type: ignore def test_temperature_phy_cases(case_tester: CaseTester) -> None: # type: ignore
for case in case_tester.test_menu: for case in case_tester.test_menu:
if case.attributes.get('test_env', 'wifi_two_dut') == 'wifi_two_dut': if case.attributes.get('test_env', 'wifi_two_dut') == 'wifi_two_dut':

View File

@ -1,11 +1,20 @@
# SPDX-FileCopyrightText: 2021-2022 Espressif Systems (Shanghai) CO LTD # SPDX-FileCopyrightText: 2021-2025 Espressif Systems (Shanghai) CO LTD
# SPDX-License-Identifier: CC0-1.0 # SPDX-License-Identifier: CC0-1.0
import pytest import pytest
from pytest_embedded_idf.utils import idf_parametrize
@pytest.mark.esp32
@pytest.mark.multi_dut_modbus_rs485 @pytest.mark.multi_dut_modbus_rs485
@pytest.mark.parametrize('count, config', [(2, 'release',)], indirect=True) @pytest.mark.parametrize(
def test_rs485_multi_dev(case_tester) -> None: # type: ignore 'count, config',
[
(
2,
'release',
)
],
indirect=True,
)
@idf_parametrize('target', ['esp32'], indirect=['target'])
def test_rs485_multi_dev(case_tester) -> None: # type: ignore
case_tester.run_all_multi_dev_cases(reset=True) case_tester.run_all_multi_dev_cases(reset=True)

View File

@ -1,6 +1,7 @@
# SPDX-FileCopyrightText: 2021-2024 Espressif Systems (Shanghai) CO LTD # SPDX-FileCopyrightText: 2021-2025 Espressif Systems (Shanghai) CO LTD
# SPDX-License-Identifier: CC0-1.0 # SPDX-License-Identifier: CC0-1.0
import pytest import pytest
from pytest_embedded_idf.utils import idf_parametrize
input_argv = { input_argv = {
'esp32': ['uart'], 'esp32': ['uart'],
@ -16,7 +17,6 @@ input_argv = {
} }
@pytest.mark.supported_targets
@pytest.mark.temp_skip_ci(targets=['esp32s3'], reason='skip due to duplication with test_uart_single_dev_psram') @pytest.mark.temp_skip_ci(targets=['esp32s3'], reason='skip due to duplication with test_uart_single_dev_psram')
@pytest.mark.generic @pytest.mark.generic
@pytest.mark.parametrize( @pytest.mark.parametrize(
@ -27,7 +27,8 @@ input_argv = {
], ],
indirect=True, indirect=True,
) )
def test_uart_single_dev(case_tester) -> None: # type: ignore @idf_parametrize('target', ['supported_targets'], indirect=['target'])
def test_uart_single_dev(case_tester) -> None: # type: ignore
dut = case_tester.first_dut dut = case_tester.first_dut
chip_type = dut.app.target chip_type = dut.app.target
@ -48,7 +49,6 @@ def test_uart_single_dev(case_tester) -> None: # type: ignore
dut._run_normal_case(case, reset=True) dut._run_normal_case(case, reset=True)
@pytest.mark.esp32s3
@pytest.mark.octal_psram @pytest.mark.octal_psram
@pytest.mark.parametrize( @pytest.mark.parametrize(
'config', 'config',
@ -58,7 +58,8 @@ def test_uart_single_dev(case_tester) -> None: # type: ignore
], ],
indirect=True, indirect=True,
) )
def test_uart_single_dev_psram(case_tester) -> None: # type: ignore @idf_parametrize('target', ['esp32s3'], indirect=['target'])
def test_uart_single_dev_psram(case_tester) -> None: # type: ignore
dut = case_tester.first_dut dut = case_tester.first_dut
for case in case_tester.test_menu: for case in case_tester.test_menu:
dut.serial.hard_reset() dut.serial.hard_reset()

View File

@ -1,24 +1,34 @@
# SPDX-FileCopyrightText: 2023 Espressif Systems (Shanghai) CO LTD # SPDX-FileCopyrightText: 2023-2025 Espressif Systems (Shanghai) CO LTD
# SPDX-License-Identifier: CC0-1.0 # SPDX-License-Identifier: CC0-1.0
import pytest import pytest
from pytest_embedded import Dut from pytest_embedded import Dut
from pytest_embedded_idf.utils import idf_parametrize
@pytest.mark.supported_targets
@pytest.mark.temp_skip_ci(targets=['esp32s3'], reason='skip due to duplication with test_uart_vfs_psram') @pytest.mark.temp_skip_ci(targets=['esp32s3'], reason='skip due to duplication with test_uart_vfs_psram')
@pytest.mark.generic @pytest.mark.generic
@pytest.mark.parametrize('config', [ @pytest.mark.parametrize(
'default', 'iram', 'config',
], indirect=True) [
'default',
'iram',
],
indirect=True,
)
@idf_parametrize('target', ['supported_targets'], indirect=['target'])
def test_uart_vfs_default(dut: Dut) -> None: def test_uart_vfs_default(dut: Dut) -> None:
dut.run_all_single_board_cases() dut.run_all_single_board_cases()
@pytest.mark.esp32s3
@pytest.mark.quad_psram @pytest.mark.quad_psram
@pytest.mark.parametrize('config', [ @pytest.mark.parametrize(
'default', 'iram', 'config',
], indirect=True) [
'default',
'iram',
],
indirect=True,
)
@idf_parametrize('target', ['esp32s3'], indirect=['target'])
def test_uart_vfs_psram(dut: Dut) -> None: def test_uart_vfs_psram(dut: Dut) -> None:
dut.run_all_single_board_cases() dut.run_all_single_board_cases()

View File

@ -1,13 +1,10 @@
# SPDX-FileCopyrightText: 2023-2024 Espressif Systems (Shanghai) CO LTD # SPDX-FileCopyrightText: 2023-2025 Espressif Systems (Shanghai) CO LTD
# SPDX-License-Identifier: CC0-1.0 # SPDX-License-Identifier: CC0-1.0
import pytest import pytest
from pytest_embedded import Dut from pytest_embedded import Dut
from pytest_embedded_idf.utils import idf_parametrize
@pytest.mark.esp32s3
@pytest.mark.esp32c3
@pytest.mark.esp32c6
@pytest.mark.esp32h2
@pytest.mark.usb_serial_jtag @pytest.mark.usb_serial_jtag
@pytest.mark.parametrize( @pytest.mark.parametrize(
'port, flash_port, config', 'port, flash_port, config',
@ -16,21 +13,20 @@ from pytest_embedded import Dut
], ],
indirect=True, indirect=True,
) )
def test_usb_serial_jtag_dev(dut: Dut) -> None: # type: ignore @idf_parametrize('target', ['esp32s3', 'esp32c3', 'esp32c6', 'esp32h2'], indirect=['target'])
def test_usb_serial_jtag_dev(dut: Dut) -> None: # type: ignore
dut.expect_exact('Press ENTER to see the list of tests') dut.expect_exact('Press ENTER to see the list of tests')
dut.write('\"test print via usb_serial_jtag driver multiple times in different tasks\"') dut.write('"test print via usb_serial_jtag driver multiple times in different tasks"')
for i in range(300 * 2): for i in range(300 * 2):
dut.expect(r'Oh, hello world (\d), this test is for testing message and parse in python, time (\d+)', timeout=10) dut.expect(
r'Oh, hello world (\d), this test is for testing message and parse in python, time (\d+)', timeout=10
)
dut.expect('PASS') dut.expect('PASS')
dut.expect_exact('Enter next test, or \'enter\' to see menu') dut.expect_exact("Enter next test, or 'enter' to see menu")
dut.write('\"see if fsync appears to work\"') dut.write('"see if fsync appears to work"')
dut.expect('PASS') dut.expect('PASS')
@pytest.mark.esp32s3
@pytest.mark.esp32c3
@pytest.mark.esp32c6
@pytest.mark.esp32h2
@pytest.mark.usb_serial_jtag @pytest.mark.usb_serial_jtag
@pytest.mark.parametrize( @pytest.mark.parametrize(
'port, flash_port, config', 'port, flash_port, config',
@ -39,8 +35,9 @@ def test_usb_serial_jtag_dev(dut: Dut) -> None: # type: ignore
], ],
indirect=True, indirect=True,
) )
def test_usb_serial_jtag_rom_dev(dut: Dut) -> None: # type: ignore @idf_parametrize('target', ['esp32s3', 'esp32c3', 'esp32c6', 'esp32h2'], indirect=['target'])
def test_usb_serial_jtag_rom_dev(dut: Dut) -> None: # type: ignore
dut.expect_exact('Press ENTER to see the list of tests') dut.expect_exact('Press ENTER to see the list of tests')
dut.write('\"test rom printf work after driver installed\"') dut.write('"test rom printf work after driver installed"')
dut.expect(r'hi, espressif1', timeout=10) dut.expect(r'hi, espressif1', timeout=10)
dut.expect(r'hi, espressif2', timeout=10) dut.expect(r'hi, espressif2', timeout=10)

View File

@ -1,24 +1,23 @@
# SPDX-FileCopyrightText: 2024 Espressif Systems (Shanghai) CO LTD # SPDX-FileCopyrightText: 2024-2025 Espressif Systems (Shanghai) CO LTD
# SPDX-License-Identifier: CC0-1.0 # SPDX-License-Identifier: CC0-1.0
import pytest import pytest
from pytest_embedded import Dut from pytest_embedded import Dut
from pytest_embedded_idf.utils import idf_parametrize
@pytest.mark.esp32s3
@pytest.mark.esp32c3
@pytest.mark.esp32c6
@pytest.mark.esp32h2
@pytest.mark.usb_serial_jtag @pytest.mark.usb_serial_jtag
@pytest.mark.parametrize( @pytest.mark.parametrize(
'port, flash_port, config', 'port, flash_port, config',
[ [
pytest.param('/dev/serial_ports/ttyACM-esp32', '/dev/serial_ports/ttyUSB-esp32', 'release'), pytest.param('/dev/serial_ports/ttyACM-esp32', '/dev/serial_ports/ttyUSB-esp32', 'release'),
], ],
indirect=True,) indirect=True,
)
@pytest.mark.parametrize('test_message', ['test123456789!@#%^&*']) @pytest.mark.parametrize('test_message', ['test123456789!@#%^&*'])
@idf_parametrize('target', ['esp32s3', 'esp32c3', 'esp32c6', 'esp32h2'], indirect=['target'])
def test_usj_vfs_release(dut: Dut, test_message: list) -> None: def test_usj_vfs_release(dut: Dut, test_message: list) -> None:
dut.expect_exact('Press ENTER to see the list of tests') dut.expect_exact('Press ENTER to see the list of tests')
dut.write('\"test select read, write and timeout\"') dut.write('"test select read, write and timeout"')
dut.expect_exact('select timed out', timeout=2) dut.expect_exact('select timed out', timeout=2)
dut.write(test_message) dut.write(test_message)
dut.expect_exact(test_message, timeout=2) dut.expect_exact(test_message, timeout=2)

View File

@ -1,4 +1,4 @@
# SPDX-FileCopyrightText: 2022-2024 Espressif Systems (Shanghai) CO LTD # SPDX-FileCopyrightText: 2022-2025 Espressif Systems (Shanghai) CO LTD
# SPDX-License-Identifier: CC0-1.0 # SPDX-License-Identifier: CC0-1.0
import contextlib import contextlib
import logging import logging
@ -11,6 +11,7 @@ from typing import Iterator
import pytest import pytest
from pytest_embedded_idf import IdfDut from pytest_embedded_idf import IdfDut
from pytest_embedded_idf.utils import idf_parametrize
from scapy.all import Ether from scapy.all import Ether
from scapy.all import raw from scapy.all import raw
@ -45,7 +46,7 @@ class EthTestIntf(object):
logging.info('Use %s for testing', self.target_if) logging.info('Use %s for testing', self.target_if)
@contextlib.contextmanager @contextlib.contextmanager
def configure_eth_if(self, eth_type:int=0) -> Iterator[socket.socket]: def configure_eth_if(self, eth_type: int = 0) -> Iterator[socket.socket]:
if eth_type == 0: if eth_type == 0:
eth_type = self.eth_type eth_type = self.eth_type
so = socket.socket(socket.AF_PACKET, socket.SOCK_RAW, socket.htons(eth_type)) so = socket.socket(socket.AF_PACKET, socket.SOCK_RAW, socket.htons(eth_type))
@ -60,14 +61,14 @@ class EthTestIntf(object):
so.settimeout(10) so.settimeout(10)
payload = bytearray(1010) payload = bytearray(1010)
for i, _ in enumerate(payload): for i, _ in enumerate(payload):
payload[i] = i & 0xff payload[i] = i & 0xFF
eth_frame = Ether(dst=mac, src=so.getsockname()[4], type=self.eth_type) / raw(payload) eth_frame = Ether(dst=mac, src=so.getsockname()[4], type=self.eth_type) / raw(payload)
try: try:
so.send(raw(eth_frame)) so.send(raw(eth_frame))
except Exception as e: except Exception as e:
raise e raise e
def recv_resp_poke(self, mac:str, i:int=0) -> None: def recv_resp_poke(self, mac: str, i: int = 0) -> None:
eth_type_ctrl = self.eth_type + 1 eth_type_ctrl = self.eth_type + 1
with self.configure_eth_if(eth_type_ctrl) as so: with self.configure_eth_if(eth_type_ctrl) as so:
so.settimeout(30) so.settimeout(30)
@ -76,13 +77,13 @@ class EthTestIntf(object):
eth_frame = Ether(so.recv(60)) eth_frame = Ether(so.recv(60))
except Exception as e: except Exception as e:
raise e raise e
if mac == eth_frame.src and eth_frame.load[0] == 0xfa: if mac == eth_frame.src and eth_frame.load[0] == 0xFA:
if eth_frame.load[1] != i: if eth_frame.load[1] != i:
raise RuntimeError('Missed Poke Packet') raise RuntimeError('Missed Poke Packet')
logging.info('Poke Packet received...') logging.info('Poke Packet received...')
eth_frame.dst = eth_frame.src eth_frame.dst = eth_frame.src
eth_frame.src = so.getsockname()[4] eth_frame.src = so.getsockname()[4]
eth_frame.load = bytes.fromhex('fb') # POKE_RESP code eth_frame.load = bytes.fromhex('fb') # POKE_RESP code
so.send(raw(eth_frame)) so.send(raw(eth_frame))
break break
else: else:
@ -92,9 +93,9 @@ class EthTestIntf(object):
else: else:
raise RuntimeError('No Poke Packet!') raise RuntimeError('No Poke Packet!')
def traffic_gen(self, mac: str, pipe_rcv:connection.Connection) -> None: def traffic_gen(self, mac: str, pipe_rcv: connection.Connection) -> None:
with self.configure_eth_if() as so: with self.configure_eth_if() as so:
payload = bytes.fromhex('ff') # DUMMY_TRAFFIC code payload = bytes.fromhex('ff') # DUMMY_TRAFFIC code
payload += bytes(1485) payload += bytes(1485)
eth_frame = Ether(dst=mac, src=so.getsockname()[4], type=self.eth_type) / raw(payload) eth_frame = Ether(dst=mac, src=so.getsockname()[4], type=self.eth_type) / raw(payload)
try: try:
@ -103,7 +104,7 @@ class EthTestIntf(object):
except Exception as e: except Exception as e:
raise e raise e
def eth_loopback(self, mac: str, pipe_rcv:connection.Connection) -> None: def eth_loopback(self, mac: str, pipe_rcv: connection.Connection) -> None:
with self.configure_eth_if(self.eth_type) as so: with self.configure_eth_if(self.eth_type) as so:
so.settimeout(30) so.settimeout(30)
try: try:
@ -158,7 +159,7 @@ def ethernet_l2_test(dut: IdfDut) -> None:
raise RuntimeError('No broadcast received from expected DUT MAC addr') raise RuntimeError('No broadcast received from expected DUT MAC addr')
for i in range(0, 1010): for i in range(0, 1010):
if eth_frame.load[i] != i & 0xff: if eth_frame.load[i] != i & 0xFF:
raise RuntimeError('Packet content mismatch') raise RuntimeError('Packet content mismatch')
dut.expect_unity_test_output() dut.expect_unity_test_output()
@ -172,7 +173,9 @@ def ethernet_l2_test(dut: IdfDut) -> None:
# (there might be slight delay due to the RSTP execution) # (there might be slight delay due to the RSTP execution)
target_if.recv_resp_poke(mac=dut_mac) target_if.recv_resp_poke(mac=dut_mac)
target_if.send_eth_packet('ff:ff:ff:ff:ff:ff') # broadcast frame target_if.send_eth_packet('ff:ff:ff:ff:ff:ff') # broadcast frame
target_if.send_eth_packet('01:00:5e:00:00:00') # IPv4 multicast frame (some SPI Eth modules filter multicast other than IP) target_if.send_eth_packet(
'01:00:5e:00:00:00'
) # IPv4 multicast frame (some SPI Eth modules filter multicast other than IP)
target_if.send_eth_packet(mac=dut_mac) # unicast frame target_if.send_eth_packet(mac=dut_mac) # unicast frame
dut.expect_unity_test_output(extra_before=res.group(1)) dut.expect_unity_test_output(extra_before=res.group(1))
@ -191,7 +194,13 @@ def ethernet_l2_test(dut: IdfDut) -> None:
target_if.recv_resp_poke(dut_mac, rx_i) target_if.recv_resp_poke(dut_mac, rx_i)
# Start/stop under heavy Rx traffic # Start/stop under heavy Rx traffic
pipe_rcv, pipe_send = Pipe(False) pipe_rcv, pipe_send = Pipe(False)
tx_proc = Process(target=target_if.traffic_gen, args=(dut_mac, pipe_rcv, )) tx_proc = Process(
target=target_if.traffic_gen,
args=(
dut_mac,
pipe_rcv,
),
)
tx_proc.start() tx_proc.start()
dut.expect_exact('Ethernet Stopped') dut.expect_exact('Ethernet Stopped')
pipe_send.send(0) # just send some dummy data pipe_send.send(0) # just send some dummy data
@ -219,7 +228,13 @@ def ethernet_heap_alloc_test(dut: IdfDut) -> None:
) )
dut_mac = res.group(1).decode('utf-8') dut_mac = res.group(1).decode('utf-8')
pipe_rcv, pipe_send = Pipe(False) pipe_rcv, pipe_send = Pipe(False)
loopback_proc = Process(target=target_if.eth_loopback, args=(dut_mac, pipe_rcv, )) loopback_proc = Process(
target=target_if.eth_loopback,
args=(
dut_mac,
pipe_rcv,
),
)
loopback_proc.start() loopback_proc.start()
target_if.recv_resp_poke(mac=dut_mac) target_if.recv_resp_poke(mac=dut_mac)
@ -233,55 +248,67 @@ def ethernet_heap_alloc_test(dut: IdfDut) -> None:
# ----------- IP101 ----------- # ----------- IP101 -----------
@pytest.mark.esp32
@pytest.mark.ethernet @pytest.mark.ethernet
@pytest.mark.parametrize('config', [ @pytest.mark.parametrize('config', ['default_ip101', 'release_ip101', 'single_core_ip101'], indirect=True)
'default_ip101',
'release_ip101',
'single_core_ip101'
], indirect=True)
@pytest.mark.flaky(reruns=3, reruns_delay=5) @pytest.mark.flaky(reruns=3, reruns_delay=5)
@idf_parametrize('target', ['esp32'], indirect=['target'])
def test_esp_ethernet(dut: IdfDut) -> None: def test_esp_ethernet(dut: IdfDut) -> None:
ethernet_test(dut) ethernet_test(dut)
@pytest.mark.esp32
@pytest.mark.ethernet @pytest.mark.ethernet
@pytest.mark.parametrize('config', [ @pytest.mark.parametrize(
'default_ip101', 'config',
], indirect=True) [
'default_ip101',
],
indirect=True,
)
@idf_parametrize('target', ['esp32'], indirect=['target'])
def test_esp_emac(dut: IdfDut) -> None: def test_esp_emac(dut: IdfDut) -> None:
ethernet_int_emac_test(dut) ethernet_int_emac_test(dut)
dut.serial.hard_reset() dut.serial.hard_reset()
ethernet_heap_alloc_test(dut) ethernet_heap_alloc_test(dut)
@pytest.mark.esp32
@pytest.mark.eth_ip101 @pytest.mark.eth_ip101
@pytest.mark.parametrize('config', [ @pytest.mark.parametrize(
'default_ip101', 'config',
], indirect=True) [
'default_ip101',
],
indirect=True,
)
@idf_parametrize('target', ['esp32'], indirect=['target'])
def test_esp_eth_ip101(dut: IdfDut) -> None: def test_esp_eth_ip101(dut: IdfDut) -> None:
ethernet_l2_test(dut) ethernet_l2_test(dut)
# ----------- IP101 ESP32P4 ----------- # ----------- IP101 ESP32P4 -----------
@pytest.mark.esp32p4
@pytest.mark.eth_ip101 @pytest.mark.eth_ip101
@pytest.mark.parametrize('config', [ @pytest.mark.parametrize(
'default_ip101_esp32p4', 'config',
], indirect=True) [
'default_ip101_esp32p4',
],
indirect=True,
)
@idf_parametrize('target', ['esp32p4'], indirect=['target'])
def test_esp32p4_ethernet(dut: IdfDut) -> None: def test_esp32p4_ethernet(dut: IdfDut) -> None:
ethernet_test(dut) ethernet_test(dut)
dut.serial.hard_reset() dut.serial.hard_reset()
ethernet_l2_test(dut) ethernet_l2_test(dut)
@pytest.mark.esp32p4
@pytest.mark.eth_ip101 @pytest.mark.eth_ip101
@pytest.mark.parametrize('config', [ @pytest.mark.parametrize(
'default_ip101_esp32p4', 'config',
], indirect=True) [
'default_ip101_esp32p4',
],
indirect=True,
)
@idf_parametrize('target', ['esp32p4'], indirect=['target'])
def test_esp32p4_emac(dut: IdfDut) -> None: def test_esp32p4_emac(dut: IdfDut) -> None:
ethernet_int_emac_test(dut) ethernet_int_emac_test(dut)
dut.serial.hard_reset() dut.serial.hard_reset()
@ -289,11 +316,15 @@ def test_esp32p4_emac(dut: IdfDut) -> None:
# ----------- LAN8720 ----------- # ----------- LAN8720 -----------
@pytest.mark.esp32
@pytest.mark.eth_lan8720 @pytest.mark.eth_lan8720
@pytest.mark.parametrize('config', [ @pytest.mark.parametrize(
'default_lan8720', 'config',
], indirect=True) [
'default_lan8720',
],
indirect=True,
)
@idf_parametrize('target', ['esp32'], indirect=['target'])
def test_esp_eth_lan8720(dut: IdfDut) -> None: def test_esp_eth_lan8720(dut: IdfDut) -> None:
ethernet_test(dut) ethernet_test(dut)
dut.serial.hard_reset() dut.serial.hard_reset()
@ -301,11 +332,15 @@ def test_esp_eth_lan8720(dut: IdfDut) -> None:
# ----------- RTL8201 ----------- # ----------- RTL8201 -----------
@pytest.mark.esp32
@pytest.mark.eth_rtl8201 @pytest.mark.eth_rtl8201
@pytest.mark.parametrize('config', [ @pytest.mark.parametrize(
'default_rtl8201', 'config',
], indirect=True) [
'default_rtl8201',
],
indirect=True,
)
@idf_parametrize('target', ['esp32'], indirect=['target'])
def test_esp_eth_rtl8201(dut: IdfDut) -> None: def test_esp_eth_rtl8201(dut: IdfDut) -> None:
ethernet_test(dut) ethernet_test(dut)
dut.serial.hard_reset() dut.serial.hard_reset()
@ -313,11 +348,15 @@ def test_esp_eth_rtl8201(dut: IdfDut) -> None:
# ----------- KSZ8041 ----------- # ----------- KSZ8041 -----------
@pytest.mark.esp32
@pytest.mark.eth_ksz8041 @pytest.mark.eth_ksz8041
@pytest.mark.parametrize('config', [ @pytest.mark.parametrize(
'default_ksz8041', 'config',
], indirect=True) [
'default_ksz8041',
],
indirect=True,
)
@idf_parametrize('target', ['esp32'], indirect=['target'])
def test_esp_eth_ksz8041(dut: IdfDut) -> None: def test_esp_eth_ksz8041(dut: IdfDut) -> None:
ethernet_test(dut) ethernet_test(dut)
dut.serial.hard_reset() dut.serial.hard_reset()
@ -325,11 +364,15 @@ def test_esp_eth_ksz8041(dut: IdfDut) -> None:
# ----------- DP83848 ----------- # ----------- DP83848 -----------
@pytest.mark.esp32
@pytest.mark.eth_dp83848 @pytest.mark.eth_dp83848
@pytest.mark.parametrize('config', [ @pytest.mark.parametrize(
'default_dp83848', 'config',
], indirect=True) [
'default_dp83848',
],
indirect=True,
)
@idf_parametrize('target', ['esp32'], indirect=['target'])
def test_esp_eth_dp83848(dut: IdfDut) -> None: def test_esp_eth_dp83848(dut: IdfDut) -> None:
ethernet_test(dut) ethernet_test(dut)
dut.serial.hard_reset() dut.serial.hard_reset()
@ -337,12 +380,16 @@ def test_esp_eth_dp83848(dut: IdfDut) -> None:
# ----------- W5500 ----------- # ----------- W5500 -----------
@pytest.mark.esp32
@pytest.mark.eth_w5500 @pytest.mark.eth_w5500
@pytest.mark.parametrize('config', [ @pytest.mark.parametrize(
'default_w5500', 'config',
'poll_w5500', [
], indirect=True) 'default_w5500',
'poll_w5500',
],
indirect=True,
)
@idf_parametrize('target', ['esp32'], indirect=['target'])
def test_esp_eth_w5500(dut: IdfDut) -> None: def test_esp_eth_w5500(dut: IdfDut) -> None:
ethernet_test(dut) ethernet_test(dut)
dut.serial.hard_reset() dut.serial.hard_reset()
@ -352,12 +399,16 @@ def test_esp_eth_w5500(dut: IdfDut) -> None:
# ----------- KSZ8851SNL ----------- # ----------- KSZ8851SNL -----------
@pytest.mark.esp32
@pytest.mark.eth_ksz8851snl @pytest.mark.eth_ksz8851snl
@pytest.mark.parametrize('config', [ @pytest.mark.parametrize(
'default_ksz8851snl', 'config',
'poll_ksz8851snl', [
], indirect=True) 'default_ksz8851snl',
'poll_ksz8851snl',
],
indirect=True,
)
@idf_parametrize('target', ['esp32'], indirect=['target'])
def test_esp_eth_ksz8851snl(dut: IdfDut) -> None: def test_esp_eth_ksz8851snl(dut: IdfDut) -> None:
ethernet_test(dut) ethernet_test(dut)
dut.serial.hard_reset() dut.serial.hard_reset()
@ -367,12 +418,16 @@ def test_esp_eth_ksz8851snl(dut: IdfDut) -> None:
# ----------- DM9051 ----------- # ----------- DM9051 -----------
@pytest.mark.esp32
@pytest.mark.eth_dm9051 @pytest.mark.eth_dm9051
@pytest.mark.parametrize('config', [ @pytest.mark.parametrize(
'default_dm9051', 'config',
'poll_dm9051', [
], indirect=True) 'default_dm9051',
'poll_dm9051',
],
indirect=True,
)
@idf_parametrize('target', ['esp32'], indirect=['target'])
def test_esp_eth_dm9051(dut: IdfDut) -> None: def test_esp_eth_dm9051(dut: IdfDut) -> None:
ethernet_test(dut) ethernet_test(dut)
dut.serial.hard_reset() dut.serial.hard_reset()

View File

@ -1,10 +1,11 @@
# SPDX-FileCopyrightText: 2023 Espressif Systems (Shanghai) CO LTD # SPDX-FileCopyrightText: 2023-2025 Espressif Systems (Shanghai) CO LTD
# SPDX-License-Identifier: Unlicense OR CC0-1.0 # SPDX-License-Identifier: Unlicense OR CC0-1.0
import pytest import pytest
from pytest_embedded import Dut from pytest_embedded import Dut
from pytest_embedded_idf.utils import idf_parametrize
@pytest.mark.linux
@pytest.mark.host_test @pytest.mark.host_test
@idf_parametrize('target', ['linux'], indirect=['target'])
def test_esp_event_linux(dut: Dut) -> None: def test_esp_event_linux(dut: Dut) -> None:
dut.expect_exact('All tests passed', timeout=5) dut.expect_exact('All tests passed', timeout=5)

View File

@ -2,37 +2,35 @@
# SPDX-License-Identifier: CC0-1.0 # SPDX-License-Identifier: CC0-1.0
import pytest import pytest
from pytest_embedded import Dut from pytest_embedded import Dut
from pytest_embedded_idf.utils import idf_parametrize
@pytest.mark.esp32
@pytest.mark.esp32s2
@pytest.mark.esp32c3
@pytest.mark.generic @pytest.mark.generic
@idf_parametrize('target', ['esp32', 'esp32s2', 'esp32c3'], indirect=['target'])
def test_esp_event(dut: Dut) -> None: def test_esp_event(dut: Dut) -> None:
dut.run_all_single_board_cases() dut.run_all_single_board_cases()
@pytest.mark.esp32
@pytest.mark.esp32c3
@pytest.mark.host_test @pytest.mark.host_test
@pytest.mark.qemu @pytest.mark.qemu
@pytest.mark.xfail('config.getvalue("target") == "esp32c3"', reason='Unstable on QEMU, needs investigation') @pytest.mark.xfail('config.getvalue("target") == "esp32c3"', reason='Unstable on QEMU, needs investigation')
@idf_parametrize('target', ['esp32', 'esp32c3'], indirect=['target'])
def test_esp_event_qemu(dut: Dut) -> None: def test_esp_event_qemu(dut: Dut) -> None:
for case in dut.test_menu: for case in dut.test_menu:
if 'qemu-ignore' not in case.groups and not case.is_ignored and case.type == 'normal': if 'qemu-ignore' not in case.groups and not case.is_ignored and case.type == 'normal':
dut._run_normal_case(case) dut._run_normal_case(case)
@pytest.mark.linux
@pytest.mark.host_test @pytest.mark.host_test
@idf_parametrize('target', ['linux'], indirect=['target'])
def test_esp_event_posix_simulator(dut: Dut) -> None: def test_esp_event_posix_simulator(dut: Dut) -> None:
dut.expect_exact('Press ENTER to see the list of tests.') dut.expect_exact('Press ENTER to see the list of tests.')
dut.write('*') dut.write('*')
dut.expect(r'\d{2} Tests 0 Failures 0 Ignored', timeout=120) dut.expect(r'\d{2} Tests 0 Failures 0 Ignored', timeout=120)
@pytest.mark.esp32
@pytest.mark.generic @pytest.mark.generic
@idf_parametrize('target', ['esp32'], indirect=['target'])
def test_esp_event_profiling(dut: Dut) -> None: def test_esp_event_profiling(dut: Dut) -> None:
dut.expect_exact('Press ENTER to see the list of tests.') dut.expect_exact('Press ENTER to see the list of tests.')
dut.write('"profiling reports valid values"') dut.write('"profiling reports valid values"')
@ -40,7 +38,7 @@ def test_esp_event_profiling(dut: Dut) -> None:
# with an execution time superior to 0 us # with an execution time superior to 0 us
matches = dut.expect(r'HANDLER .+ inv:[1-9][0-9]{0,} time:[1-9][0-9]{0,} us', timeout=2) matches = dut.expect(r'HANDLER .+ inv:[1-9][0-9]{0,} time:[1-9][0-9]{0,} us', timeout=2)
matches_arr = matches.group().split(b'\r\n') matches_arr = matches.group().split(b'\r\n')
assert (len(matches_arr) == 3) assert len(matches_arr) == 3
dut.expect('1 Tests 0 Failures 0 Ignored', timeout=120) dut.expect('1 Tests 0 Failures 0 Ignored', timeout=120)
dut.expect_exact("Enter next test, or 'enter' to see menu") dut.expect_exact("Enter next test, or 'enter' to see menu")
@ -48,7 +46,7 @@ def test_esp_event_profiling(dut: Dut) -> None:
# look for 1 handlers never invoked # look for 1 handlers never invoked
matches = dut.expect(r'HANDLER .+ inv:0 time:0 us', timeout=2) matches = dut.expect(r'HANDLER .+ inv:0 time:0 us', timeout=2)
matches_arr = matches.group().split(b'\r\n') matches_arr = matches.group().split(b'\r\n')
assert (len(matches_arr) == 1) assert len(matches_arr) == 1
dut.expect('1 Tests 0 Failures 0 Ignored', timeout=120) dut.expect('1 Tests 0 Failures 0 Ignored', timeout=120)
dut.expect_exact("Enter next test, or 'enter' to see menu") dut.expect_exact("Enter next test, or 'enter' to see menu")

View File

@ -1,12 +1,11 @@
# SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD # SPDX-FileCopyrightText: 2022-2025 Espressif Systems (Shanghai) CO LTD
# SPDX-License-Identifier: CC0-1.0 # SPDX-License-Identifier: CC0-1.0
import pytest import pytest
from pytest_embedded import Dut from pytest_embedded import Dut
from pytest_embedded_idf.utils import idf_parametrize
@pytest.mark.generic @pytest.mark.generic
@pytest.mark.esp32 @idf_parametrize('target', ['esp32', 'esp32c3'], indirect=['target'])
@pytest.mark.esp32c3
def test_esp_hid(dut: Dut) -> None: def test_esp_hid(dut: Dut) -> None:
dut.run_all_single_board_cases() dut.run_all_single_board_cases()

View File

@ -1,11 +1,11 @@
# SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD # SPDX-FileCopyrightText: 2022-2025 Espressif Systems (Shanghai) CO LTD
# SPDX-License-Identifier: CC0-1.0 # SPDX-License-Identifier: CC0-1.0
import pytest import pytest
from pytest_embedded import Dut from pytest_embedded import Dut
from pytest_embedded_idf.utils import idf_parametrize
@pytest.mark.supported_targets
@pytest.mark.generic @pytest.mark.generic
@idf_parametrize('target', ['supported_targets'], indirect=['target'])
def test_esp_http_client(dut: Dut) -> None: def test_esp_http_client(dut: Dut) -> None:
dut.run_all_single_board_cases() dut.run_all_single_board_cases()

View File

@ -1,11 +1,11 @@
# SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD # SPDX-FileCopyrightText: 2022-2025 Espressif Systems (Shanghai) CO LTD
# SPDX-License-Identifier: CC0-1.0 # SPDX-License-Identifier: CC0-1.0
import pytest import pytest
from pytest_embedded import Dut from pytest_embedded import Dut
from pytest_embedded_idf.utils import idf_parametrize
@pytest.mark.supported_targets
@pytest.mark.generic @pytest.mark.generic
@idf_parametrize('target', ['supported_targets'], indirect=['target'])
def test_esp_http_server(dut: Dut) -> None: def test_esp_http_server(dut: Dut) -> None:
dut.run_all_single_board_cases() dut.run_all_single_board_cases()

View File

@ -1,17 +1,10 @@
# SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD # SPDX-FileCopyrightText: 2022-2025 Espressif Systems (Shanghai) CO LTD
# SPDX-License-Identifier: CC0-1.0 # SPDX-License-Identifier: CC0-1.0
import pytest import pytest
from pytest_embedded import Dut from pytest_embedded import Dut
from pytest_embedded_idf.utils import idf_parametrize
@pytest.mark.esp32s2
@pytest.mark.esp32c2
@pytest.mark.esp32c3
@pytest.mark.esp32c5
@pytest.mark.esp32c6
@pytest.mark.esp32c61
@pytest.mark.esp32h2
@pytest.mark.esp32p4
@pytest.mark.generic @pytest.mark.generic
@pytest.mark.parametrize( @pytest.mark.parametrize(
'config', 'config',
@ -20,11 +13,15 @@ from pytest_embedded import Dut
], ],
indirect=True, indirect=True,
) )
@idf_parametrize(
'target',
['esp32s2', 'esp32c2', 'esp32c3', 'esp32c5', 'esp32c6', 'esp32c61', 'esp32h2', 'esp32p4'],
indirect=['target'],
)
def test_dma(dut: Dut) -> None: def test_dma(dut: Dut) -> None:
dut.run_all_single_board_cases(reset=True) dut.run_all_single_board_cases(reset=True)
@pytest.mark.esp32s3
@pytest.mark.octal_psram @pytest.mark.octal_psram
@pytest.mark.parametrize( @pytest.mark.parametrize(
'config', 'config',
@ -33,5 +30,6 @@ def test_dma(dut: Dut) -> None:
], ],
indirect=True, indirect=True,
) )
@idf_parametrize('target', ['esp32s3'], indirect=['target'])
def test_dma_psram(dut: Dut) -> None: def test_dma_psram(dut: Dut) -> None:
dut.run_all_single_board_cases(reset=True) dut.run_all_single_board_cases(reset=True)

View File

@ -1,11 +1,10 @@
# SPDX-FileCopyrightText: 2023-2024 Espressif Systems (Shanghai) CO LTD # SPDX-FileCopyrightText: 2023-2025 Espressif Systems (Shanghai) CO LTD
# SPDX-License-Identifier: CC0-1.0 # SPDX-License-Identifier: CC0-1.0
import pytest import pytest
from pytest_embedded import Dut from pytest_embedded import Dut
from pytest_embedded_idf.utils import idf_parametrize
@pytest.mark.esp32p4
@pytest.mark.generic @pytest.mark.generic
@pytest.mark.parametrize( @pytest.mark.parametrize(
'config', 'config',
@ -14,5 +13,6 @@ from pytest_embedded import Dut
], ],
indirect=True, indirect=True,
) )
@idf_parametrize('target', ['esp32p4'], indirect=['target'])
def test_dma2d(dut: Dut) -> None: def test_dma2d(dut: Dut) -> None:
dut.run_all_single_board_cases() dut.run_all_single_board_cases()

View File

@ -1,18 +1,15 @@
# SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD # SPDX-FileCopyrightText: 2022-2025 Espressif Systems (Shanghai) CO LTD
# SPDX-License-Identifier: CC0-1.0 # SPDX-License-Identifier: CC0-1.0
import pytest import pytest
from pytest_embedded import Dut from pytest_embedded import Dut
from pytest_embedded_idf.utils import idf_parametrize
@pytest.mark.generic @pytest.mark.generic
@pytest.mark.parametrize( @idf_parametrize(
'config', 'config,target',
[ [('single_core_esp32', 'esp32'), ('default', 'supported_targets'), ('release', 'supported_targets')],
pytest.param('single_core_esp32', marks=[pytest.mark.esp32]), indirect=['config', 'target'],
pytest.param('default', marks=[pytest.mark.supported_targets]),
pytest.param('release', marks=[pytest.mark.supported_targets]),
],
indirect=True,
) )
def test_esp_hw_support(dut: Dut) -> None: def test_esp_hw_support(dut: Dut) -> None:
dut.run_all_single_board_cases(timeout=180) dut.run_all_single_board_cases(timeout=180)

View File

@ -1,10 +1,11 @@
# SPDX-FileCopyrightText: 2023 Espressif Systems (Shanghai) CO LTD # SPDX-FileCopyrightText: 2023-2025 Espressif Systems (Shanghai) CO LTD
# SPDX-License-Identifier: Unlicense OR CC0-1.0 # SPDX-License-Identifier: Unlicense OR CC0-1.0
import pytest import pytest
from pytest_embedded import Dut from pytest_embedded import Dut
from pytest_embedded_idf.utils import idf_parametrize
@pytest.mark.linux
@pytest.mark.host_test @pytest.mark.host_test
@idf_parametrize('target', ['linux'], indirect=['target'])
def test_esp_hw_support_linux(dut: Dut) -> None: def test_esp_hw_support_linux(dut: Dut) -> None:
dut.run_all_single_board_cases(group='!ignore', timeout=120) dut.run_all_single_board_cases(group='!ignore', timeout=120)

View File

@ -1,44 +1,53 @@
# SPDX-FileCopyrightText: 2022-2024 Espressif Systems (Shanghai) CO LTD # SPDX-FileCopyrightText: 2022-2025 Espressif Systems (Shanghai) CO LTD
# SPDX-License-Identifier: CC0-1.0 # SPDX-License-Identifier: CC0-1.0
import os import os
import pathlib import pathlib
import pytest import pytest
from pytest_embedded_idf import IdfDut from pytest_embedded_idf import IdfDut
from pytest_embedded_idf.utils import idf_parametrize
MSPI_F8R8_configs = [p.name.replace('sdkconfig.ci.', '') for p in pathlib.Path(os.path.dirname(__file__)).glob('sdkconfig.ci.esp32s3_f8r8*')] MSPI_F8R8_configs = [
p.name.replace('sdkconfig.ci.', '')
for p in pathlib.Path(os.path.dirname(__file__)).glob('sdkconfig.ci.esp32s3_f8r8*')
]
@pytest.mark.esp32s3
@pytest.mark.MSPI_F8R8 @pytest.mark.MSPI_F8R8
@pytest.mark.parametrize('config', MSPI_F8R8_configs, indirect=True) @pytest.mark.parametrize('config', MSPI_F8R8_configs, indirect=True)
@idf_parametrize('target', ['esp32s3'], indirect=['target'])
def test_flash8_psram8(dut: IdfDut) -> None: def test_flash8_psram8(dut: IdfDut) -> None:
dut.run_all_single_board_cases() dut.run_all_single_board_cases()
# For F4R8 board (Quad Flash and Octal PSRAM) # For F4R8 board (Quad Flash and Octal PSRAM)
MSPI_F4R8_configs = [p.name.replace('sdkconfig.ci.', '') for p in pathlib.Path(os.path.dirname(__file__)).glob('sdkconfig.ci.esp32s3_f4r8*')] MSPI_F4R8_configs = [
p.name.replace('sdkconfig.ci.', '')
for p in pathlib.Path(os.path.dirname(__file__)).glob('sdkconfig.ci.esp32s3_f4r8*')
]
@pytest.mark.esp32s3
@pytest.mark.MSPI_F4R8 @pytest.mark.MSPI_F4R8
@pytest.mark.parametrize('config', MSPI_F4R8_configs, indirect=True) @pytest.mark.parametrize('config', MSPI_F4R8_configs, indirect=True)
@idf_parametrize('target', ['esp32s3'], indirect=['target'])
def test_flash4_psram8(dut: IdfDut) -> None: def test_flash4_psram8(dut: IdfDut) -> None:
dut.run_all_single_board_cases() dut.run_all_single_board_cases()
# For F4R4 board (Quad Flash and Quad PSRAM) # For F4R4 board (Quad Flash and Quad PSRAM)
MSPI_F4R4_configs = [p.name.replace('sdkconfig.ci.', '') for p in pathlib.Path(os.path.dirname(__file__)).glob('sdkconfig.ci.esp32s3_f4r4*')] MSPI_F4R4_configs = [
p.name.replace('sdkconfig.ci.', '')
for p in pathlib.Path(os.path.dirname(__file__)).glob('sdkconfig.ci.esp32s3_f4r4*')
]
@pytest.mark.esp32s3
@pytest.mark.MSPI_F4R4 @pytest.mark.MSPI_F4R4
@pytest.mark.parametrize('config', MSPI_F4R4_configs, indirect=True) @pytest.mark.parametrize('config', MSPI_F4R4_configs, indirect=True)
@idf_parametrize('target', ['esp32s3'], indirect=['target'])
def test_flash4_psram4(dut: IdfDut) -> None: def test_flash4_psram4(dut: IdfDut) -> None:
dut.run_all_single_board_cases() dut.run_all_single_board_cases()
@pytest.mark.esp32p4
@pytest.mark.flash_120m @pytest.mark.flash_120m
@pytest.mark.parametrize( @pytest.mark.parametrize(
'config', 'config',
@ -47,5 +56,6 @@ def test_flash4_psram4(dut: IdfDut) -> None:
], ],
indirect=True, indirect=True,
) )
@idf_parametrize('target', ['esp32p4'], indirect=['target'])
def test_flash_psram_esp32p4(dut: IdfDut) -> None: def test_flash_psram_esp32p4(dut: IdfDut) -> None:
dut.run_all_single_board_cases() dut.run_all_single_board_cases()

View File

@ -1,39 +1,45 @@
# SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD # SPDX-FileCopyrightText: 2022-2025 Espressif Systems (Shanghai) CO LTD
# SPDX-License-Identifier: CC0-1.0 # SPDX-License-Identifier: CC0-1.0
import os import os
import pathlib import pathlib
import pytest import pytest
from pytest_embedded_idf import IdfDut from pytest_embedded_idf import IdfDut
from pytest_embedded_idf.utils import idf_parametrize
MSPI_F8R8_configs = [p.name.replace('sdkconfig.ci.', '') for p in pathlib.Path(os.path.dirname(__file__)).glob('sdkconfig.ci.f8r8*')] MSPI_F8R8_configs = [
p.name.replace('sdkconfig.ci.', '') for p in pathlib.Path(os.path.dirname(__file__)).glob('sdkconfig.ci.f8r8*')
]
@pytest.mark.esp32s3
@pytest.mark.MSPI_F8R8 @pytest.mark.MSPI_F8R8
@pytest.mark.parametrize('config', MSPI_F8R8_configs, indirect=True) @pytest.mark.parametrize('config', MSPI_F8R8_configs, indirect=True)
@idf_parametrize('target', ['esp32s3'], indirect=['target'])
def test_flash8_psram8_with_dfs(dut: IdfDut) -> None: def test_flash8_psram8_with_dfs(dut: IdfDut) -> None:
dut.run_all_single_board_cases() dut.run_all_single_board_cases()
# For F4R8 board (Quad Flash and Octal PSRAM) # For F4R8 board (Quad Flash and Octal PSRAM)
MSPI_F4R8_configs = [p.name.replace('sdkconfig.ci.', '') for p in pathlib.Path(os.path.dirname(__file__)).glob('sdkconfig.ci.f4r8*')] MSPI_F4R8_configs = [
p.name.replace('sdkconfig.ci.', '') for p in pathlib.Path(os.path.dirname(__file__)).glob('sdkconfig.ci.f4r8*')
]
@pytest.mark.esp32s3
@pytest.mark.MSPI_F4R8 @pytest.mark.MSPI_F4R8
@pytest.mark.parametrize('config', MSPI_F4R8_configs, indirect=True) @pytest.mark.parametrize('config', MSPI_F4R8_configs, indirect=True)
@idf_parametrize('target', ['esp32s3'], indirect=['target'])
def test_flash4_psram8_with_dfs(dut: IdfDut) -> None: def test_flash4_psram8_with_dfs(dut: IdfDut) -> None:
dut.run_all_single_board_cases() dut.run_all_single_board_cases()
# For F4R4 board (Quad Flash and Quad PSRAM) # For F4R4 board (Quad Flash and Quad PSRAM)
MSPI_F4R4_configs = [p.name.replace('sdkconfig.ci.', '') for p in pathlib.Path(os.path.dirname(__file__)).glob('sdkconfig.ci.f4r4*')] MSPI_F4R4_configs = [
p.name.replace('sdkconfig.ci.', '') for p in pathlib.Path(os.path.dirname(__file__)).glob('sdkconfig.ci.f4r4*')
]
@pytest.mark.esp32s3
@pytest.mark.MSPI_F4R4 @pytest.mark.MSPI_F4R4
@pytest.mark.parametrize('config', MSPI_F4R4_configs, indirect=True) @pytest.mark.parametrize('config', MSPI_F4R4_configs, indirect=True)
@idf_parametrize('target', ['esp32s3'], indirect=['target'])
def test_flash4_psram4_with_dfs(dut: IdfDut) -> None: def test_flash4_psram4_with_dfs(dut: IdfDut) -> None:
dut.run_all_single_board_cases() dut.run_all_single_board_cases()

View File

@ -1,8 +1,8 @@
# SPDX-FileCopyrightText: 2021-2022 Espressif Systems (Shanghai) CO LTD # SPDX-FileCopyrightText: 2021-2025 Espressif Systems (Shanghai) CO LTD
# SPDX-License-Identifier: CC0-1.0 # SPDX-License-Identifier: CC0-1.0
import pytest import pytest
from pytest_embedded import Dut from pytest_embedded import Dut
from pytest_embedded_idf.utils import idf_parametrize
def deepsleep_test(dut: Dut, case_name: str) -> None: def deepsleep_test(dut: Dut, case_name: str) -> None:
@ -19,21 +19,15 @@ def deepsleep_test(dut: Dut, case_name: str) -> None:
dut.expect(r'rst:.*\(%s\)' % reset_reason, timeout=10) dut.expect(r'rst:.*\(%s\)' % reset_reason, timeout=10)
@pytest.mark.esp32
@pytest.mark.esp32s2
@pytest.mark.esp32s3
@pytest.mark.esp32c3
@pytest.mark.esp32c2
@pytest.mark.generic @pytest.mark.generic
@idf_parametrize('target', ['esp32', 'esp32s2', 'esp32s3', 'esp32c3', 'esp32c2'], indirect=['target'])
def test_rtc_8md256_deepsleep(dut: Dut) -> None: def test_rtc_8md256_deepsleep(dut: Dut) -> None:
deepsleep_test(dut, '"Can use 8MD256 as RTC clock source in deepsleep"') deepsleep_test(dut, '"Can use 8MD256 as RTC clock source in deepsleep"')
# Only targets with SOC_PM_SUPPORT_RTC_PERIPH_PD defined # Only targets with SOC_PM_SUPPORT_RTC_PERIPH_PD defined
@pytest.mark.esp32
@pytest.mark.esp32s2
@pytest.mark.esp32s3
@pytest.mark.generic @pytest.mark.generic
@idf_parametrize('target', ['esp32', 'esp32s2', 'esp32s3'], indirect=['target'])
def test_rtc_8md256_deepsleep_force_rtcperiph(dut: Dut) -> None: def test_rtc_8md256_deepsleep_force_rtcperiph(dut: Dut) -> None:
deepsleep_test(dut, '"Can use 8MD256 as RTC clock source in deepsleep (force rtc_periph)"') deepsleep_test(dut, '"Can use 8MD256 as RTC clock source in deepsleep (force rtc_periph)"')
@ -48,18 +42,13 @@ def lightsleep_test(dut: Dut, case_name: str) -> None:
dut.expect(r'Returned from light sleep, reason: timer', timeout=10) dut.expect(r'Returned from light sleep, reason: timer', timeout=10)
@pytest.mark.esp32
@pytest.mark.esp32s2
@pytest.mark.esp32s3
@pytest.mark.esp32c3
@pytest.mark.generic @pytest.mark.generic
@idf_parametrize('target', ['esp32', 'esp32s2', 'esp32s3', 'esp32c3'], indirect=['target'])
def test_rtc_8md256_lightsleep(dut: Dut) -> None: def test_rtc_8md256_lightsleep(dut: Dut) -> None:
lightsleep_test(dut, '"Can use 8MD256 as RTC clock source in lightsleep"') lightsleep_test(dut, '"Can use 8MD256 as RTC clock source in lightsleep"')
@pytest.mark.esp32
@pytest.mark.esp32s2
@pytest.mark.esp32s3
@pytest.mark.generic @pytest.mark.generic
@idf_parametrize('target', ['esp32', 'esp32s2', 'esp32s3'], indirect=['target'])
def test_rtc_8md256_lightsleep_force_rtcperiph(dut: Dut) -> None: def test_rtc_8md256_lightsleep_force_rtcperiph(dut: Dut) -> None:
lightsleep_test(dut, '"Can use 8MD256 as RTC clock source in lightsleep (force rtc_periph)"') lightsleep_test(dut, '"Can use 8MD256 as RTC clock source in lightsleep (force rtc_periph)"')

View File

@ -1,32 +1,33 @@
# SPDX-FileCopyrightText: 2022-2024 Espressif Systems (Shanghai) CO LTD # SPDX-FileCopyrightText: 2022-2025 Espressif Systems (Shanghai) CO LTD
# SPDX-License-Identifier: CC0-1.0 # SPDX-License-Identifier: CC0-1.0
from typing import Any from typing import Any
import pytest import pytest
from pytest_embedded import Dut from pytest_embedded import Dut
from pytest_embedded_idf.utils import idf_parametrize
@pytest.mark.generic @pytest.mark.generic
@pytest.mark.esp32 @idf_parametrize('target', ['esp32'], indirect=['target'])
def test_rtc_clk(dut: Dut) -> None: def test_rtc_clk(dut: Dut) -> None:
dut.run_all_single_board_cases(group='rtc_clk') dut.run_all_single_board_cases(group='rtc_clk')
@pytest.mark.esp32
@pytest.mark.xtal32k @pytest.mark.xtal32k
@idf_parametrize('target', ['esp32'], indirect=['target'])
def test_rtc_xtal32k(dut: Dut) -> None: def test_rtc_xtal32k(dut: Dut) -> None:
dut.run_all_single_board_cases(attributes={'test_env': 'xtal32k'}) dut.run_all_single_board_cases(attributes={'test_env': 'xtal32k'})
@pytest.mark.esp32
@pytest.mark.no32kXtal @pytest.mark.no32kXtal
@idf_parametrize('target', ['esp32'], indirect=['target'])
def test_rtc_no_xtal32k(dut: Dut) -> None: def test_rtc_no_xtal32k(dut: Dut) -> None:
dut.run_all_single_board_cases(attributes={'test_env': 'noXtal32k'}) dut.run_all_single_board_cases(attributes={'test_env': 'noXtal32k'})
@pytest.mark.generic @pytest.mark.generic
@pytest.mark.supported_targets
# TODO: [ESP32P4] IDF-8973 [ESP32C5] IDF-10309 [ESP32C61] IDF-9274 IDF-10984 # TODO: [ESP32P4] IDF-8973 [ESP32C5] IDF-10309 [ESP32C61] IDF-9274 IDF-10984
@pytest.mark.temp_skip_ci(targets=['esp32c6', 'esp32h2', 'esp32p4', 'esp32c5', 'esp32c61'], reason='support TBD') @pytest.mark.temp_skip_ci(targets=['esp32c6', 'esp32h2', 'esp32p4', 'esp32c5', 'esp32c61'], reason='support TBD')
@idf_parametrize('target', ['supported_targets'], indirect=['target'])
def test_rtc_calib(case_tester: Any) -> None: def test_rtc_calib(case_tester: Any) -> None:
case_tester.run_all_multi_stage_cases() case_tester.run_all_multi_stage_cases()

View File

@ -1,35 +1,15 @@
# SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD # SPDX-FileCopyrightText: 2022-2025 Espressif Systems (Shanghai) CO LTD
# SPDX-License-Identifier: CC0-1.0 # SPDX-License-Identifier: CC0-1.0
import functools
from typing import Callable
from typing import Dict
from typing import List
import pytest import pytest
from pytest_embedded import Dut from pytest_embedded import Dut
from pytest_embedded_idf.utils import idf_parametrize
def target_list(targets: List[str]) -> Callable:
def decorator(func: Callable) -> Callable:
@functools.wraps(func)
def wrapper(*args: List, **kwargs: Dict) -> Callable:
return func(*args, **kwargs) # type: ignore
for target in targets:
wrapper = pytest.mark.__getattr__(target)(wrapper)
return wrapper
return decorator
# SOC_PAU_SUPPORTED == 1 # SOC_PAU_SUPPORTED == 1
retention_targets = ['esp32c6', 'esp32h2', 'esp32p4', 'esp32c5', 'esp32c61'] retention_targets = ['esp32c6', 'esp32h2', 'esp32p4', 'esp32c5', 'esp32c61']
@target_list(retention_targets)
@pytest.mark.generic @pytest.mark.generic
@idf_parametrize('target', ['esp32c61', 'esp32c5', 'esp32p4', 'esp32h2', 'esp32c6'], indirect=['target'])
def test_sleep_retention(dut: Dut) -> None: def test_sleep_retention(dut: Dut) -> None:
dut.run_all_single_board_cases() dut.run_all_single_board_cases()

View File

@ -1,11 +1,12 @@
# SPDX-FileCopyrightText: 2024 Espressif Systems (Shanghai) CO LTD # SPDX-FileCopyrightText: 2024-2025 Espressif Systems (Shanghai) CO LTD
# SPDX-License-Identifier: Unlicense OR CC0-1.0 # SPDX-License-Identifier: Unlicense OR CC0-1.0
import pytest import pytest
from pytest_embedded import Dut from pytest_embedded import Dut
from pytest_embedded_idf.utils import idf_parametrize
@pytest.mark.esp32p4
@pytest.mark.temp_skip_ci(targets=['esp32p4'], reason='lack of runners for now') @pytest.mark.temp_skip_ci(targets=['esp32p4'], reason='lack of runners for now')
@pytest.mark.lp_i2s @pytest.mark.lp_i2s
@idf_parametrize('target', ['esp32p4'], indirect=['target'])
def test_efuse_component_ut(dut: Dut) -> None: def test_efuse_component_ut(dut: Dut) -> None:
dut.run_all_single_board_cases() dut.run_all_single_board_cases()

View File

@ -1,11 +1,11 @@
# SPDX-FileCopyrightText: 2022-2024 Espressif Systems (Shanghai) CO LTD # SPDX-FileCopyrightText: 2022-2025 Espressif Systems (Shanghai) CO LTD
# SPDX-License-Identifier: CC0-1.0 # SPDX-License-Identifier: CC0-1.0
from time import sleep from time import sleep
from typing import Tuple from typing import Tuple
import pytest import pytest
from pytest_embedded_idf.dut import IdfDut from pytest_embedded_idf.dut import IdfDut
from pytest_embedded_idf.utils import idf_parametrize
TEST_CONFIGS = [ TEST_CONFIGS = [
pytest.param('default'), pytest.param('default'),
@ -36,14 +36,10 @@ available_rtcio_nums = {
} }
@pytest.mark.esp32
@pytest.mark.esp32s2
@pytest.mark.esp32s3
@pytest.mark.esp32c6
@pytest.mark.esp32h2
@pytest.mark.generic_multi_device @pytest.mark.generic_multi_device
@pytest.mark.parametrize('count', [2], indirect=True) @pytest.mark.parametrize('count', [2], indirect=True)
@pytest.mark.parametrize('config', TEST_CONFIGS, indirect=True) @pytest.mark.parametrize('config', TEST_CONFIGS, indirect=True)
@idf_parametrize('target', ['esp32', 'esp32s2', 'esp32s3', 'esp32c6', 'esp32h2'], indirect=['target'])
def test_ext1_deepsleep(dut: Tuple[IdfDut, IdfDut]) -> None: def test_ext1_deepsleep(dut: Tuple[IdfDut, IdfDut]) -> None:
wakee = dut[0] wakee = dut[0]
waker = dut[1] waker = dut[1]
@ -86,12 +82,10 @@ def test_ext1_deepsleep(dut: Tuple[IdfDut, IdfDut]) -> None:
wakee.expect(f'io_wakeup_num = {gpio_num}', timeout=10) wakee.expect(f'io_wakeup_num = {gpio_num}', timeout=10)
@pytest.mark.esp32c2
@pytest.mark.esp32c3
@pytest.mark.esp32c6
@pytest.mark.generic_multi_device @pytest.mark.generic_multi_device
@pytest.mark.parametrize('count', [2], indirect=True) @pytest.mark.parametrize('count', [2], indirect=True)
@pytest.mark.parametrize('config', TEST_CONFIGS, indirect=True) @pytest.mark.parametrize('config', TEST_CONFIGS, indirect=True)
@idf_parametrize('target', ['esp32c2', 'esp32c3', 'esp32c6'], indirect=['target'])
def test_rtcio_deepsleep(dut: Tuple[IdfDut, IdfDut]) -> None: def test_rtcio_deepsleep(dut: Tuple[IdfDut, IdfDut]) -> None:
wakee = dut[0] wakee = dut[0]
waker = dut[1] waker = dut[1]
@ -134,16 +128,12 @@ def test_rtcio_deepsleep(dut: Tuple[IdfDut, IdfDut]) -> None:
wakee.expect(f'io_wakeup_num = {gpio_num}', timeout=10) wakee.expect(f'io_wakeup_num = {gpio_num}', timeout=10)
@pytest.mark.esp32
@pytest.mark.esp32c2
@pytest.mark.esp32c3
@pytest.mark.esp32s2
@pytest.mark.esp32s3
@pytest.mark.esp32c6
@pytest.mark.esp32h2
@pytest.mark.generic_multi_device @pytest.mark.generic_multi_device
@pytest.mark.parametrize('count', [2], indirect=True) @pytest.mark.parametrize('count', [2], indirect=True)
@pytest.mark.parametrize('config', TEST_CONFIGS, indirect=True) @pytest.mark.parametrize('config', TEST_CONFIGS, indirect=True)
@idf_parametrize(
'target', ['esp32', 'esp32c2', 'esp32c3', 'esp32s2', 'esp32s3', 'esp32c6', 'esp32h2'], indirect=['target']
)
def test_gpio_wakeup_enable_lightsleep(dut: Tuple[IdfDut, IdfDut]) -> None: def test_gpio_wakeup_enable_lightsleep(dut: Tuple[IdfDut, IdfDut]) -> None:
wakee = dut[0] wakee = dut[0]
waker = dut[1] waker = dut[1]
@ -153,7 +143,6 @@ def test_gpio_wakeup_enable_lightsleep(dut: Tuple[IdfDut, IdfDut]) -> None:
for wakeup_level in [1, 0]: for wakeup_level in [1, 0]:
for gpio_num in gpio_nums: for gpio_num in gpio_nums:
wakee.write('\r\n') wakee.write('\r\n')
wakee.expect('io_wakeup_test>', timeout=10) wakee.expect('io_wakeup_test>', timeout=10)
wakee.write(f'gpio -p {gpio_num} -l {wakeup_level}') wakee.write(f'gpio -p {gpio_num} -l {wakeup_level}')

View File

@ -1,11 +1,10 @@
# SPDX-FileCopyrightText: 2021-2022 Espressif Systems (Shanghai) CO LTD # SPDX-FileCopyrightText: 2021-2025 Espressif Systems (Shanghai) CO LTD
# SPDX-License-Identifier: CC0-1.0 # SPDX-License-Identifier: CC0-1.0
import pytest import pytest
from pytest_embedded import Dut from pytest_embedded import Dut
from pytest_embedded_idf.utils import idf_parametrize
@pytest.mark.esp32c3
@pytest.mark.i2c_oled @pytest.mark.i2c_oled
@pytest.mark.parametrize( @pytest.mark.parametrize(
'config', 'config',
@ -14,5 +13,6 @@ from pytest_embedded import Dut
], ],
indirect=True, indirect=True,
) )
@idf_parametrize('target', ['esp32c3'], indirect=['target'])
def test_i2c_lcd(dut: Dut) -> None: def test_i2c_lcd(dut: Dut) -> None:
dut.run_all_single_board_cases() dut.run_all_single_board_cases()

View File

@ -1,11 +1,10 @@
# SPDX-FileCopyrightText: 2021-2022 Espressif Systems (Shanghai) CO LTD # SPDX-FileCopyrightText: 2021-2025 Espressif Systems (Shanghai) CO LTD
# SPDX-License-Identifier: CC0-1.0 # SPDX-License-Identifier: CC0-1.0
import pytest import pytest
from pytest_embedded import Dut from pytest_embedded import Dut
from pytest_embedded_idf.utils import idf_parametrize
@pytest.mark.esp32c3
@pytest.mark.i2c_oled @pytest.mark.i2c_oled
@pytest.mark.parametrize( @pytest.mark.parametrize(
'config', 'config',
@ -14,5 +13,6 @@ from pytest_embedded import Dut
], ],
indirect=True, indirect=True,
) )
@idf_parametrize('target', ['esp32c3'], indirect=['target'])
def test_i2c_lcd_legacy(dut: Dut) -> None: def test_i2c_lcd_legacy(dut: Dut) -> None:
dut.run_all_single_board_cases() dut.run_all_single_board_cases()

View File

@ -1,13 +1,10 @@
# SPDX-FileCopyrightText: 2021-2022 Espressif Systems (Shanghai) CO LTD # SPDX-FileCopyrightText: 2021-2025 Espressif Systems (Shanghai) CO LTD
# SPDX-License-Identifier: CC0-1.0 # SPDX-License-Identifier: CC0-1.0
import pytest import pytest
from pytest_embedded import Dut from pytest_embedded import Dut
from pytest_embedded_idf.utils import idf_parametrize
@pytest.mark.esp32
@pytest.mark.esp32s2
@pytest.mark.esp32s3
@pytest.mark.esp32p4
@pytest.mark.generic @pytest.mark.generic
@pytest.mark.parametrize( @pytest.mark.parametrize(
'config', 'config',
@ -16,5 +13,6 @@ from pytest_embedded import Dut
], ],
indirect=True, indirect=True,
) )
@idf_parametrize('target', ['esp32', 'esp32s2', 'esp32s3', 'esp32p4'], indirect=['target'])
def test_i80_lcd(dut: Dut) -> None: def test_i80_lcd(dut: Dut) -> None:
dut.run_all_single_board_cases() dut.run_all_single_board_cases()

View File

@ -1,10 +1,10 @@
# SPDX-FileCopyrightText: 2023-2024 Espressif Systems (Shanghai) CO LTD # SPDX-FileCopyrightText: 2023-2025 Espressif Systems (Shanghai) CO LTD
# SPDX-License-Identifier: CC0-1.0 # SPDX-License-Identifier: CC0-1.0
import pytest import pytest
from pytest_embedded import Dut from pytest_embedded import Dut
from pytest_embedded_idf.utils import idf_parametrize
@pytest.mark.esp32p4
@pytest.mark.generic @pytest.mark.generic
@pytest.mark.parametrize( @pytest.mark.parametrize(
'config', 'config',
@ -14,5 +14,6 @@ from pytest_embedded import Dut
], ],
indirect=True, indirect=True,
) )
@idf_parametrize('target', ['esp32p4'], indirect=['target'])
def test_dsi_lcd(dut: Dut) -> None: def test_dsi_lcd(dut: Dut) -> None:
dut.run_all_single_board_cases() dut.run_all_single_board_cases()

View File

@ -1,12 +1,10 @@
# SPDX-FileCopyrightText: 2024 Espressif Systems (Shanghai) CO LTD # SPDX-FileCopyrightText: 2024-2025 Espressif Systems (Shanghai) CO LTD
# SPDX-License-Identifier: CC0-1.0 # SPDX-License-Identifier: CC0-1.0
import pytest import pytest
from pytest_embedded import Dut from pytest_embedded import Dut
from pytest_embedded_idf.utils import idf_parametrize
@pytest.mark.esp32p4
@pytest.mark.esp32h2
@pytest.mark.esp32c5
@pytest.mark.generic @pytest.mark.generic
@pytest.mark.parametrize( @pytest.mark.parametrize(
'config', 'config',
@ -15,5 +13,6 @@ from pytest_embedded import Dut
], ],
indirect=True, indirect=True,
) )
@idf_parametrize('target', ['esp32p4', 'esp32h2', 'esp32c5'], indirect=['target'])
def test_parlio_lcd(dut: Dut) -> None: def test_parlio_lcd(dut: Dut) -> None:
dut.run_all_single_board_cases() dut.run_all_single_board_cases()

View File

@ -1,10 +1,10 @@
# SPDX-FileCopyrightText: 2021-2024 Espressif Systems (Shanghai) CO LTD # SPDX-FileCopyrightText: 2021-2025 Espressif Systems (Shanghai) CO LTD
# SPDX-License-Identifier: CC0-1.0 # SPDX-License-Identifier: CC0-1.0
import pytest import pytest
from pytest_embedded import Dut from pytest_embedded import Dut
from pytest_embedded_idf.utils import idf_parametrize
@pytest.mark.esp32s3
@pytest.mark.octal_psram @pytest.mark.octal_psram
@pytest.mark.parametrize( @pytest.mark.parametrize(
'config', 'config',
@ -14,11 +14,11 @@ from pytest_embedded import Dut
], ],
indirect=True, indirect=True,
) )
@idf_parametrize('target', ['esp32s3'], indirect=['target'])
def test_rgb_lcd_esp32s3(dut: Dut) -> None: def test_rgb_lcd_esp32s3(dut: Dut) -> None:
dut.run_all_single_board_cases() dut.run_all_single_board_cases()
@pytest.mark.esp32p4
@pytest.mark.generic @pytest.mark.generic
@pytest.mark.parametrize( @pytest.mark.parametrize(
'config', 'config',
@ -28,5 +28,6 @@ def test_rgb_lcd_esp32s3(dut: Dut) -> None:
], ],
indirect=True, indirect=True,
) )
@idf_parametrize('target', ['esp32p4'], indirect=['target'])
def test_rgb_lcd_esp32p4(dut: Dut) -> None: def test_rgb_lcd_esp32p4(dut: Dut) -> None:
dut.run_all_single_board_cases() dut.run_all_single_board_cases()

View File

@ -1,10 +1,10 @@
# SPDX-FileCopyrightText: 2021-2022 Espressif Systems (Shanghai) CO LTD # SPDX-FileCopyrightText: 2021-2025 Espressif Systems (Shanghai) CO LTD
# SPDX-License-Identifier: CC0-1.0 # SPDX-License-Identifier: CC0-1.0
import pytest import pytest
from pytest_embedded import Dut from pytest_embedded import Dut
from pytest_embedded_idf.utils import idf_parametrize
@pytest.mark.supported_targets
@pytest.mark.generic @pytest.mark.generic
@pytest.mark.parametrize( @pytest.mark.parametrize(
'config', 'config',
@ -13,5 +13,6 @@ from pytest_embedded import Dut
], ],
indirect=True, indirect=True,
) )
@idf_parametrize('target', ['supported_targets'], indirect=['target'])
def test_spi_lcd(dut: Dut) -> None: def test_spi_lcd(dut: Dut) -> None:
dut.run_all_single_board_cases() dut.run_all_single_board_cases()

View File

@ -1,11 +1,11 @@
# SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD # SPDX-FileCopyrightText: 2022-2025 Espressif Systems (Shanghai) CO LTD
# SPDX-License-Identifier: CC0-1.0 # SPDX-License-Identifier: CC0-1.0
import pytest import pytest
from pytest_embedded import Dut from pytest_embedded import Dut
from pytest_embedded_idf.utils import idf_parametrize
# normal mmu tests # normal mmu tests
@pytest.mark.supported_targets
@pytest.mark.generic @pytest.mark.generic
@pytest.mark.parametrize( @pytest.mark.parametrize(
'config', 'config',
@ -14,6 +14,7 @@ from pytest_embedded import Dut
], ],
indirect=True, indirect=True,
) )
@idf_parametrize('target', ['supported_targets'], indirect=['target'])
def test_mmap(dut: Dut) -> None: def test_mmap(dut: Dut) -> None:
dut.run_all_single_board_cases(group='mmu') dut.run_all_single_board_cases(group='mmu')
@ -28,7 +29,16 @@ PSRAM_RELEASE_CONFIGS = [
@pytest.mark.generic @pytest.mark.generic
@pytest.mark.parametrize('config', PSRAM_RELEASE_CONFIGS, indirect=True) @idf_parametrize(
'config,target',
[
('psram_release_esp32', 'esp32'),
('psram_release_esp32s2', 'esp32s2'),
('psram_release_esp32s3', 'esp32s3'),
('psram_release_esp32p4', 'esp32p4'),
],
indirect=['config', 'target'],
)
def test_mmap_psram(dut: Dut) -> None: def test_mmap_psram(dut: Dut) -> None:
dut.run_all_single_board_cases(group='mmu') dut.run_all_single_board_cases(group='mmu')
@ -41,13 +51,14 @@ XIP_CONFIGS = [
@pytest.mark.generic @pytest.mark.generic
@pytest.mark.parametrize('config', XIP_CONFIGS, indirect=True) @idf_parametrize(
'config,target', [('xip_psram_esp32s2', 'esp32s2'), ('xip_psram_esp32s3', 'esp32s3')], indirect=['config', 'target']
)
def test_mmap_xip_psram(dut: Dut) -> None: def test_mmap_xip_psram(dut: Dut) -> None:
dut.run_all_single_board_cases(group='mmu') dut.run_all_single_board_cases(group='mmu')
# normal cache tests # normal cache tests
@pytest.mark.supported_targets
@pytest.mark.generic @pytest.mark.generic
@pytest.mark.parametrize( @pytest.mark.parametrize(
'config', 'config',
@ -56,19 +67,31 @@ def test_mmap_xip_psram(dut: Dut) -> None:
], ],
indirect=True, indirect=True,
) )
@idf_parametrize('target', ['supported_targets'], indirect=['target'])
def test_cache(dut: Dut) -> None: def test_cache(dut: Dut) -> None:
dut.run_all_single_board_cases(group='cache') dut.run_all_single_board_cases(group='cache')
# cache tests with psram enabled # cache tests with psram enabled
@pytest.mark.generic @pytest.mark.generic
@pytest.mark.parametrize('config', PSRAM_RELEASE_CONFIGS, indirect=True) @idf_parametrize(
'config,target',
[
('psram_release_esp32', 'esp32'),
('psram_release_esp32s2', 'esp32s2'),
('psram_release_esp32s3', 'esp32s3'),
('psram_release_esp32p4', 'esp32p4'),
],
indirect=['config', 'target'],
)
def test_cache_psram(dut: Dut) -> None: def test_cache_psram(dut: Dut) -> None:
dut.run_all_single_board_cases(group='cache') dut.run_all_single_board_cases(group='cache')
# cache tests with xip_psram # cache tests with xip_psram
@pytest.mark.generic @pytest.mark.generic
@pytest.mark.parametrize('config', XIP_CONFIGS, indirect=True) @idf_parametrize(
'config,target', [('xip_psram_esp32s2', 'esp32s2'), ('xip_psram_esp32s3', 'esp32s3')], indirect=['config', 'target']
)
def test_cache_xip_psram(dut: Dut) -> None: def test_cache_xip_psram(dut: Dut) -> None:
dut.run_all_single_board_cases(group='cache') dut.run_all_single_board_cases(group='cache')

View File

@ -1,11 +1,10 @@
# SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD # SPDX-FileCopyrightText: 2022-2025 Espressif Systems (Shanghai) CO LTD
# SPDX-License-Identifier: CC0-1.0 # SPDX-License-Identifier: CC0-1.0
import pytest import pytest
from pytest_embedded import Dut from pytest_embedded import Dut
from pytest_embedded_idf.utils import idf_parametrize
@pytest.mark.supported_targets
@pytest.mark.generic @pytest.mark.generic
@pytest.mark.parametrize( @pytest.mark.parametrize(
'config', 'config',
@ -14,5 +13,6 @@ from pytest_embedded import Dut
], ],
indirect=True, indirect=True,
) )
@idf_parametrize('target', ['supported_targets'], indirect=['target'])
def test_mmap_hw(dut: Dut) -> None: def test_mmap_hw(dut: Dut) -> None:
dut.run_all_single_board_cases(group='mmu', timeout=600) dut.run_all_single_board_cases(group='mmu', timeout=600)

View File

@ -1,16 +1,20 @@
# SPDX-FileCopyrightText: 2022-2024 Espressif Systems (Shanghai) CO LTD # SPDX-FileCopyrightText: 2022-2025 Espressif Systems (Shanghai) CO LTD
# SPDX-License-Identifier: CC0-1.0 # SPDX-License-Identifier: CC0-1.0
import pytest import pytest
from pytest_embedded import Dut from pytest_embedded import Dut
from pytest_embedded_idf.utils import idf_parametrize
@pytest.mark.esp32s2
@pytest.mark.esp32c3
@pytest.mark.generic @pytest.mark.generic
@pytest.mark.parametrize('config', [ @pytest.mark.parametrize(
'global_dns', 'config',
'dns_per_netif', [
'loopback', # test config without LWIP 'global_dns',
], indirect=True) 'dns_per_netif',
'loopback', # test config without LWIP
],
indirect=True,
)
@idf_parametrize('target', ['esp32s2', 'esp32c3'], indirect=['target'])
def test_esp_netif(dut: Dut) -> None: def test_esp_netif(dut: Dut) -> None:
dut.expect_unity_test_output() dut.expect_unity_test_output()

View File

@ -1,22 +1,31 @@
# SPDX-FileCopyrightText: 2022-2024 Espressif Systems (Shanghai) CO LTD # SPDX-FileCopyrightText: 2022-2025 Espressif Systems (Shanghai) CO LTD
# SPDX-License-Identifier: CC0-1.0 # SPDX-License-Identifier: CC0-1.0
import pytest import pytest
from pytest_embedded import Dut from pytest_embedded import Dut
from pytest_embedded_idf.utils import idf_parametrize
@pytest.mark.esp32
@pytest.mark.ethernet @pytest.mark.ethernet
@pytest.mark.parametrize('config', [ @pytest.mark.parametrize(
'defaults', 'config',
], indirect=True) [
'defaults',
],
indirect=True,
)
@idf_parametrize('target', ['esp32'], indirect=['target'])
def test_esp_netif_vfs_l2tp(dut: Dut) -> None: def test_esp_netif_vfs_l2tp(dut: Dut) -> None:
dut.run_all_single_board_cases() dut.run_all_single_board_cases()
@pytest.mark.esp32p4
@pytest.mark.eth_ip101 @pytest.mark.eth_ip101
@pytest.mark.parametrize('config', [ @pytest.mark.parametrize(
'defaults', 'config',
], indirect=True) [
'defaults',
],
indirect=True,
)
@idf_parametrize('target', ['esp32p4'], indirect=['target'])
def test_esp_netif_vfs_l2tp_p4(dut: Dut) -> None: def test_esp_netif_vfs_l2tp_p4(dut: Dut) -> None:
dut.run_all_single_board_cases() dut.run_all_single_board_cases()

View File

@ -1,10 +1,11 @@
# SPDX-FileCopyrightText: 2023 Espressif Systems (Shanghai) CO LTD # SPDX-FileCopyrightText: 2023-2025 Espressif Systems (Shanghai) CO LTD
# SPDX-License-Identifier: Unlicense OR CC0-1.0 # SPDX-License-Identifier: Unlicense OR CC0-1.0
import pytest import pytest
from pytest_embedded import Dut from pytest_embedded import Dut
from pytest_embedded_idf.utils import idf_parametrize
@pytest.mark.linux
@pytest.mark.host_test @pytest.mark.host_test
@idf_parametrize('target', ['linux'], indirect=['target'])
def test_esp_partition_linux(dut: Dut) -> None: def test_esp_partition_linux(dut: Dut) -> None:
dut.expect_unity_test_output(timeout=5) dut.expect_unity_test_output(timeout=5)

View File

@ -1,61 +1,57 @@
# SPDX-FileCopyrightText: 2024 Espressif Systems (Shanghai) CO LTD # SPDX-FileCopyrightText: 2024-2025 Espressif Systems (Shanghai) CO LTD
# SPDX-License-Identifier: Apache-2.0 # SPDX-License-Identifier: Apache-2.0
import pytest import pytest
from pytest_embedded import Dut from pytest_embedded import Dut
from pytest_embedded_idf.utils import idf_parametrize
@pytest.mark.generic @pytest.mark.generic
@pytest.mark.supported_targets
@pytest.mark.temp_skip_ci(targets=['esp32c61'], reason='not supported yet') # TODO: [ESP32C61] IDF-9250 IDF-10985 @pytest.mark.temp_skip_ci(targets=['esp32c61'], reason='not supported yet') # TODO: [ESP32C61] IDF-9250 IDF-10985
@pytest.mark.parametrize('config', [ @pytest.mark.parametrize(
'default', 'config',
'slp_iram_opt', [
'limits', 'default',
'options', 'slp_iram_opt',
], indirect=True) 'limits',
'options',
],
indirect=True,
)
@idf_parametrize('target', ['supported_targets'], indirect=['target'])
def test_esp_pm(dut: Dut) -> None: def test_esp_pm(dut: Dut) -> None:
dut.run_all_single_board_cases() dut.run_all_single_board_cases()
# psram attr tests with xip_psram # psram attr tests with xip_psram
@pytest.mark.esp32s2
@pytest.mark.generic @pytest.mark.generic
@pytest.mark.parametrize( @pytest.mark.parametrize(
'config', 'config',
[ ['pm_xip_psram_esp32s2'],
'pm_xip_psram_esp32s2'
],
indirect=True, indirect=True,
) )
@idf_parametrize('target', ['esp32s2'], indirect=['target'])
def test_esp_attr_xip_psram_esp32s2(dut: Dut) -> None: def test_esp_attr_xip_psram_esp32s2(dut: Dut) -> None:
dut.run_all_single_board_cases() dut.run_all_single_board_cases()
# psram attr tests with xip_psram # psram attr tests with xip_psram
@pytest.mark.esp32s3
@pytest.mark.generic @pytest.mark.generic
@pytest.mark.parametrize( @pytest.mark.parametrize(
'config', 'config',
[ ['pm_xip_psram_esp32s3'],
'pm_xip_psram_esp32s3'
],
indirect=True, indirect=True,
) )
@idf_parametrize('target', ['esp32s3'], indirect=['target'])
def test_esp_attr_xip_psram_esp32s3(dut: Dut) -> None: def test_esp_attr_xip_psram_esp32s3(dut: Dut) -> None:
dut.run_all_single_board_cases() dut.run_all_single_board_cases()
# power down CPU and TOP domain in auto-lightsleep # power down CPU and TOP domain in auto-lightsleep
@pytest.mark.esp32c5
@pytest.mark.esp32c6
@pytest.mark.esp32h2
@pytest.mark.esp32p4
@pytest.mark.generic @pytest.mark.generic
@pytest.mark.parametrize( @pytest.mark.parametrize(
'config', 'config',
[ ['pm_pd_top_sleep'],
'pm_pd_top_sleep'
],
) )
@idf_parametrize('target', ['esp32c5', 'esp32c6', 'esp32h2', 'esp32p4'], indirect=['target'])
def test_esp_pd_top_and_cpu_sleep(dut: Dut) -> None: def test_esp_pd_top_and_cpu_sleep(dut: Dut) -> None:
dut.run_all_single_board_cases() dut.run_all_single_board_cases()

View File

@ -1,10 +1,10 @@
# SPDX-FileCopyrightText: 2021-2024 Espressif Systems (Shanghai) CO LTD # SPDX-FileCopyrightText: 2021-2025 Espressif Systems (Shanghai) CO LTD
# SPDX-License-Identifier: CC0-1.0 # SPDX-License-Identifier: CC0-1.0
import pytest import pytest
from pytest_embedded import Dut from pytest_embedded import Dut
from pytest_embedded_idf.utils import idf_parametrize
@pytest.mark.esp32
@pytest.mark.generic @pytest.mark.generic
@pytest.mark.parametrize( @pytest.mark.parametrize(
'config', 'config',
@ -14,11 +14,11 @@ from pytest_embedded import Dut
], ],
indirect=True, indirect=True,
) )
@idf_parametrize('target', ['esp32'], indirect=['target'])
def test_psram_esp32(dut: Dut) -> None: def test_psram_esp32(dut: Dut) -> None:
dut.run_all_single_board_cases() dut.run_all_single_board_cases()
@pytest.mark.esp32
@pytest.mark.psramv0 @pytest.mark.psramv0
@pytest.mark.parametrize( @pytest.mark.parametrize(
'config', 'config',
@ -28,11 +28,11 @@ def test_psram_esp32(dut: Dut) -> None:
], ],
indirect=True, indirect=True,
) )
@idf_parametrize('target', ['esp32'], indirect=['target'])
def test_psram_esp32_psramv0(dut: Dut) -> None: def test_psram_esp32_psramv0(dut: Dut) -> None:
dut.run_all_single_board_cases() dut.run_all_single_board_cases()
@pytest.mark.esp32s2
@pytest.mark.generic @pytest.mark.generic
@pytest.mark.parametrize( @pytest.mark.parametrize(
'config', 'config',
@ -42,11 +42,11 @@ def test_psram_esp32_psramv0(dut: Dut) -> None:
], ],
indirect=True, indirect=True,
) )
@idf_parametrize('target', ['esp32s2'], indirect=['target'])
def test_psram_esp32s2(dut: Dut) -> None: def test_psram_esp32s2(dut: Dut) -> None:
dut.run_all_single_board_cases() dut.run_all_single_board_cases()
@pytest.mark.esp32s3
@pytest.mark.generic @pytest.mark.generic
@pytest.mark.parametrize( @pytest.mark.parametrize(
'config', 'config',
@ -56,11 +56,11 @@ def test_psram_esp32s2(dut: Dut) -> None:
], ],
indirect=True, indirect=True,
) )
@idf_parametrize('target', ['esp32s3'], indirect=['target'])
def test_psram_esp32s3(dut: Dut) -> None: def test_psram_esp32s3(dut: Dut) -> None:
dut.run_all_single_board_cases() dut.run_all_single_board_cases()
@pytest.mark.esp32s3
@pytest.mark.octal_psram @pytest.mark.octal_psram
@pytest.mark.parametrize( @pytest.mark.parametrize(
'config', 'config',
@ -70,25 +70,22 @@ def test_psram_esp32s3(dut: Dut) -> None:
], ],
indirect=True, indirect=True,
) )
@idf_parametrize('target', ['esp32s3'], indirect=['target'])
def test_psram_esp32s3_octal(dut: Dut) -> None: def test_psram_esp32s3_octal(dut: Dut) -> None:
dut.run_all_single_board_cases() dut.run_all_single_board_cases()
@pytest.mark.esp32p4
@pytest.mark.generic @pytest.mark.generic
@pytest.mark.parametrize( @pytest.mark.parametrize(
'config', 'config',
[ ['esp32p4_200m_release', 'esp32p4_xip'],
'esp32p4_200m_release',
'esp32p4_xip'
],
indirect=True, indirect=True,
) )
@idf_parametrize('target', ['esp32p4'], indirect=['target'])
def test_psram_esp32p4(dut: Dut) -> None: def test_psram_esp32p4(dut: Dut) -> None:
dut.run_all_single_board_cases() dut.run_all_single_board_cases()
@pytest.mark.esp32c5
@pytest.mark.generic @pytest.mark.generic
@pytest.mark.parametrize( @pytest.mark.parametrize(
'config', 'config',
@ -98,11 +95,11 @@ def test_psram_esp32p4(dut: Dut) -> None:
], ],
indirect=True, indirect=True,
) )
@idf_parametrize('target', ['esp32c5'], indirect=['target'])
def test_psram_esp32c5(dut: Dut) -> None: def test_psram_esp32c5(dut: Dut) -> None:
dut.run_all_single_board_cases() dut.run_all_single_board_cases()
@pytest.mark.esp32c61
@pytest.mark.generic @pytest.mark.generic
@pytest.mark.parametrize( @pytest.mark.parametrize(
'config', 'config',
@ -112,5 +109,6 @@ def test_psram_esp32c5(dut: Dut) -> None:
], ],
indirect=True, indirect=True,
) )
@idf_parametrize('target', ['esp32c61'], indirect=['target'])
def test_psram_esp32c61(dut: Dut) -> None: def test_psram_esp32c61(dut: Dut) -> None:
dut.run_all_single_board_cases() dut.run_all_single_board_cases()

View File

@ -1,39 +1,52 @@
# SPDX-FileCopyrightText: 2022-2024 Espressif Systems (Shanghai) CO LTD # SPDX-FileCopyrightText: 2022-2025 Espressif Systems (Shanghai) CO LTD
# SPDX-License-Identifier: CC0-1.0 # SPDX-License-Identifier: CC0-1.0
import pytest import pytest
from pytest_embedded import Dut from pytest_embedded import Dut
from pytest_embedded_idf.utils import idf_parametrize
@pytest.mark.generic @pytest.mark.generic
@pytest.mark.parametrize('target', [ @pytest.mark.parametrize(
'esp32', 'target',
'esp32s2', [
]) 'esp32',
@pytest.mark.parametrize('config', [ 'esp32s2',
'default', ],
'ringbuf_flash', )
]) @pytest.mark.parametrize(
'config',
[
'default',
'ringbuf_flash',
],
)
def test_esp_ringbuf(dut: Dut) -> None: def test_esp_ringbuf(dut: Dut) -> None:
dut.run_all_single_board_cases() dut.run_all_single_board_cases()
@pytest.mark.host_test @pytest.mark.host_test
@pytest.mark.qemu @pytest.mark.qemu
@pytest.mark.parametrize('target', [ @pytest.mark.parametrize(
'esp32', 'target',
'esp32c3', [
]) 'esp32',
@pytest.mark.parametrize('config', [ 'esp32c3',
'default', ],
'ringbuf_flash', )
]) @pytest.mark.parametrize(
'config',
[
'default',
'ringbuf_flash',
],
)
def test_esp_ringbuf_qemu(dut: Dut) -> None: def test_esp_ringbuf_qemu(dut: Dut) -> None:
for case in dut.test_menu: for case in dut.test_menu:
if 'qemu-ignore' not in case.groups and not case.is_ignored and case.type == 'normal': if 'qemu-ignore' not in case.groups and not case.is_ignored and case.type == 'normal':
dut._run_normal_case(case) dut._run_normal_case(case)
@pytest.mark.linux
@pytest.mark.host_test @pytest.mark.host_test
@idf_parametrize('target', ['linux'], indirect=['target'])
def test_esp_ringbuf_posix_simulator(dut: Dut) -> None: def test_esp_ringbuf_posix_simulator(dut: Dut) -> None:
dut.run_all_single_board_cases(group='linux') dut.run_all_single_board_cases(group='linux')

View File

@ -1,10 +1,11 @@
# SPDX-FileCopyrightText: 2023 Espressif Systems (Shanghai) CO LTD # SPDX-FileCopyrightText: 2023-2025 Espressif Systems (Shanghai) CO LTD
# SPDX-License-Identifier: Unlicense OR CC0-1.0 # SPDX-License-Identifier: Unlicense OR CC0-1.0
import pytest import pytest
from pytest_embedded import Dut from pytest_embedded import Dut
from pytest_embedded_idf.utils import idf_parametrize
@pytest.mark.linux
@pytest.mark.host_test @pytest.mark.host_test
@idf_parametrize('target', ['linux'], indirect=['target'])
def test_esp_rom_linux(dut: Dut) -> None: def test_esp_rom_linux(dut: Dut) -> None:
dut.expect_exact('All tests passed', timeout=5) dut.expect_exact('All tests passed', timeout=5)

View File

@ -1,10 +1,10 @@
# SPDX-FileCopyrightText: 2024 Espressif Systems (Shanghai) CO LTD # SPDX-FileCopyrightText: 2024-2025 Espressif Systems (Shanghai) CO LTD
# SPDX-License-Identifier: CC0-1.0 # SPDX-License-Identifier: CC0-1.0
import pytest import pytest
from pytest_embedded import Dut from pytest_embedded import Dut
from pytest_embedded_idf.utils import idf_parametrize
@pytest.mark.supported_targets
@pytest.mark.generic @pytest.mark.generic
@pytest.mark.parametrize( @pytest.mark.parametrize(
'config', 'config',
@ -14,5 +14,6 @@ from pytest_embedded import Dut
], ],
indirect=True, indirect=True,
) )
@idf_parametrize('target', ['supported_targets'], indirect=['target'])
def test_esp_rom_impl_components(dut: Dut) -> None: def test_esp_rom_impl_components(dut: Dut) -> None:
dut.run_all_single_board_cases() dut.run_all_single_board_cases()

View File

@ -1,24 +1,22 @@
# SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD # SPDX-FileCopyrightText: 2022-2025 Espressif Systems (Shanghai) CO LTD
# SPDX-License-Identifier: CC0-1.0 # SPDX-License-Identifier: CC0-1.0
import pytest import pytest
from pytest_embedded import Dut from pytest_embedded import Dut
from pytest_embedded_idf.utils import idf_parametrize
@pytest.mark.esp32c3
@pytest.mark.esp32s2
@pytest.mark.esp32s3
@pytest.mark.esp32c5
@pytest.mark.esp32c6
@pytest.mark.esp32c61
@pytest.mark.esp32h2
@pytest.mark.esp32p4
@pytest.mark.generic @pytest.mark.generic
@idf_parametrize(
'target',
['esp32c3', 'esp32s2', 'esp32s3', 'esp32c5', 'esp32c6', 'esp32c61', 'esp32h2', 'esp32p4'],
indirect=['target'],
)
def test_esp_rom(dut: Dut) -> None: def test_esp_rom(dut: Dut) -> None:
dut.run_all_single_board_cases() dut.run_all_single_board_cases()
@pytest.mark.esp32c3
@pytest.mark.host_test @pytest.mark.host_test
@pytest.mark.qemu @pytest.mark.qemu
@idf_parametrize('target', ['esp32c3'], indirect=['target'])
def test_esp_rom_qemu(dut: Dut) -> None: def test_esp_rom_qemu(dut: Dut) -> None:
dut.run_all_single_board_cases() dut.run_all_single_board_cases()

View File

@ -1,16 +1,13 @@
# SPDX-FileCopyrightText: 2022-2024 Espressif Systems (Shanghai) CO LTD # SPDX-FileCopyrightText: 2022-2025 Espressif Systems (Shanghai) CO LTD
# SPDX-License-Identifier: CC0-1.0 # SPDX-License-Identifier: CC0-1.0
import pytest import pytest
from pytest_embedded import Dut from pytest_embedded import Dut
from pytest_embedded_idf.utils import idf_parametrize
@pytest.mark.esp32s2
@pytest.mark.esp32s3
@pytest.mark.esp32c3
@pytest.mark.esp32c6
@pytest.mark.esp32h2
@pytest.mark.esp32p4
@pytest.mark.esp32c5
@pytest.mark.generic @pytest.mark.generic
@idf_parametrize(
'target', ['esp32s2', 'esp32s3', 'esp32c3', 'esp32c6', 'esp32h2', 'esp32p4', 'esp32c5'], indirect=['target']
)
def test_crypto_drivers(dut: Dut) -> None: def test_crypto_drivers(dut: Dut) -> None:
dut.run_all_single_board_cases(timeout=180) dut.run_all_single_board_cases(timeout=180)

Some files were not shown because too many files have changed in this diff Show More