2024-01-02 10:21:45 +08:00
|
|
|
# SPDX-FileCopyrightText: 2022-2024 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
|
|
|
|
|
|
|
|
CONFIGS = [
|
2024-01-30 13:39:23 +02:00
|
|
|
pytest.param('general', marks=[pytest.mark.supported_targets]),
|
|
|
|
pytest.param('release', marks=[pytest.mark.supported_targets]),
|
2022-10-24 20:35:32 +08:00
|
|
|
pytest.param('single_core', marks=[pytest.mark.esp32]),
|
|
|
|
pytest.param('freertos_compliance', marks=[pytest.mark.esp32]),
|
|
|
|
pytest.param('isr_dispatch_esp32', marks=[pytest.mark.esp32]),
|
2023-06-09 13:21:37 -07:00
|
|
|
pytest.param('isr_dispatch_esp32c3', marks=[pytest.mark.esp32c3]),
|
2023-01-05 18:30:27 +08:00
|
|
|
pytest.param('cpu1_esp32', marks=[pytest.mark.esp32]),
|
|
|
|
pytest.param('any_cpu_esp32', marks=[pytest.mark.esp32]),
|
|
|
|
pytest.param('cpu1_esp32s3', marks=[pytest.mark.esp32s3]),
|
|
|
|
pytest.param('any_cpu_esp32s3', marks=[pytest.mark.esp32s3]),
|
2022-10-24 20:35:32 +08:00
|
|
|
]
|
|
|
|
|
|
|
|
|
|
|
|
@pytest.mark.generic
|
|
|
|
@pytest.mark.parametrize('config', CONFIGS, indirect=True)
|
|
|
|
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
|
|
|
|
|
|
|
|
|
|
|
@pytest.mark.esp32
|
2024-04-15 14:25:03 +02:00
|
|
|
@pytest.mark.generic
|
2024-04-03 18:10:43 +08:00
|
|
|
@pytest.mark.psram
|
2022-10-24 20:35:32 +08:00
|
|
|
@pytest.mark.parametrize('config', [
|
|
|
|
'psram',
|
|
|
|
], indirect=True)
|
|
|
|
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
|
|
|
|
|
|
|
|
|
|
|
@pytest.mark.esp32c2
|
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,
|
|
|
|
)
|
|
|
|
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)
|