test_l3_longevity.py comma separator between commands, allow errors to be printed out (do not catch errors)

Signed-off-by: Chuck SmileyRekiere <chuck.smileyrekiere@candelatech.com>
This commit is contained in:
Chuck SmileyRekiere
2021-05-10 17:44:12 -06:00
parent 0f186befea
commit 901ae2b7dc
3 changed files with 12 additions and 8 deletions

View File

@@ -103,15 +103,20 @@ class lf_check():
#scripts_wd = os.getcwd() #scripts_wd = os.getcwd()
print("file_wd {}".format(self.scripts_wd)) 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']) 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']) #command = "{}/{}".format(scripts_wd,self.test_dict[test]['command'])
# cmd_args = "{}".format(self.test_dict[test]['args']) # cmd_args = "{}".format(self.test_dict[test]['args'])
print("command: {}".format(command)) print("command: {}".format(command))
print("cmd_args {}".format(cmd_args)) print("cmd_args {}".format(cmd_args))
#try: #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) #process = subprocess.run((command).split(' '), check= True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, universal_newlines=True)
print("###################### STDOUT #########################") print("###################### STDOUT #########################")
@@ -124,11 +129,9 @@ class lf_check():
def main(): def main():
check = lf_check() check = lf_check()
print("Here 1")
#check.parse_ap_stats() #check.parse_ap_stats()
check.read_config_contents() # CMR need mode to just print out the test config and not run check.read_config_contents() # CMR need mode to just print out the test config and not run
print("Here 2")
check.run_script_test() check.run_script_test()

View File

@@ -26,9 +26,10 @@ 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":""}, "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_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_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_wifi":{"enabled":"FALSE","command":"test_ipv4_l4_wifi.py","args":""},
"test_ipv4_l4":{"enabled":"FALSE","command":"test_ipv4_l4.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 "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==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' --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_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_l3_scenario_throughput":{"enabled":"FALSE","command":"test_l3_scenario_throughput.py","args":""},
"test_status_msg":{"enabled":"FALSE","command":"test_status_msg.py","args":""}, "test_status_msg":{"enabled":"FALSE","command":"test_status_msg.py","args":""},

View File

@@ -106,7 +106,7 @@ class L3VariableTime(Realm):
_capture_signal_list=_capture_signal_list) _capture_signal_list=_capture_signal_list)
self.influxdb = influxdb self.influxdb = influxdb
self.tos = tos.split() self.tos = tos.split()
self.endp_types = endp_types.split() self.endp_types = endp_types.split(",")
self.side_b = side_b self.side_b = side_b
self.ssid_list = ssid_list self.ssid_list = ssid_list
self.ssid_password_list = ssid_password_list self.ssid_password_list = ssid_password_list