mirror of
https://github.com/Telecominfraproject/wlan-lanforge-scripts.git
synced 2025-11-01 03:07:56 +00:00
lf_check.py : formatting lf_check_config.ini reduced length of l3_longevity test
This commit is contained in:
@@ -67,6 +67,9 @@ class lf_check():
|
||||
self.test_result = "Failure"
|
||||
self.results_col_titles = ["Test","Command","Result","STDOUT","STDERR"]
|
||||
self.html_results = ""
|
||||
self.background_green = "background-color:green"
|
||||
self.background_red = "background-color:red"
|
||||
self.background_purple = "background-color:purple"
|
||||
|
||||
def get_html_results(self):
|
||||
return self.html_results
|
||||
@@ -75,7 +78,7 @@ class lf_check():
|
||||
self.html_results += """
|
||||
<table border="1" class="dataframe">
|
||||
<thead>
|
||||
<tr style="text-align: right;">
|
||||
<tr style="text-align: left;">
|
||||
<th>Test</th>
|
||||
<th>Command</th>
|
||||
<th>Result</th>
|
||||
@@ -90,6 +93,9 @@ class lf_check():
|
||||
self.html_results += """
|
||||
</tbody>
|
||||
</table>
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
"""
|
||||
|
||||
# Functions in this section are/can be overridden by descendants
|
||||
@@ -201,13 +207,16 @@ class lf_check():
|
||||
if stderr_log_size > 0:
|
||||
print("File: {} is not empty: {}".format(stderr_log_txt,str(stderr_log_size)))
|
||||
self.test_result = "Failure"
|
||||
background = self.background_red
|
||||
else:
|
||||
print("File: {} is empty: {}".format(stderr_log_txt,str(stderr_log_size)))
|
||||
self.test_result = "Success"
|
||||
background = self.background_green
|
||||
|
||||
|
||||
self.html_results += """
|
||||
<tr><td>""" + str(test) + """</td><td class='scriptdetails'>""" + str(command) + """</td>
|
||||
<td style="balckground-color:green">""" + str(self.test_result) + """
|
||||
<td style="""+ str(background) + """>""" + str(self.test_result) + """
|
||||
<td><a href=""" + str(stdout_log_txt) + """ target=\"_blank\">STDOUT</a></td>
|
||||
<td><a href=""" + str(stderr_log_txt) + """ target=\"_blank\">STDERR</a></td></tr>"""
|
||||
|
||||
@@ -273,7 +282,7 @@ for running scripts listed in lf_check_config.ini
|
||||
report.build_table_title()
|
||||
# custom html (maybe try different)
|
||||
html_results = check.get_html_results()
|
||||
print("html_results {}".format(html_results))
|
||||
#print("html_results {}".format(html_results))
|
||||
report.set_custom_html(html_results)
|
||||
report.build_custom()
|
||||
report.write_html()
|
||||
|
||||
@@ -45,7 +45,7 @@ TEST_DICT: {
|
||||
"testgroup":{"enabled":"FALSE","command":"testgroup.py","args":""},
|
||||
"test_ipv6_connection":{"enabled":"FALSE","command":"test_ipv6_connection.py","args":""},
|
||||
"test_ipv6_variable_time":{"enabled":"FALSE","command":"test_ipv6_variable_time.py","args":""},
|
||||
"test_l3_longevity":{"enabled":"TRUE","command":"test_l3_longevity.py","args":"--test_duration 30s --polling_interval 10s --upstream_port eth1
|
||||
"test_l3_longevity":{"enabled":"TRUE","command":"test_l3_longevity.py","args":"--test_duration 20s --polling_interval 5s --upstream_port eth1
|
||||
--radio 'radio==wiphy0,stations==1,ssid==jedway-wpa2-x2048-5-3,ssid_pw==jedway-wpa2-x2048-5-3,security==wpa2'
|
||||
--radio 'radio==wiphy1,stations==1,ssid==jedway-wpa2-x2048-4-1,ssid_pw==jedway-wpa2-x2048-4-1,security==wpa2'
|
||||
--endp_type lf_udp --ap_read --ap_test_mode --rates_are_totals --side_a_min_bps=20000 --side_b_min_bps=300000000"},
|
||||
|
||||
Reference in New Issue
Block a user