mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2025-05-04 07:47:27 +02:00
autotests: Clean up iwd process
If the process is launched by the test, then clean it up when the test is cleaned up
This commit is contained in:
parent
cec1546fce
commit
ed69774dbc
@ -511,6 +511,7 @@ class IWD(AsyncOpAbstract):
|
|||||||
_object_manager_if = None
|
_object_manager_if = None
|
||||||
_agent_manager_if = None
|
_agent_manager_if = None
|
||||||
_known_network_manager_if = None
|
_known_network_manager_if = None
|
||||||
|
_iwd_proc = None
|
||||||
|
|
||||||
def __init__(self, start_iwd_daemon = False,
|
def __init__(self, start_iwd_daemon = False,
|
||||||
iwd_config_dir = IWD_CONFIG_DIR):
|
iwd_config_dir = IWD_CONFIG_DIR):
|
||||||
@ -531,6 +532,15 @@ class IWD(AsyncOpAbstract):
|
|||||||
tries += 1
|
tries += 1
|
||||||
time.sleep(0.05)
|
time.sleep(0.05)
|
||||||
|
|
||||||
|
self._iwd_proc = iwd_proc
|
||||||
|
|
||||||
|
def __del__(self):
|
||||||
|
if self._iwd_proc is None:
|
||||||
|
return
|
||||||
|
|
||||||
|
self._iwd_proc.terminate()
|
||||||
|
self._iwd_proc.wait()
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def _object_manager(self):
|
def _object_manager(self):
|
||||||
if self._object_manager_if is None:
|
if self._object_manager_if is None:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user