mirror of
				https://github.com/Telecominfraproject/wlan-lanforge-scripts.git
				synced 2025-10-31 18:58:01 +00:00 
			
		
		
		
	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:
		| @@ -67,7 +67,7 @@ | |||||||
|                 "command":"test_l3_longevity.py", |                 "command":"test_l3_longevity.py", | ||||||
|                 "args":"", |                 "args":"", | ||||||
|                 "args_list":[" --mgr LF_MGR_IP --test_duration 15s --polling_interval 5s --upstream_port UPSTREAM_PORT ", |                 "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"]} |                     " --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":{ |         "suite_test":{ | ||||||
|   | |||||||
| @@ -156,6 +156,10 @@ class lf_check(): | |||||||
|         self.outfile = _outfile |         self.outfile = _outfile | ||||||
|         self.outfile_name = _outfile_name |         self.outfile_name = _outfile_name | ||||||
|         self.test_result = "Failure" |         self.test_result = "Failure" | ||||||
|  |         self.tests_run = 0 | ||||||
|  |         self.tests_success = 0 | ||||||
|  |         self.tests_failure = 0 | ||||||
|  |         self.tests_timeout = 0 | ||||||
|         self.results_col_titles = [ |         self.results_col_titles = [ | ||||||
|             "Test", "Command", "Result", "STDOUT", "STDERR"] |             "Test", "Command", "Result", "STDOUT", "STDERR"] | ||||||
|         self.html_results = "" |         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" |                         self.test_result = "Time Out" | ||||||
|                         background = self.background_purple |                         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: |                     if 'lf_qa' in command: | ||||||
|                         line_list = open(stdout_log_txt).readlines() |                         line_list = open(stdout_log_txt).readlines() | ||||||
|                         for line in line_list: |                         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 |     # Successfully gathered LANforge information Run Tests | ||||||
|     check.run_script_test() |     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 |     # generate output reports | ||||||
|     test_rig = check.get_test_rig() |     test_rig = check.get_test_rig() | ||||||
|     report.set_title( |     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.build_table_title() | ||||||
|     report.set_table_dataframe(lf_radio_df) |     report.set_table_dataframe(lf_radio_df) | ||||||
|     report.build_table() |     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.set_table_title("LF Check Test Results") | ||||||
|     report.build_table_title() |     report.build_table_title() | ||||||
|     html_results = check.get_html_results() |     html_results = check.get_html_results() | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Chuck SmileyRekiere
					Chuck SmileyRekiere