From ad0d8a476745858e66231b87f9112f0d4d03b86f Mon Sep 17 00:00:00 2001 From: He Yin Ling Date: Thu, 7 Mar 2019 20:24:12 +0800 Subject: [PATCH] test: save throughput result to junit report --- examples/wifi/iperf/iperf_test.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/examples/wifi/iperf/iperf_test.py b/examples/wifi/iperf/iperf_test.py index c350b899cb..35538cae7c 100644 --- a/examples/wifi/iperf/iperf_test.py +++ b/examples/wifi/iperf/iperf_test.py @@ -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), -- 2.40.0