From e83488483fbd04545b33c65cc25ed81e4bd9bfb2 Mon Sep 17 00:00:00 2001 From: Jed Reynolds Date: Tue, 9 Jun 2020 16:48:23 -0700 Subject: [PATCH] sta_connect_multi_example.py: a few options --- py-scripts/sta_connect_multi_example.py | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/py-scripts/sta_connect_multi_example.py b/py-scripts/sta_connect_multi_example.py index c3a72d52..3b4620ce 100755 --- a/py-scripts/sta_connect_multi_example.py +++ b/py-scripts/sta_connect_multi_example.py @@ -21,8 +21,10 @@ from LANforge import LFUtils def main(): # create multiple OPEN stations - station_names = LFUtils.port_name_series(start_id=0, end_id=1) - test = StaConnect("localhost", 8080, _debugOn=False) + station_names = LFUtils.port_name_series(start_id=10, end_id=19) + + test = StaConnect("localhost", 8080, _debugOn=False, _exit_on_error=True, + _cleanup_on_exit=False, _runtime_sec=360, _exit_on_fail=True) test.sta_mode = sta_connect.MODE_AUTO test.upstream_resource = 1 test.upstream_port = "eth1" @@ -32,6 +34,9 @@ def main(): test.dut_ssid = "jedway-open" test.dut_passwd = "NA" test.station_names = station_names + test.runtime_secs = 500 + test.cleanup_on_exit = False + test.run() is_passing = test.passes() if is_passing == False: @@ -42,8 +47,6 @@ def main(): else: print("Tests pass") - test.remove_stations() - # Stations use WPA2 test.dut_security = sta_connect.WPA2 test.dut_ssid = "jedway-wpa2-x2048-5-1" @@ -58,7 +61,9 @@ def main(): else: print("Tests pass") - test.remove_stations() + if test.cleanup_on_exit == True: + test.remove_stations() + # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -