3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-11-18 01:59:31 +01:00

auto-t: stop AuthCenter on failures

This commit is contained in:
Tim Kourt 2018-01-03 16:08:45 -08:00 committed by Denis Kenzior
parent b8f426acfc
commit b1745aca79
6 changed files with 31 additions and 11 deletions

View File

@ -6,7 +6,6 @@ import sys
sys.path.append('../util')
import iwd
from iwd import IWD
from iwd import PSKAgent
from iwd import NetworkType
from hlrauc import AuthCenter
from ofono import Ofono
@ -43,7 +42,11 @@ class Test(unittest.TestCase):
condition = 'not obj.connected'
wd.wait_for_object_condition(ordered_network.network_object, condition)
ordered_network.network_object.connect()
try:
ordered_network.network_object.connect()
except:
auth.stop()
raise
condition = 'obj.connected'
wd.wait_for_object_condition(ordered_network.network_object, condition)

View File

@ -43,7 +43,11 @@ class Test(unittest.TestCase):
condition = 'not obj.connected'
wd.wait_for_object_condition(ordered_network.network_object, condition)
ordered_network.network_object.connect()
try:
ordered_network.network_object.connect()
except:
auth.stop()
raise
condition = 'obj.connected'
wd.wait_for_object_condition(ordered_network.network_object, condition)
@ -54,6 +58,7 @@ class Test(unittest.TestCase):
wd.wait_for_object_condition(ordered_network.network_object, condition)
auth.stop()
@classmethod
def setUpClass(cls):
IWD.copy_to_storage('ssidEAP-AKA.8021x')

View File

@ -6,7 +6,6 @@ import sys
sys.path.append('../util')
import iwd
from iwd import IWD
from iwd import PSKAgent
from iwd import NetworkType
from hlrauc import AuthCenter
@ -38,7 +37,11 @@ class Test(unittest.TestCase):
condition = 'not obj.connected'
wd.wait_for_object_condition(ordered_network.network_object, condition)
ordered_network.network_object.connect()
try:
ordered_network.network_object.connect()
except:
auth.stop()
raise
condition = 'obj.connected'
wd.wait_for_object_condition(ordered_network.network_object, condition)

View File

@ -6,7 +6,6 @@ import sys
sys.path.append('../util')
import iwd
from iwd import IWD
from iwd import PSKAgent
from iwd import NetworkType
from hlrauc import AuthCenter
@ -38,7 +37,11 @@ class Test(unittest.TestCase):
condition = 'not obj.connected'
wd.wait_for_object_condition(ordered_network.network_object, condition)
ordered_network.network_object.connect()
try:
ordered_network.network_object.connect()
except:
auth.stop()
raise
condition = 'obj.connected'
wd.wait_for_object_condition(ordered_network.network_object, condition)

View File

@ -6,7 +6,6 @@ import sys
sys.path.append('../util')
import iwd
from iwd import IWD
from iwd import PSKAgent
from iwd import NetworkType
from hlrauc import AuthCenter
from ofono import Ofono
@ -43,7 +42,11 @@ class Test(unittest.TestCase):
condition = 'not obj.connected'
wd.wait_for_object_condition(ordered_network.network_object, condition)
ordered_network.network_object.connect()
try:
ordered_network.network_object.connect()
except:
auth.stop()
raise
condition = 'obj.connected'
wd.wait_for_object_condition(ordered_network.network_object, condition)

View File

@ -6,7 +6,6 @@ import sys
sys.path.append('../util')
import iwd
from iwd import IWD
from iwd import PSKAgent
from iwd import NetworkType
from hlrauc import AuthCenter
@ -38,7 +37,11 @@ class Test(unittest.TestCase):
condition = 'not obj.connected'
wd.wait_for_object_condition(ordered_network.network_object, condition)
ordered_network.network_object.connect()
try:
ordered_network.network_object.connect()
except:
auth.stop()
raise
condition = 'obj.connected'
wd.wait_for_object_condition(ordered_network.network_object, condition)