From 9657b90389d6ed1c116b9bea0d686a397bc9d2a3 Mon Sep 17 00:00:00 2001 From: Chuck SmileyRekiere Date: Fri, 14 May 2021 08:49:03 -0600 Subject: [PATCH] lf_check.py : formatting lf_check_config.ini reduced length of l3_longevity test --- py-scripts/sandbox/lf_check.py | 15 ++++++++++++--- py-scripts/sandbox/lf_check_config.ini | 2 +- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/py-scripts/sandbox/lf_check.py b/py-scripts/sandbox/lf_check.py index 1bf097a3..6814f680 100755 --- a/py-scripts/sandbox/lf_check.py +++ b/py-scripts/sandbox/lf_check.py @@ -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 += """ - + @@ -90,6 +93,9 @@ class lf_check(): self.html_results += """
Test Command Result
+
+
+
""" # 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 += """ """ + str(test) + """""" + str(command) + """ - """ + str(self.test_result) + """ + """ + str(self.test_result) + """ STDOUT STDERR""" @@ -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() diff --git a/py-scripts/sandbox/lf_check_config.ini b/py-scripts/sandbox/lf_check_config.ini index d77d350b..565629b5 100755 --- a/py-scripts/sandbox/lf_check_config.ini +++ b/py-scripts/sandbox/lf_check_config.ini @@ -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"},