test_ip_variable_time.py: add --no_cleanup command option

Signed-off-by: Scott Wedge <scott.wedge@candelatech.com>
This commit is contained in:
Scott Wedge
2022-04-15 14:28:13 -05:00
committed by shivam
parent be3b72f681
commit ef63f4cf36

View File

@@ -61,6 +61,7 @@ class IPVariableTime(Realm):
port=8080, port=8080,
mode=0, mode=0,
ap=None, ap=None,
no_cleanup=None,
traffic_type=None, traffic_type=None,
side_a_min_rate=256000, side_a_max_rate=0, side_a_min_rate=256000, side_a_max_rate=0,
side_b_min_rate=256000, side_b_max_rate=0, side_b_min_rate=256000, side_b_max_rate=0,
@@ -101,6 +102,7 @@ class IPVariableTime(Realm):
self.radio = radio self.radio = radio
self.mode = mode self.mode = mode
self.ap = ap self.ap = ap
self.no_cleanup = no_cleanup
self.traffic_type = traffic_type self.traffic_type = traffic_type
self.number_template = number_template self.number_template = number_template
self.debug = _debug_on self.debug = _debug_on
@@ -336,7 +338,9 @@ class IPVariableTime(Realm):
if self.passes(): if self.passes():
self.success() self.success()
if not self.no_cleanup:
self.cleanup() self.cleanup()
logger.info("Leaving existing stations...")
logger.info("IP Variable Time Test Report Data: {}".format(report_f)) logger.info("IP Variable Time Test Report Data: {}".format(report_f))
@@ -559,7 +563,7 @@ python3 ./test_ip_variable_time.py
Example command: Example command:
1. Use Existing station , Note: put the resource.shelf.wifi-sta (below is 1.1.wlan4), 1. Use Existing station , Note: put the shelf.resource.wifi-sta (below is 1.1.wlan4),
The station needs to configured with the ssid, passwd, security and mode in the LANforge GUI The station needs to configured with the ssid, passwd, security and mode in the LANforge GUI
./test_ip_variable_time.py --mgr 192.168.0.100 --radio wiphy4 --ssid ssid_5g --passwd pass_5g ./test_ip_variable_time.py --mgr 192.168.0.100 --radio wiphy4 --ssid ssid_5g --passwd pass_5g
--security wpa2 --test_duration 60s --output_format csv --traffic_type lf_tcp --security wpa2 --test_duration 60s --output_format csv --traffic_type lf_tcp
@@ -617,6 +621,7 @@ python3 ./test_ip_variable_time.py
default=None) default=None)
parser.add_argument('--use_existing_sta', help='Used an existing stations to a particular AP', action='store_true') parser.add_argument('--use_existing_sta', help='Used an existing stations to a particular AP', action='store_true')
parser.add_argument('--sta_names', help='Used to force a connection to a particular AP', default="sta0000") parser.add_argument('--sta_names', help='Used to force a connection to a particular AP', default="sta0000")
args = parser.parse_args() args = parser.parse_args()
# set up logger # set up logger
@@ -687,6 +692,7 @@ python3 ./test_ip_variable_time.py
side_b_min_rate=args.b_min, side_b_min_rate=args.b_min,
mode=args.mode, mode=args.mode,
ap=args.ap, ap=args.ap,
no_cleanup=args.no_cleanup,
report_file=args.report_file, report_file=args.report_file,
output_format=args.output_format, output_format=args.output_format,
layer3_cols=args.layer3_cols, layer3_cols=args.layer3_cols,