lf_check.py : error checking lf_check_config.ini

This commit is contained in:
Chuck SmileyRekiere
2021-05-11 18:01:11 -06:00
parent ae5134c3eb
commit 18189b1a84
2 changed files with 13 additions and 4 deletions

View File

@@ -57,6 +57,7 @@ class lf_check():
path_parent = os.path.dirname(os.getcwd()) path_parent = os.path.dirname(os.getcwd())
os.chdir(path_parent) os.chdir(path_parent)
self.scripts_wd = os.getcwd() self.scripts_wd = os.getcwd()
self.results = ""
# Functions in this section are/can be overridden by descendants # Functions in this section are/can be overridden by descendants
@@ -160,12 +161,20 @@ class lf_check():
#print("###################### STDOUT #########################") #print("###################### STDOUT #########################")
print(process.stdout) print(process.stdout)
if (process.stdout == ''):
print("stdout empty")
else:
print("stdout not empty")
#print("###################### STDERR #########################") #print("###################### STDERR #########################")
# if the stderr is empty the test is considered , does there need to check for pass fail
print(process.stderr) print(process.stderr)
if (process.stderr == ''):
print("stderr empty")
else:
print("stderr not empty")
#except: #except:
# print("exception on command: {}".format(command)) # print("exception on command: {}".format(command))
def main(): def main():
check = lf_check() check = lf_check()

View File

@@ -27,7 +27,7 @@ REPORT_DATA="/home/lanforge/report-data"
[TEST_DICTIONARY] [TEST_DICTIONARY]
TEST_DICT: { TEST_DICT: {
"example_security_connection":{"enabled":"FALSE","command":"example_security_connection.py","args":"RADIO_0_CFG --debug"}, "example_security_connection":{"enabled":"FALSE","command":"example_security_connection.py","args":"RADIO_0_CFG --debug"},
"sta_connect2":{"enabled":"FALSE","command":"sta_connect2.py","args":"--dut_ssid jedway-wpa2-x2048-5-3 --dut_passwd jedway-wpa2-x2048-5-3 --dut_security wpa2"}, "sta_connect2":{"enabled":"TRUE","command":"sta_connect2.py","args":"--dut_ssid jedway-wpa2-x2048-5-3 --dut_passwd jedway-wpa2-x2048-5-3 --dut_security wpa2"},
"test_generic":{"enabled":"FALSE","command":"test_generic.py","args":"RADIO_0_CFG --type lfping --dest 10.40.0.1 --debug"}, "test_generic":{"enabled":"FALSE","command":"test_generic.py","args":"RADIO_0_CFG --type lfping --dest 10.40.0.1 --debug"},
"test_ipv4_connection":{"enabled":"FALSE","command":"test_ipv4_connection.py","args":"RADIO_0_CFG --debug"}, "test_ipv4_connection":{"enabled":"FALSE","command":"test_ipv4_connection.py","args":"RADIO_0_CFG --debug"},
"test_ipv4_l4_urls_per_ten":{"enabled":"FALSE","command":"test_ipv4_l4_urls_per_ten.py","args":""}, "test_ipv4_l4_urls_per_ten":{"enabled":"FALSE","command":"test_ipv4_l4_urls_per_ten.py","args":""},
@@ -35,8 +35,8 @@ TEST_DICT: {
"test_ipv4_l4":{"enabled":"FALSE","command":"test_ipv4_l4.py","args":""}, "test_ipv4_l4":{"enabled":"FALSE","command":"test_ipv4_l4.py","args":""},
"test_ipv4_variable_time":{"enabled":"FALSE","command":"test_ipv4_variable_time.py","args":""}, "test_ipv4_variable_time":{"enabled":"FALSE","command":"test_ipv4_variable_time.py","args":""},
"create_bridge":{"enabled":"FALSE","command":"create_bridge.py","args":""}, "create_bridge":{"enabled":"FALSE","command":"create_bridge.py","args":""},
"create_l3":{"enabled":"FALSE","command":"create_l3.py","args":"RADIO_0_CFG --debug"}, "create_l3":{"enabled":"TRUE","command":"create_l3.py","args":"RADIO_0_CFG --debug"},
"create_l4":{"enabled":"FALSE","command":"create_l4.py","args":"RADIO_1_CFG --debug"}, "create_l4":{"enabled":"TRUE","command":"create_l4.py","args":"RADIO_1_CFG --debug"},
"create_macvlan":{"enabled":"FALSE","command":"create_macvlan.py","args":""}, "create_macvlan":{"enabled":"FALSE","command":"create_macvlan.py","args":""},
"create_station":{"enabled":"FALSE","command":"create_station.py","args":""}, "create_station":{"enabled":"FALSE","command":"create_station.py","args":""},
"create_vap":{"enabled":"FALSE","command":"create_vap.py","args":""}, "create_vap":{"enabled":"FALSE","command":"create_vap.py","args":""},