provisioning : tweak example test timeouts to reduce failures

This commit is contained in:
Anurag Kar
2018-11-08 13:14:54 +05:30
parent 647145a734
commit 3fe8065b7f
4 changed files with 12 additions and 6 deletions

View File

@@ -54,9 +54,9 @@ def test_examples_provisioning_softap(env, extra_data):
dut1.start_app()
# Parse IP address of STA
dut1.expect("Starting WiFi SoftAP provisioning")
dut1.expect("SoftAP started")
[ssid, password] = dut1.expect(re.compile(r"(?:[\s\S]*)SoftAP Provisioning started with SSID '(\S+)', Password '(\S+)'"))
dut1.expect("Starting WiFi SoftAP provisioning", timeout=60)
dut1.expect("SoftAP started", timeout=30)
[ssid, password] = dut1.expect(re.compile(r"SoftAP Provisioning started with SSID '(\S+)', Password '(\S+)'"), timeout=30)
iface = wifi_tools.get_wiface_name()
if iface == None:
@@ -68,6 +68,9 @@ def test_examples_provisioning_softap(env, extra_data):
ctrl = wifi_tools.wpa_cli(iface, reset_on_exit = True)
print("Connecting to DUT SoftAP...")
ip = ctrl.connect(ssid, password)
got_ip = dut1.expect(re.compile(r"softAP assign IP to station,IP is: (\d+.\d+.\d+.\d+)"), timeout=30)[0]
if ip != got_ip:
raise RuntimeError("SoftAP connected to another host! " + ip + "!=" + got_ip)
print("Connected to DUT SoftAP")
print("Starting Provisioning")