ci provisioning: Use strings instead of "magic numbers" for connection state

This commit is contained in:
Angus Gratton
2020-06-25 15:43:42 +10:00
committed by bot
parent 05ef08b1d5
commit e969a5e5ff
5 changed files with 16 additions and 10 deletions

View File

@@ -96,12 +96,12 @@ def test_examples_wifi_prov_mgr(env, extra_data):
time.sleep(5)
print("Wi-Fi connection state")
ret = esp_prov.get_wifi_config(transport, security)
if (ret == 1):
if (ret == "connecting"):
continue
elif (ret == 0):
elif (ret == "connected"):
print("Provisioning was successful")
success = True
elif (ret == 3 and retry < 3):
elif (ret == "failed" and retry < 3):
retry = retry + 1
print("Connection failed.. retry again...: ", ret)
continue