mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-12-22 21:22:37 +01:00
auto-t: add more cleanup to ofono based tests (again)
The AuthCenter was still not being fully cleaned up in these tests. It was being stopped but there was still a reference being held which prevented __del__ from being called.
This commit is contained in:
parent
8aac527e29
commit
1f4d73ab73
@ -61,6 +61,7 @@ class Test(unittest.TestCase):
|
|||||||
IWD.clear_storage()
|
IWD.clear_storage()
|
||||||
|
|
||||||
cls.auth.stop()
|
cls.auth.stop()
|
||||||
|
cls.auth = None
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
unittest.main(exit=True)
|
unittest.main(exit=True)
|
||||||
|
@ -60,6 +60,7 @@ class Test(unittest.TestCase):
|
|||||||
def tearDownClass(cls):
|
def tearDownClass(cls):
|
||||||
IWD.clear_storage()
|
IWD.clear_storage()
|
||||||
cls.auth.stop()
|
cls.auth.stop()
|
||||||
|
cls.auth = None
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
unittest.main(exit=True)
|
unittest.main(exit=True)
|
||||||
|
@ -44,26 +44,26 @@ class Test(unittest.TestCase):
|
|||||||
|
|
||||||
|
|
||||||
def test_connection_success(self):
|
def test_connection_success(self):
|
||||||
auth = AuthCenter('/tmp/hlrauc.sock', '/tmp/sim.db')
|
|
||||||
|
|
||||||
ofono = Ofono()
|
ofono = Ofono()
|
||||||
ofono.enable_modem('/phonesim')
|
ofono.enable_modem('/phonesim')
|
||||||
ofono.wait_for_sim_auth()
|
ofono.wait_for_sim_auth()
|
||||||
|
|
||||||
wd = IWD(True)
|
wd = IWD(True)
|
||||||
|
|
||||||
try:
|
|
||||||
self.validate_connection(wd)
|
self.validate_connection(wd)
|
||||||
finally:
|
|
||||||
auth.stop()
|
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def setUpClass(cls):
|
def setUpClass(cls):
|
||||||
|
cls.auth = AuthCenter('/tmp/hlrauc.sock', '/tmp/sim.db')
|
||||||
|
|
||||||
IWD.copy_to_storage('ssidEAP-PEAP-SIM.8021x')
|
IWD.copy_to_storage('ssidEAP-PEAP-SIM.8021x')
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def tearDownClass(cls):
|
def tearDownClass(cls):
|
||||||
IWD.clear_storage()
|
IWD.clear_storage()
|
||||||
|
|
||||||
|
cls.auth.stop()
|
||||||
|
cls.auth = None
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
unittest.main(exit=True)
|
unittest.main(exit=True)
|
||||||
|
@ -62,6 +62,7 @@ class Test(unittest.TestCase):
|
|||||||
IWD.clear_storage()
|
IWD.clear_storage()
|
||||||
|
|
||||||
cls.auth.stop()
|
cls.auth.stop()
|
||||||
|
cls.auth = None
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
unittest.main(exit=True)
|
unittest.main(exit=True)
|
||||||
|
Loading…
Reference in New Issue
Block a user