From 18189b1a8476b0213e52390aed9c2fc14cbb30c2 Mon Sep 17 00:00:00 2001 From: Chuck SmileyRekiere Date: Tue, 11 May 2021 18:01:11 -0600 Subject: [PATCH] lf_check.py : error checking lf_check_config.ini --- py-scripts/sandbox/lf_check.py | 11 ++++++++++- py-scripts/sandbox/lf_check_config.ini | 6 +++--- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/py-scripts/sandbox/lf_check.py b/py-scripts/sandbox/lf_check.py index e9dcc6c8..b0ac8233 100755 --- a/py-scripts/sandbox/lf_check.py +++ b/py-scripts/sandbox/lf_check.py @@ -57,6 +57,7 @@ class lf_check(): path_parent = os.path.dirname(os.getcwd()) os.chdir(path_parent) self.scripts_wd = os.getcwd() + self.results = "" # Functions in this section are/can be overridden by descendants @@ -160,12 +161,20 @@ class lf_check(): #print("###################### STDOUT #########################") print(process.stdout) + if (process.stdout == ''): + print("stdout empty") + else: + print("stdout not empty") #print("###################### STDERR #########################") + # if the stderr is empty the test is considered , does there need to check for pass fail print(process.stderr) + if (process.stderr == ''): + print("stderr empty") + else: + print("stderr not empty") #except: # print("exception on command: {}".format(command)) - def main(): check = lf_check() diff --git a/py-scripts/sandbox/lf_check_config.ini b/py-scripts/sandbox/lf_check_config.ini index b1f3d18c..d77d350b 100755 --- a/py-scripts/sandbox/lf_check_config.ini +++ b/py-scripts/sandbox/lf_check_config.ini @@ -27,7 +27,7 @@ REPORT_DATA="/home/lanforge/report-data" [TEST_DICTIONARY] TEST_DICT: { "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_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":""}, @@ -35,8 +35,8 @@ TEST_DICT: { "test_ipv4_l4":{"enabled":"FALSE","command":"test_ipv4_l4.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_l3":{"enabled":"FALSE","command":"create_l3.py","args":"RADIO_0_CFG --debug"}, - "create_l4":{"enabled":"FALSE","command":"create_l4.py","args":"RADIO_1_CFG --debug"}, + "create_l3":{"enabled":"TRUE","command":"create_l3.py","args":"RADIO_0_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_station":{"enabled":"FALSE","command":"create_station.py","args":""}, "create_vap":{"enabled":"FALSE","command":"create_vap.py","args":""},