auto-t: add explicit stop() to IWD class

If tests end in an unknown state it is sometimes required that IWD
be stopped manually in order for future tests to run. Add a stop()
method so test tearDown() methods can explicitly stop IWD.
This commit is contained in:
James Prestwood 2023-12-06 12:17:50 -08:00 committed by Denis Kenzior
parent 84d018e722
commit 5a426433dd
1 changed files with 4 additions and 0 deletions

View File

@ -1363,6 +1363,10 @@ class IWD(AsyncOpAbstract):
self.psk_agents = []
def stop(self):
if self.namespace.is_process_running('iwd'):
self._iwd_proc.kill()
def __del__(self):
for agent in self.psk_agents:
self.unregister_psk_agent(agent)