From 901ae2b7dc5d33ea6516e48bb4a9ced1228db02f Mon Sep 17 00:00:00 2001 From: Chuck SmileyRekiere Date: Mon, 10 May 2021 17:44:12 -0600 Subject: [PATCH] test_l3_longevity.py comma separator between commands, allow errors to be printed out (do not catch errors) Signed-off-by: Chuck SmileyRekiere --- py-scripts/sandbox/lf_check.py | 11 +++++++---- py-scripts/sandbox/lf_check_config.ini | 7 ++++--- py-scripts/test_l3_longevity.py | 2 +- 3 files changed, 12 insertions(+), 8 deletions(-) diff --git a/py-scripts/sandbox/lf_check.py b/py-scripts/sandbox/lf_check.py index f17c7fe4..a4c21f99 100755 --- a/py-scripts/sandbox/lf_check.py +++ b/py-scripts/sandbox/lf_check.py @@ -103,15 +103,20 @@ class lf_check(): #scripts_wd = os.getcwd() print("file_wd {}".format(self.scripts_wd)) + try: + os.chdir(self.scripts_wd) + print("Current Working Directory {}".format(os.getcwd())) + except: + print("failed to change to {}".format(self.scripts_wd)) cmd_args = "{}".format(self.test_dict[test]['args']) - command = "{}/{} {}".format(self.scripts_wd,self.test_dict[test]['command'], cmd_args) + command = "./{} {}".format(self.test_dict[test]['command'], cmd_args) #command = "{}/{}".format(scripts_wd,self.test_dict[test]['command']) # cmd_args = "{}".format(self.test_dict[test]['args']) print("command: {}".format(command)) print("cmd_args {}".format(cmd_args)) #try: - process = subprocess.run((command).split(' '), check= True, stdout=subprocess.PIPE, stderr=subprocess.PIPE, universal_newlines=True) + process = subprocess.run((command).split(' '), check= False, stdout=subprocess.PIPE, stderr=subprocess.PIPE, universal_newlines=True) #process = subprocess.run((command).split(' '), check= True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, universal_newlines=True) print("###################### STDOUT #########################") @@ -124,11 +129,9 @@ class lf_check(): def main(): check = lf_check() - print("Here 1") #check.parse_ap_stats() check.read_config_contents() # CMR need mode to just print out the test config and not run - print("Here 2") check.run_script_test() diff --git a/py-scripts/sandbox/lf_check_config.ini b/py-scripts/sandbox/lf_check_config.ini index 29ec99de..f7e0e0d0 100755 --- a/py-scripts/sandbox/lf_check_config.ini +++ b/py-scripts/sandbox/lf_check_config.ini @@ -26,9 +26,10 @@ REPORT_DATA="/home/lanforge/report-data" [TEST_DICTIONARY] TEST_DICT: { - "example_security_connection":{"enabled":"FALSE","command":"example_security_connection.py","args":""}, + "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"}, + "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_generic":{"enabled":"FALSE","command":"test_generic.py","args":""}, "test_ipv4_l4_urls_per_ten":{"enabled":"FALSE","command":"test_ipv4_l4_urls_per_ten.py","args":""}, "test_ipv4_l4_wifi":{"enabled":"FALSE","command":"test_ipv4_l4_wifi.py","args":""}, "test_ipv4_l4":{"enabled":"FALSE","command":"test_ipv4_l4.py","args":""}, @@ -47,7 +48,7 @@ TEST_DICT: { "test_l3_longevity":{"enabled":"TRUE","command":"test_l3_longevity.py","args":"--test_duration 30s --polling_interval 10s --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' - --mgr '192.168.92.13' --endp_type 'lf_udp lf_tcp' --rates_are_totals --side_a_min_bps=20000 --side_b_min_bps=300000000"}, + --mgr '192.168.92.13' --endp_type lf_udp,lf_tcp --rates_are_totals --side_a_min_bps=20000 --side_b_min_bps=300000000"}, "test_l3_powersave_traffic":{"enabled":"FALSE","command":"test_l3_powersave_traffic.py","args":""}, "test_l3_scenario_throughput":{"enabled":"FALSE","command":"test_l3_scenario_throughput.py","args":""}, "test_status_msg":{"enabled":"FALSE","command":"test_status_msg.py","args":""}, diff --git a/py-scripts/test_l3_longevity.py b/py-scripts/test_l3_longevity.py index ee51f6d7..dbd28de0 100755 --- a/py-scripts/test_l3_longevity.py +++ b/py-scripts/test_l3_longevity.py @@ -106,7 +106,7 @@ class L3VariableTime(Realm): _capture_signal_list=_capture_signal_list) self.influxdb = influxdb self.tos = tos.split() - self.endp_types = endp_types.split() + self.endp_types = endp_types.split(",") self.side_b = side_b self.ssid_list = ssid_list self.ssid_password_list = ssid_password_list