mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-04 21:24:32 +02:00
Merge branch 'test/remove_rtc_power_pytest' into 'master'
test_rtc: remove invalid test case file See merge request espressif/esp-idf!18374
This commit is contained in:
@@ -1,48 +0,0 @@
|
|||||||
# SPDX-FileCopyrightText: 2021-2022 Espressif Systems (Shanghai) CO LTD
|
|
||||||
# SPDX-License-Identifier: CC0-1.0
|
|
||||||
|
|
||||||
import pytest
|
|
||||||
from pytest_embedded import Dut
|
|
||||||
|
|
||||||
# This is a manual test, not run on CI
|
|
||||||
|
|
||||||
|
|
||||||
def deepsleep_test(dut: Dut, case_name: str) -> None:
|
|
||||||
dut.expect_exact('Press ENTER to see the list of tests')
|
|
||||||
dut.write(case_name)
|
|
||||||
reset_reason = 'DEEPSLEEP_RESET' if dut.target == 'esp32' else 'DSLEEP'
|
|
||||||
if dut.target == 'esp32c3':
|
|
||||||
# Known issue: IDF-5003
|
|
||||||
dut.expect(r'rst:.*\(%s\)' % reset_reason, timeout=40)
|
|
||||||
else:
|
|
||||||
dut.expect(r'rst:.*\(%s\)' % reset_reason, timeout=10)
|
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.deepsleep
|
|
||||||
def test_rtc_8md256_deepsleep(dut: Dut) -> None:
|
|
||||||
deepsleep_test(dut, '"Can use 8MD256 as RTC clock source in deepsleep"')
|
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.deepsleep
|
|
||||||
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)"')
|
|
||||||
|
|
||||||
|
|
||||||
def lightsleep_test(dut: Dut, case_name: str) -> None:
|
|
||||||
dut.expect_exact('Press ENTER to see the list of tests')
|
|
||||||
dut.write(case_name)
|
|
||||||
if dut.target == 'esp32c3':
|
|
||||||
# Known issue: IDF-5003
|
|
||||||
dut.expect(r'Returned from light sleep, reason: timer', timeout=40)
|
|
||||||
else:
|
|
||||||
dut.expect(r'Returned from light sleep, reason: timer', timeout=10)
|
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.deepsleep
|
|
||||||
def test_rtc_8md256_lightsleep(dut: Dut) -> None:
|
|
||||||
lightsleep_test(dut, '"Can use 8MD256 as RTC clock source in lightsleep"')
|
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.deepsleep
|
|
||||||
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)"')
|
|
Reference in New Issue
Block a user