]> granicus.if.org Git - esp-idf/commitdiff
test: save throughput result to junit report
authorHe Yin Ling <heyinling@espressif.com>
Thu, 7 Mar 2019 12:24:12 +0000 (20:24 +0800)
committerHe Yin Ling <heyinling@espressif.com>
Fri, 19 Apr 2019 06:39:44 +0000 (14:39 +0800)
examples/wifi/iperf/iperf_test.py

index c350b899cb4c76319f2a6d7f07a8851b3d4e720e..35538cae7c23dc1c87bb71675f6a55208a45ab27 100644 (file)
@@ -43,6 +43,7 @@ except ImportError:
     import IDF
 
 import DUT
+import TinyFW
 import Utility
 from Utility import (Attenuator, PowerControl, LineChart)
 
@@ -643,9 +644,15 @@ def test_wifi_throughput_basic(env, extra_data):
         test_utility.run_all_cases(0)
 
     # 5. log performance and compare with pass standard
+    performance_items = []
     for throughput_type in test_result:
         IDF.log_performance("{}_throughput".format(throughput_type),
                             "{:.02f} Mbps".format(test_result[throughput_type].get_best_throughput()))
+        performance_items.append(["{}_throughput".format(throughput_type),
+                                  "{:.02f} Mbps".format(test_result[throughput_type].get_best_throughput())])
+
+    # save to report
+    TinyFW.JunitReport.update_performance(performance_items)
     # do check after logging, otherwise test will exit immediately if check fail, some performance can't be logged.
     for throughput_type in test_result:
         IDF.check_performance("{}_throughput".format(throughput_type),