2021-03-11 05:17:48 -05:00
|
|
|
from __future__ import print_function
|
|
|
|
|
|
|
|
import re
|
|
|
|
|
|
|
|
import ttfw_idf
|
2021-09-13 22:22:49 -04:00
|
|
|
from tiny_test_fw import TinyFW
|
2021-03-11 05:17:48 -05:00
|
|
|
|
|
|
|
|
|
|
|
@ttfw_idf.idf_example_test(env_tag='Example_GENERIC', target=['esp32', 'esp32s2', 'esp32c3'])
|
2021-09-13 22:22:49 -04:00
|
|
|
def test_startup_time_example(env, _):
|
|
|
|
key = 'startup_time'
|
|
|
|
dut = env.get_dut(key, 'examples/system/startup_time')
|
2021-03-11 05:17:48 -05:00
|
|
|
dut.start_app()
|
|
|
|
|
|
|
|
res = dut.expect(re.compile(r'\((\d+)\) [^:]+: App started!'))
|
|
|
|
time = int(res[0])
|
|
|
|
|
2021-09-13 22:22:49 -04:00
|
|
|
TinyFW.JunitReport.update_performance([(key, time)])
|
2021-03-11 05:17:48 -05:00
|
|
|
|
|
|
|
|
|
|
|
if __name__ == '__main__':
|
|
|
|
test_startup_time_example()
|