From 13e538779f6e254d154b40ff469025fdcb4b7b00 Mon Sep 17 00:00:00 2001 From: Oleg Hahm Date: Wed, 13 Dec 2023 14:39:21 +0100 Subject: [PATCH] riotctrl_ctrl: one more indirection to get native Since the native process is a child process of pyterm when called via make we need to dig deeper for riotctrl. This also means that we require pyserial to execute it. --- dist/pythonlibs/riotctrl_ctrl/native.py | 5 +++-- dist/pythonlibs/riotctrl_ctrl/requirements.txt | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/dist/pythonlibs/riotctrl_ctrl/native.py b/dist/pythonlibs/riotctrl_ctrl/native.py index 6e5bee1cd45ea..1695886a75d8a 100644 --- a/dist/pythonlibs/riotctrl_ctrl/native.py +++ b/dist/pythonlibs/riotctrl_ctrl/native.py @@ -27,5 +27,6 @@ def _set_debug_adapter_id(self, child): def start_term(self, *args, **kwargs): super().start_term(*args, **kwargs) for child in psutil.Process(pid=self._term_pid()).children(): - if self._set_debug_adapter_id(child): - break + for grandchild in child.children(): + if self._set_debug_adapter_id(grandchild): + break diff --git a/dist/pythonlibs/riotctrl_ctrl/requirements.txt b/dist/pythonlibs/riotctrl_ctrl/requirements.txt index a2b3329f101cf..98fb754d0f698 100644 --- a/dist/pythonlibs/riotctrl_ctrl/requirements.txt +++ b/dist/pythonlibs/riotctrl_ctrl/requirements.txt @@ -1,2 +1,3 @@ psutil +pyserial riotctrl