mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-09 20:41:14 +00:00
examples: Add example for fastest startup time
Example includes README and sdkconfig.defaults with notes about trade-offs made for minimum boot time.
This commit is contained in:
30
examples/system/startup_time/example_test.py
Normal file
30
examples/system/startup_time/example_test.py
Normal file
@@ -0,0 +1,30 @@
|
||||
from __future__ import print_function
|
||||
|
||||
import re
|
||||
|
||||
import ttfw_idf
|
||||
|
||||
|
||||
@ttfw_idf.idf_example_test(env_tag='Example_GENERIC', target=['esp32', 'esp32s2', 'esp32c3'])
|
||||
def test_startup_time_example(env, extra_data):
|
||||
app_name = 'startup_time'
|
||||
dut = env.get_dut(app_name, 'examples/system/startup_time')
|
||||
dut.start_app()
|
||||
|
||||
res = dut.expect(re.compile(r'\((\d+)\) [^:]+: App started!'))
|
||||
time = int(res[0])
|
||||
|
||||
# Allow ci-dashboard to track startup times
|
||||
print('------ startup time info ------\n'
|
||||
'[app_name] {}\n'
|
||||
'[startup_time] {}\n'
|
||||
'[config] {}\n'
|
||||
'[target] {}\n'
|
||||
'------ startup time end ------'.format(app_name,
|
||||
time,
|
||||
dut.app.config_name,
|
||||
dut.TARGET))
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
test_startup_time_example()
|
Reference in New Issue
Block a user