lf_check.py : add test run, success, timeout, failure summary

ct_us_001_scripts.json : fixed typo

Signed-off-by: Chuck SmileyRekiere <chuck.smileyrekiere@candelatech.com>
This commit is contained in:
Chuck SmileyRekiere
2021-11-30 12:33:57 -05:00
parent 9e2e4a1c73
commit 43fa8db465
2 changed files with 26 additions and 2 deletions

View File

@@ -67,7 +67,7 @@
"command":"test_l3_longevity.py",
"args":"",
"args_list":[" --mgr LF_MGR_IP --test_duration 15s --polling_interval 5s --upstream_port UPSTREAM_PORT ",
" use_ssid_idx=1 --radio 'radio==wiphy1,stations==4,ssid==SSID_USEDD,ssid_pw==SSID_PW_USED,security==SECURITY_USED' ",
" use_ssid_idx=1 --radio 'radio==wiphy1,stations==4,ssid==SSID_USED,ssid_pw==SSID_PW_USED,security==SECURITY_USED' ",
" --endp_type lf_udp --rates_are_totals --side_a_min_bps=20000 --side_b_min_bps=300000000 --local_lf_report_dir REPORT_PATH"]}
},
"suite_test":{

View File

@@ -156,6 +156,10 @@ class lf_check():
self.outfile = _outfile
self.outfile_name = _outfile_name
self.test_result = "Failure"
self.tests_run = 0
self.tests_success = 0
self.tests_failure = 0
self.tests_timeout = 0
self.results_col_titles = [
"Test", "Command", "Result", "STDOUT", "STDERR"]
self.html_results = ""
@@ -1056,6 +1060,16 @@ NOTE: Diagrams are links in dashboard""".format(ip_qa=ip, qa_url=qa_url)
self.test_result = "Time Out"
background = self.background_purple
# Total up test, tests success, tests failure, tests
# timeouts
self.tests_run += 1
if self.test_result == "Success":
self.tests_success += 1
elif self.test_result == "Failure":
self.tests_failed += 1
elif self.test_result == "TIMEOUT":
self.tests_timeout += 1
if 'lf_qa' in command:
line_list = open(stdout_log_txt).readlines()
for line in line_list:
@@ -1405,6 +1419,12 @@ note if all json data (rig,dut,tests) in same json file pass same json in for a
# Successfully gathered LANforge information Run Tests
check.run_script_test()
lf_test_summary = pd.DataFrame()
lf_test_summary['Tests Run'] = [check.tests_run]
lf_test_summary['Success'] = [check.tests_success]
lf_test_summary['Failure'] = [check.tests_failure]
lf_test_summary['Timeout'] = [check.tests_timeout]
# generate output reports
test_rig = check.get_test_rig()
report.set_title(
@@ -1422,6 +1442,10 @@ note if all json data (rig,dut,tests) in same json file pass same json in for a
report.build_table_title()
report.set_table_dataframe(lf_radio_df)
report.build_table()
report.set_table_title("LF Check Test Summary")
report.build_table_title()
report.set_table_dataframe(lf_test_summary)
report.build_table()
report.set_table_title("LF Check Test Results")
report.build_table_title()
html_results = check.get_html_results()