mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-10 04:43:33 +00:00
ci: run Example_GENERIC for C3
Add support for running example_GENERIC tests for C3 on label. Fix examples that fail.
This commit is contained in:
@@ -4,14 +4,16 @@ import re
|
||||
|
||||
import ttfw_idf
|
||||
|
||||
touch_wake_up_support = ['esp32']
|
||||
|
||||
@ttfw_idf.idf_example_test(env_tag='Example_GENERIC')
|
||||
|
||||
@ttfw_idf.idf_example_test(env_tag='Example_GENERIC', target=['esp32', 'esp32c3'])
|
||||
def test_examples_deep_sleep(env, extra_data):
|
||||
|
||||
dut = env.get_dut('deep_sleep', 'examples/system/deep_sleep')
|
||||
dut.start_app()
|
||||
|
||||
def expect_enable_deep_sleep():
|
||||
def expect_enable_deep_sleep_touch():
|
||||
dut.expect_all('Enabling timer wakeup, 20s',
|
||||
re.compile(r'Touch pad #8 average: \d+, wakeup threshold set to \d+.'),
|
||||
re.compile(r'Touch pad #9 average: \d+, wakeup threshold set to \d+.'),
|
||||
@@ -19,6 +21,16 @@ def test_examples_deep_sleep(env, extra_data):
|
||||
'Entering deep sleep',
|
||||
timeout=10)
|
||||
|
||||
def expect_enable_deep_sleep_no_touch():
|
||||
dut.expect_all('Enabling timer wakeup, 20s',
|
||||
'Entering deep sleep',
|
||||
timeout=10)
|
||||
|
||||
if dut.TARGET in touch_wake_up_support:
|
||||
expect_enable_deep_sleep = expect_enable_deep_sleep_touch
|
||||
else:
|
||||
expect_enable_deep_sleep = expect_enable_deep_sleep_no_touch
|
||||
|
||||
dut.expect('Not a deep sleep reset', timeout=30)
|
||||
expect_enable_deep_sleep()
|
||||
|
||||
|
Reference in New Issue
Block a user