Quellcode durchsuchen

Merge branch 'feat/add_track_startup_time_to_startup_time_example' into 'master'

feat: Added tracking startup_time example startup times

Closes IDFCI-823

See merge request espressif/esp-idf!14976
Anton Maklakov vor 4 Jahren
Ursprung
Commit
a7347cdf1a
1 geänderte Dateien mit 5 neuen und 13 gelöschten Zeilen
  1. 5 13
      examples/system/startup_time/example_test.py

+ 5 - 13
examples/system/startup_time/example_test.py

@@ -3,27 +3,19 @@ from __future__ import print_function
 import re
 
 import ttfw_idf
+from tiny_test_fw import TinyFW
 
 
 @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')
+def test_startup_time_example(env, _):
+    key = 'startup_time'
+    dut = env.get_dut(key, '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))
+    TinyFW.JunitReport.update_performance([(key, time)])
 
 
 if __name__ == '__main__':