mirror of
https://github.com/Telecominfraproject/wlan-lanforge-scripts.git
synced 2025-11-01 19:28:00 +00:00
lf_check.py : saving meta data file
test_l3_longevity : adding per endpoint rx_rate rx_rate_ll rx_pkts_ll Signed-off-by: Chuck SmileyRekiere <chuck.smileyrekiere@candelatech.com>
This commit is contained in:
@@ -161,6 +161,7 @@ class lf_check():
|
||||
self.host_ip_test = None
|
||||
self.email_title_txt = ""
|
||||
self.email_txt = ""
|
||||
self.meta_data_path = ""
|
||||
|
||||
# lanforge configuration
|
||||
self.lf_mgr_ip = "192.168.0.102"
|
||||
@@ -293,7 +294,6 @@ class lf_check():
|
||||
radio_status = self.json_get("/radiostatus/all")
|
||||
print("radio status {radio_status}".format(radio_status=radio_status))
|
||||
|
||||
|
||||
# NOT complete : will send the email results
|
||||
def send_results_email(self, report_file=None):
|
||||
if (report_file is None):
|
||||
@@ -1016,6 +1016,35 @@ NOTE: Diagrams are links in dashboard""".format(ip_qa=ip,qa_url=qa_url)
|
||||
self.duration = "{day}d {seconds}s {msec} ms".format(
|
||||
day=time_delta.days,seconds=time_delta.seconds,msec=time_delta.microseconds)
|
||||
|
||||
# If collect meta data is set
|
||||
meta_data_path = ""
|
||||
if self.test_result != "TIMEOUT":
|
||||
stdout_log_size = os.path.getsize(stdout_log_txt)
|
||||
if stdout_log_size > 0:
|
||||
stdout_log_fd = open(stdout_log_txt)
|
||||
#"Report Location:::/home/lanforge/html-reports/wifi-capacity-2021-08-17-04-02-56"
|
||||
#
|
||||
for line in stdout_log_fd:
|
||||
if "Report Location" in line:
|
||||
meta_data_path = line.replace('"','')
|
||||
meta_data_path = meta_data_path.replace('Report Location:::','')
|
||||
meta_data_path = meta_data_path.split('/')[-1]
|
||||
meta_data_path = meta_data_path.strip()
|
||||
meta_data_path = self.report_path + '/' + meta_data_path + '/meta.txt'
|
||||
break
|
||||
stdout_log_fd.close()
|
||||
if meta_data_path != "":
|
||||
meta_data = open(meta_data_path,'w')
|
||||
meta_data.write('$Generated by Candela Technologies LANforge network testing tool \n')
|
||||
meta_data.write('$meta.txt \n')
|
||||
meta_data.write("file {path} \n".format(path=meta_data_path))
|
||||
# split command at test-tag , at rest of string once at the actual test-tag value
|
||||
test_tag = command.split('test-tag',maxsplit=1)[-1].split(maxsplit=1)[0]
|
||||
meta_data.write("Test_Tag {test_tag} \n".format(test_tag=test_tag))
|
||||
meta_data.close()
|
||||
|
||||
|
||||
|
||||
if self.test_result != "TIMEOUT":
|
||||
stderr_log_size = os.path.getsize(stderr_log_txt)
|
||||
if stderr_log_size > 0:
|
||||
|
||||
Reference in New Issue
Block a user