2025-02-24 10:18:03 +08:00
|
|
|
# SPDX-FileCopyrightText: 2022-2025 Espressif Systems (Shanghai) CO LTD
|
2022-10-24 20:35:32 +08:00
|
|
|
# SPDX-License-Identifier: Unlicense OR CC0-1.0
|
|
|
|
import pytest
|
|
|
|
from pytest_embedded import Dut
|
2025-02-24 10:18:03 +08:00
|
|
|
from pytest_embedded_idf.utils import idf_parametrize
|
2022-10-24 20:35:32 +08:00
|
|
|
|
|
|
|
|
|
|
|
@pytest.mark.generic
|
2025-02-24 10:18:03 +08:00
|
|
|
@idf_parametrize(
|
|
|
|
'config,target',
|
|
|
|
[
|
|
|
|
('general', 'supported_targets'),
|
|
|
|
('release', 'supported_targets'),
|
|
|
|
('single_core', 'esp32'),
|
|
|
|
('freertos_compliance', 'esp32'),
|
|
|
|
('isr_dispatch_esp32', 'esp32'),
|
|
|
|
('isr_dispatch_esp32c3', 'esp32c3'),
|
|
|
|
('cpu1_esp32', 'esp32'),
|
|
|
|
('any_cpu_esp32', 'esp32'),
|
|
|
|
('cpu1_esp32s3', 'esp32s3'),
|
|
|
|
('any_cpu_esp32s3', 'esp32s3'),
|
|
|
|
],
|
|
|
|
indirect=['config', 'target'],
|
|
|
|
)
|
2022-10-24 20:35:32 +08:00
|
|
|
def test_esp_timer(dut: Dut) -> None:
|
2023-02-01 12:12:57 +08:00
|
|
|
dut.run_all_single_board_cases(timeout=120)
|
2022-10-24 20:35:32 +08:00
|
|
|
|
|
|
|
|
2024-04-15 14:25:03 +02:00
|
|
|
@pytest.mark.generic
|
2024-04-03 18:10:43 +08:00
|
|
|
@pytest.mark.psram
|
2025-02-24 10:18:03 +08:00
|
|
|
@pytest.mark.parametrize(
|
|
|
|
'config',
|
|
|
|
[
|
|
|
|
'psram',
|
|
|
|
],
|
|
|
|
indirect=True,
|
|
|
|
)
|
|
|
|
@idf_parametrize('target', ['esp32'], indirect=['target'])
|
2022-10-24 20:35:32 +08:00
|
|
|
def test_esp_timer_psram(dut: Dut) -> None:
|
2023-02-01 12:12:57 +08:00
|
|
|
dut.run_all_single_board_cases(timeout=120)
|
2022-11-09 10:48:04 +08:00
|
|
|
|
|
|
|
|
2022-12-20 21:11:17 +08:00
|
|
|
@pytest.mark.generic
|
2022-11-09 10:48:04 +08:00
|
|
|
@pytest.mark.xtal_26mhz
|
|
|
|
@pytest.mark.parametrize(
|
|
|
|
'config, baud',
|
|
|
|
[
|
|
|
|
('26mhz_esp32c2', '74880'),
|
|
|
|
],
|
|
|
|
indirect=True,
|
|
|
|
)
|
2025-02-24 10:18:03 +08:00
|
|
|
@idf_parametrize('target', ['esp32c2'], indirect=['target'])
|
2022-11-09 10:48:04 +08:00
|
|
|
def test_esp_timer_esp32c2_xtal_26mhz(dut: Dut) -> None:
|
2023-02-01 12:12:57 +08:00
|
|
|
dut.run_all_single_board_cases(timeout=120)
|
2025-03-03 14:16:44 +08:00
|
|
|
|
|
|
|
|
|
|
|
@pytest.mark.flash_suspend
|
|
|
|
@pytest.mark.parametrize(
|
|
|
|
'config',
|
|
|
|
[
|
|
|
|
'flash_auto_suspend',
|
|
|
|
],
|
|
|
|
indirect=True,
|
|
|
|
)
|
|
|
|
@idf_parametrize('target', ['esp32c3'], indirect=['target'])
|
|
|
|
def test_esp_timer_flash_auto_suspend(dut: Dut) -> None:
|
|
|
|
dut.run_all_single_board_cases(timeout=120)
|