diff --git a/py-scripts/sandbox/lf_check.py b/py-scripts/sandbox/lf_check.py index a4c21f99..6e43619f 100755 --- a/py-scripts/sandbox/lf_check.py +++ b/py-scripts/sandbox/lf_check.py @@ -29,6 +29,7 @@ from json import load import configparser from pprint import * import subprocess +import sys CONFIG_FILE = os.getcwd() + '/lf_check_config.ini' @@ -116,8 +117,11 @@ class lf_check(): print("cmd_args {}".format(cmd_args)) #try: - 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.PIPE, universal_newlines=True) + #process = subprocess.run((command).split(' '), check= True, capture_output=True ) + #pss1 = process.stdout.decode('utf-8', 'ignore') + #print(pss1) + print("###################### STDOUT #########################") print(process.stdout) diff --git a/py-scripts/sandbox/lf_check_config.ini b/py-scripts/sandbox/lf_check_config.ini index f7e0e0d0..b1f3d18c 100755 --- a/py-scripts/sandbox/lf_check_config.ini +++ b/py-scripts/sandbox/lf_check_config.ini @@ -48,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"}, + --endp_type lf_udp --ap_read --ap_test_mode --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":""}, @@ -62,3 +62,5 @@ TEST_DICT: { "sta_connect_example":{"enabled":"FALSE","command":"sta_connect_example.py","args":""}, "create_vr.py":{"enabled":"FALSE","command":"create_vr.py","args":"--vr_name 2.vr0 --ports 2.br0,2.vap2 --services"} } + + diff --git a/py-scripts/test_l3_longevity.py b/py-scripts/test_l3_longevity.py index e56c1c50..4798d054 100755 --- a/py-scripts/test_l3_longevity.py +++ b/py-scripts/test_l3_longevity.py @@ -87,15 +87,15 @@ class L3VariableTime(Realm): lfclient_host="localhost", lfclient_port=8080, debug=False, - _exit_on_error=False, - _exit_on_fail=False, - _proxy_str=None, influxdb=None, ap_read=False, ap_port='/dev/ttyUSB0', ap_baud='115200', ap_cmd='wl -i wl1 bs_data', ap_test_mode=False, + _exit_on_error=False, + _exit_on_fail=False, + _proxy_str=None, _capture_signal_list=[]): super().__init__(lfclient_host=lfclient_host, lfclient_port=lfclient_port, @@ -135,6 +135,7 @@ class L3VariableTime(Realm): self.user_tags = user_tags + self.side_a_min_rate = side_a_min_rate self.side_a_max_rate = side_a_max_rate self.side_b_min_rate = side_b_min_rate @@ -204,6 +205,7 @@ class L3VariableTime(Realm): reset_port_max_time=self.duration_time_to_seconds(reset_port_time_max_)) self.station_profiles.append(self.station_profile) + self.multicast_profile.host = self.lfclient_host self.cx_profile.host = self.lfclient_host self.cx_profile.port = self.lfclient_port @@ -899,6 +901,11 @@ python3 .\\test_l3_longevity.py --test_duration 4m --endp_type \"lf_tcp lf_udp m else: ap_read = False + if args.ap_test_mode: + ap_test_mode = args.ap_test_mode + else: + ap_test_mode = False + if args.ap_port: ap_port = args.ap_port @@ -908,9 +915,6 @@ python3 .\\test_l3_longevity.py --test_duration 4m --endp_type \"lf_tcp lf_udp m if args.ap_cmd: ap_cmd = args.ap_cmd - if args.ap_test_mode: - ap_test_mode = args.ap_test_mode - if args.test_duration: test_duration = args.test_duration @@ -1031,13 +1035,10 @@ python3 .\\test_l3_longevity.py --test_duration 4m --endp_type \"lf_tcp lf_udp m print("ERROR: ul_rates %s and dl_rates %s arrays must be same length\n" %(len(ul_rates), len(dl_rates))) if (len(ul_pdus) != len(dl_pdus)): print("ERROR: ul_pdus %s and dl_pdus %s arrays must be same length\n" %(len(ul_rates), len(dl_rates))) - + ip_var_test = L3VariableTime( - args=args, - number_template="00", - station_lists= station_lists, - name_prefix="LT-", endp_types=endp_types, + args=args, tos=args.tos, side_b=side_b, radio_name_list=radio_name_list, @@ -1045,10 +1046,9 @@ python3 .\\test_l3_longevity.py --test_duration 4m --endp_type \"lf_tcp lf_udp m ssid_list=ssid_list, ssid_password_list=ssid_password_list, ssid_security_list=ssid_security_list, - test_duration=test_duration, - polling_interval= polling_interval, - lfclient_host=lfjson_host, - lfclient_port=lfjson_port, + station_lists= station_lists, + name_prefix="LT-", + outfile=csv_outfile, reset_port_enable_list=reset_port_enable_list, reset_port_time_min_list=reset_port_time_min_list, reset_port_time_max_list=reset_port_time_max_list, @@ -1056,13 +1056,17 @@ python3 .\\test_l3_longevity.py --test_duration 4m --endp_type \"lf_tcp lf_udp m side_b_min_rate=dl_rates, side_a_min_pdu=ul_pdus, side_b_min_pdu=dl_pdus, + user_tags=args.influx_tag, rates_are_totals=args.rates_are_totals, mconn=args.multiconn, attenuators=attenuators, atten_vals=atten_vals, - user_tags=args.influx_tag, + number_template="00", + test_duration=test_duration, + polling_interval= polling_interval, + lfclient_host=lfjson_host, + lfclient_port=lfjson_port, debug=debug, - outfile=csv_outfile, influxdb=influxdb, ap_read=ap_read, ap_port=ap_port,