From 63db044e9ca258880771c264f05a92195c6ce834 Mon Sep 17 00:00:00 2001 From: jingli Date: Wed, 1 Mar 2023 21:02:11 +0800 Subject: [PATCH] esp32c2/ci: reenable deep sleep example test --- examples/system/.build-test-rules.yml | 6 ------ examples/system/deep_sleep/README.md | 4 ++-- examples/system/deep_sleep/pytest_deep_sleep.py | 8 +++++--- 3 files changed, 7 insertions(+), 11 deletions(-) diff --git a/examples/system/.build-test-rules.yml b/examples/system/.build-test-rules.yml index b55c9caec5..f4e3aea0b0 100644 --- a/examples/system/.build-test-rules.yml +++ b/examples/system/.build-test-rules.yml @@ -36,12 +36,6 @@ examples/system/console/basic: temporary: true reason: lack of runners -examples/system/deep_sleep: - disable: - - if: IDF_TARGET == "esp32c2" - temporary: true - reason: target esp32c2 is not supported yet - examples/system/efuse: disable_test: - if: IDF_TARGET == "esp32s3" diff --git a/examples/system/deep_sleep/README.md b/examples/system/deep_sleep/README.md index 5b82a00d78..2bf6c32952 100644 --- a/examples/system/deep_sleep/README.md +++ b/examples/system/deep_sleep/README.md @@ -1,5 +1,5 @@ -| Supported Targets | ESP32 | ESP32-C3 | ESP32-S2 | ESP32-S3 | -| ----------------- | ----- | -------- | -------- | -------- | +| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-S2 | ESP32-S3 | +| ----------------- | ----- | -------- | -------- | -------- | -------- | # Deep Sleep Example diff --git a/examples/system/deep_sleep/pytest_deep_sleep.py b/examples/system/deep_sleep/pytest_deep_sleep.py index 12ef483fda..e58d3548bd 100644 --- a/examples/system/deep_sleep/pytest_deep_sleep.py +++ b/examples/system/deep_sleep/pytest_deep_sleep.py @@ -1,4 +1,4 @@ -# SPDX-FileCopyrightText: 2022 Espressif Systems (Shanghai) CO LTD +# SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD # SPDX-License-Identifier: CC0-1.0 import logging @@ -12,7 +12,7 @@ touch_wake_up_support = ['esp32', 'esp32s2'] CONFIGS = [ pytest.param('esp32_singlecore', marks=[pytest.mark.esp32]), - pytest.param('basic', marks=[pytest.mark.esp32, pytest.mark.esp32s2, pytest.mark.esp32s3, pytest.mark.esp32c3]), + pytest.param('basic', marks=[pytest.mark.esp32, pytest.mark.esp32s2, pytest.mark.esp32s3, pytest.mark.esp32c3, pytest.mark.esp32c2]), ] @@ -60,7 +60,9 @@ def test_deep_sleep(dut: Dut) -> None: # This line indicates that the CONFIG_BOOTLOADER_SKIP_VALIDATE_IN_DEEP_SLEEP option set in sdkconfig.defaults # has correctly allowed skipping verification on wakeup - dut.expect_exact('boot: Fast booting app from partition', timeout=2) + # Note: this feature depends on rtc mem + if dut.app.sdkconfig.get('SOC_RTC_MEM_SUPPORTED') is True: + dut.expect_exact('boot: Fast booting app from partition', timeout=2) # Check that it measured 2xxxxms in deep sleep, i.e at least 20 seconds: dut.expect(r'Wake up from timer. Time spent in deep sleep: 2\d{4}ms', timeout=2)