3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-11-22 06:29:23 +01:00

autotests: return status from connect & disconnect

This commit is contained in:
Rahul Rahul 2016-05-16 17:02:30 -07:00 committed by Denis Kenzior
parent 10d9be35ee
commit d71dac945d

View File

@ -32,8 +32,10 @@ def connect(networkToConnect, self, mainloop, bus):
errorMsg = "Could not connect to network %s", networkToConnect
logger.error(traceback.print_exc(file=sys.stdout))
self.assertTrue(False, errorMsg)
return False
logger.info("Successfully connected to: %s", networkToConnect)
return True
# try to disconnect from the device.
def disconnect(deviceToDisconnect, mainloop, bus):
@ -46,8 +48,10 @@ def disconnect(deviceToDisconnect, mainloop, bus):
errorMsg = "Failed to disconnect from device %s", deviceToDisconnect
logger.error(traceback.print_exc(file=sys.stdout))
assertTrue(False, errorMsg)
return False
logger.info("Successfully disconnected from: %s", deviceToDisconnect)
return True
# get the 1st network found to connect to
def getNetworkToConnectTo(networkList):