mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-12-19 01:42:33 +01:00
auto-t: stop AuthCenter on failures
This commit is contained in:
parent
b8f426acfc
commit
b1745aca79
@ -6,7 +6,6 @@ import sys
|
|||||||
sys.path.append('../util')
|
sys.path.append('../util')
|
||||||
import iwd
|
import iwd
|
||||||
from iwd import IWD
|
from iwd import IWD
|
||||||
from iwd import PSKAgent
|
|
||||||
from iwd import NetworkType
|
from iwd import NetworkType
|
||||||
from hlrauc import AuthCenter
|
from hlrauc import AuthCenter
|
||||||
from ofono import Ofono
|
from ofono import Ofono
|
||||||
@ -43,7 +42,11 @@ class Test(unittest.TestCase):
|
|||||||
condition = 'not obj.connected'
|
condition = 'not obj.connected'
|
||||||
wd.wait_for_object_condition(ordered_network.network_object, condition)
|
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'
|
condition = 'obj.connected'
|
||||||
wd.wait_for_object_condition(ordered_network.network_object, condition)
|
wd.wait_for_object_condition(ordered_network.network_object, condition)
|
||||||
|
@ -43,7 +43,11 @@ class Test(unittest.TestCase):
|
|||||||
condition = 'not obj.connected'
|
condition = 'not obj.connected'
|
||||||
wd.wait_for_object_condition(ordered_network.network_object, condition)
|
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'
|
condition = 'obj.connected'
|
||||||
wd.wait_for_object_condition(ordered_network.network_object, condition)
|
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)
|
wd.wait_for_object_condition(ordered_network.network_object, condition)
|
||||||
|
|
||||||
auth.stop()
|
auth.stop()
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def setUpClass(cls):
|
def setUpClass(cls):
|
||||||
IWD.copy_to_storage('ssidEAP-AKA.8021x')
|
IWD.copy_to_storage('ssidEAP-AKA.8021x')
|
||||||
|
@ -6,7 +6,6 @@ import sys
|
|||||||
sys.path.append('../util')
|
sys.path.append('../util')
|
||||||
import iwd
|
import iwd
|
||||||
from iwd import IWD
|
from iwd import IWD
|
||||||
from iwd import PSKAgent
|
|
||||||
from iwd import NetworkType
|
from iwd import NetworkType
|
||||||
from hlrauc import AuthCenter
|
from hlrauc import AuthCenter
|
||||||
|
|
||||||
@ -38,7 +37,11 @@ class Test(unittest.TestCase):
|
|||||||
condition = 'not obj.connected'
|
condition = 'not obj.connected'
|
||||||
wd.wait_for_object_condition(ordered_network.network_object, condition)
|
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'
|
condition = 'obj.connected'
|
||||||
wd.wait_for_object_condition(ordered_network.network_object, condition)
|
wd.wait_for_object_condition(ordered_network.network_object, condition)
|
||||||
|
@ -6,7 +6,6 @@ import sys
|
|||||||
sys.path.append('../util')
|
sys.path.append('../util')
|
||||||
import iwd
|
import iwd
|
||||||
from iwd import IWD
|
from iwd import IWD
|
||||||
from iwd import PSKAgent
|
|
||||||
from iwd import NetworkType
|
from iwd import NetworkType
|
||||||
from hlrauc import AuthCenter
|
from hlrauc import AuthCenter
|
||||||
|
|
||||||
@ -38,7 +37,11 @@ class Test(unittest.TestCase):
|
|||||||
condition = 'not obj.connected'
|
condition = 'not obj.connected'
|
||||||
wd.wait_for_object_condition(ordered_network.network_object, condition)
|
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'
|
condition = 'obj.connected'
|
||||||
wd.wait_for_object_condition(ordered_network.network_object, condition)
|
wd.wait_for_object_condition(ordered_network.network_object, condition)
|
||||||
|
@ -6,7 +6,6 @@ import sys
|
|||||||
sys.path.append('../util')
|
sys.path.append('../util')
|
||||||
import iwd
|
import iwd
|
||||||
from iwd import IWD
|
from iwd import IWD
|
||||||
from iwd import PSKAgent
|
|
||||||
from iwd import NetworkType
|
from iwd import NetworkType
|
||||||
from hlrauc import AuthCenter
|
from hlrauc import AuthCenter
|
||||||
from ofono import Ofono
|
from ofono import Ofono
|
||||||
@ -43,7 +42,11 @@ class Test(unittest.TestCase):
|
|||||||
condition = 'not obj.connected'
|
condition = 'not obj.connected'
|
||||||
wd.wait_for_object_condition(ordered_network.network_object, condition)
|
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'
|
condition = 'obj.connected'
|
||||||
wd.wait_for_object_condition(ordered_network.network_object, condition)
|
wd.wait_for_object_condition(ordered_network.network_object, condition)
|
||||||
|
@ -6,7 +6,6 @@ import sys
|
|||||||
sys.path.append('../util')
|
sys.path.append('../util')
|
||||||
import iwd
|
import iwd
|
||||||
from iwd import IWD
|
from iwd import IWD
|
||||||
from iwd import PSKAgent
|
|
||||||
from iwd import NetworkType
|
from iwd import NetworkType
|
||||||
from hlrauc import AuthCenter
|
from hlrauc import AuthCenter
|
||||||
|
|
||||||
@ -38,7 +37,11 @@ class Test(unittest.TestCase):
|
|||||||
condition = 'not obj.connected'
|
condition = 'not obj.connected'
|
||||||
wd.wait_for_object_condition(ordered_network.network_object, condition)
|
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'
|
condition = 'obj.connected'
|
||||||
wd.wait_for_object_condition(ordered_network.network_object, condition)
|
wd.wait_for_object_condition(ordered_network.network_object, condition)
|
||||||
|
Loading…
Reference in New Issue
Block a user