mirror of
https://github.com/Telecominfraproject/wlan-lanforge-scripts.git
synced 2025-10-31 18:58:01 +00:00
lf_check.py : added lf qa link to output report
lf_qa.py : removed None prior to sorting lists to prevent exceptions ct_us_002_tests.json : updated test_l3_longevity.py test report.css , reduced the size of copy button to 10 px to prevent jumping. Signed-off-by: Chuck SmileyRekiere <chuck.smileyrekiere@candelatech.com>
This commit is contained in:
@@ -368,8 +368,8 @@ td.scriptdetails span.copybtn {
|
||||
}
|
||||
td.scriptdetails:hover span.copybtn {
|
||||
display: inline-block;
|
||||
padding: 5px;
|
||||
font-size: 12px;
|
||||
padding: 2px;
|
||||
font-size:10px;
|
||||
float: left;
|
||||
color: #050;
|
||||
background: white;
|
||||
|
||||
@@ -12,9 +12,11 @@
|
||||
"command":"test_l3_longevity.py",
|
||||
"args":"",
|
||||
"args_list":[
|
||||
" --lfmgr LF_MGR_IP --test_duration 60s --polling_interval 15s --upstream_port eth2 ",
|
||||
" --radio 'radio==wiphy1,stations==4,ssid==NETGEAR59,ssid_pw==crispynest798,security==wpa2' ",
|
||||
" --endp_type lf_udp --rates_are_totals --side_a_min_bps=20000 --side_b_min_bps=300000000"
|
||||
" --lfmgr LF_MGR_IP --local_lf_report_dir REPORT_PATH --test_duration 15s --polling_interval 5s --upstream_port eth2 ",
|
||||
" 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",
|
||||
" --test_rig TEST_RIG --test_tag 'l3_longevity'",
|
||||
" --dut_model_num USE_DUT_NAME --dut_sw_version DUT_SW --dut_hw_version DUT_HW --dut_serial_num DUT_SN"
|
||||
]
|
||||
},
|
||||
"lf_qa":{
|
||||
|
||||
@@ -243,8 +243,8 @@ class lf_check():
|
||||
self.qa_report_html = "NA"
|
||||
self.database_qa = ""
|
||||
self.table_qa = ""
|
||||
|
||||
self.test_run = ""
|
||||
self.hostname = ""
|
||||
|
||||
def get_test_rig(self):
|
||||
return self.test_rig
|
||||
@@ -403,7 +403,7 @@ class lf_check():
|
||||
report_url = report_file.replace('/home/lanforge/', '')
|
||||
if report_url.startswith('/'):
|
||||
report_url = report_url[1:]
|
||||
qa_url = self.qa_report_html.replace('home/lanforge', '')
|
||||
qa_url = self.qa_report_html.replace('/home/lanforge', '')
|
||||
if qa_url.startswith('/'):
|
||||
qa_url = qa_url[1:]
|
||||
# following recommendation
|
||||
@@ -411,14 +411,14 @@ class lf_check():
|
||||
# Mail
|
||||
# command to check if mail running : systemctl status postfix
|
||||
# command = 'echo "$HOSTNAME mail system works!" | mail -s "Test: $HOSTNAME $(date)" chuck.rekiere@candelatech.com'
|
||||
hostname = socket.getfqdn()
|
||||
ip = socket.gethostbyname(hostname)
|
||||
self.hostname = socket.getfqdn()
|
||||
ip = socket.gethostbyname(self.hostname)
|
||||
|
||||
# a hostname lacking dots by definition lacks a domain name
|
||||
# this is not useful for hyperlinks outside the known domain, so an IP
|
||||
# address should be preferred
|
||||
if hostname.find('.') < 1:
|
||||
hostname = ip
|
||||
if self.hostname.find('.') < 1:
|
||||
self.hostname = ip
|
||||
|
||||
message_txt = ""
|
||||
if (self.email_txt != ""):
|
||||
@@ -427,12 +427,12 @@ Results from {hostname}:
|
||||
Suite: {suite}
|
||||
Database: {db}
|
||||
http://{hostname}/{report}
|
||||
""".format(email_txt=self.email_txt, lf_mgr_ip=self.lf_mgr_ip, suite=self.test_suite, db=self.database_sqlite, hostname=hostname, report=report_url)
|
||||
""".format(email_txt=self.email_txt, lf_mgr_ip=self.lf_mgr_ip, suite=self.test_suite, db=self.database_sqlite, hostname=self.hostname, report=report_url)
|
||||
else:
|
||||
message_txt = """Results from {hostname}:
|
||||
Suite: {suite}
|
||||
Database: {db}
|
||||
http://{hostname}/{report}""".format(hostname=hostname, suite=self.test_suite, db=self.database_sqlite, report=report_url)
|
||||
http://{hostname}/{report}""".format(hostname=self.hostname, suite=self.test_suite, db=self.database_sqlite, report=report_url)
|
||||
|
||||
# Put in report information current two methods supported,
|
||||
message_txt += """
|
||||
@@ -441,10 +441,10 @@ http://{ip_qa}/{qa_url}
|
||||
NOTE: Diagrams are links in dashboard""".format(ip_qa=ip, qa_url=qa_url)
|
||||
|
||||
if (self.email_title_txt != ""):
|
||||
mail_subject = "{email} [{hostname}] {suite} {date}".format(email=self.email_title_txt, hostname=hostname,
|
||||
mail_subject = "{email} [{hostname}] {suite} {date}".format(email=self.email_title_txt, hostname=self.hostname,
|
||||
suite=self.test_suite, db=self.database_sqlite, date=datetime.datetime.now())
|
||||
else:
|
||||
mail_subject = "Regression Test [{hostname}] {suite} {date}".format(hostname=hostname,
|
||||
mail_subject = "Regression Test [{hostname}] {suite} {date}".format(hostname=self.hostname,
|
||||
suite=self.test_suite, db=self.database_sqlite, date=datetime.datetime.now())
|
||||
try:
|
||||
if self.production_run:
|
||||
@@ -1457,6 +1457,9 @@ 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()
|
||||
|
||||
# Add the qa_report_html
|
||||
qa_report_html = check.qa_report_html
|
||||
|
||||
lf_suite_time = pd.DataFrame()
|
||||
lf_suite_time['Suite Start'] = [check.suite_start_time]
|
||||
lf_suite_time['Suite End'] = [check.suite_end_time]
|
||||
@@ -1491,6 +1494,14 @@ 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_suite_time)
|
||||
report.build_table()
|
||||
if "NA" not in qa_report_html:
|
||||
qa_url = qa_report_html.replace('/home/lanforge', '')
|
||||
if qa_url.startswith('/'):
|
||||
qa_url = qa_url[1:]
|
||||
report.set_table_title("LF Check QA ")
|
||||
report.build_table_title()
|
||||
report.build_link("QA Test Results", qa_url)
|
||||
|
||||
report.set_table_title("LF Check Suite Summary")
|
||||
report.build_table_title()
|
||||
report.set_table_dataframe(lf_test_summary)
|
||||
|
||||
@@ -466,6 +466,7 @@ class csv_sql:
|
||||
# graph group and test-tag are used for detemining the graphs, can use any columns
|
||||
# the following list manipulation removes the duplicates
|
||||
graph_group_list = list(df3['Graph-Group'])
|
||||
graph_group_list = [x for x in graph_group_list if x is not None]
|
||||
graph_group_list = list(set(graph_group_list))
|
||||
print("graph_group_list: {}".format(graph_group_list))
|
||||
|
||||
@@ -473,10 +474,12 @@ class csv_sql:
|
||||
# print("dataframe df3 {df3}".format(df3=df3))
|
||||
|
||||
test_tag_list = list(df3['test-tag'])
|
||||
test_tag_list = [x for x in test_tag_list if x is not None]
|
||||
test_tag_list = list(sorted(set(test_tag_list)))
|
||||
# print("test_tag_list: {}".format(test_tag_list) )
|
||||
|
||||
test_rig_list = list(df3['test-rig'])
|
||||
test_rig_list = [x for x in test_rig_list if x is not None]
|
||||
test_rig_list = list(sorted(set(test_rig_list)))
|
||||
self.test_rig_list = test_rig_list
|
||||
print("test_rig_list: {}".format(test_rig_list))
|
||||
|
||||
Reference in New Issue
Block a user