| Message ID | 20250701073359.979368-1-mikko.rapeli@linaro.org |
|---|---|
| State | New |
| Headers | show |
| Series | [v2,1/6] oeqa runtime: set self.runner and handle None | expand |
On Tue Jul 1, 2025 at 9:33 AM CEST, Mikko Rapeli via lists.openembedded.org wrote: > Set default self.runner to None. qemu target sets > the runner to qemu. Then handle self.runner None in > run_network_serialdebug(). This way ssh runner > and failing ping or ssh tests handle the error cases. > > Signed-off-by: Mikko Rapeli <mikko.rapeli@linaro.org> > --- > meta/lib/oeqa/core/target/__init__.py | 1 + > meta/lib/oeqa/runtime/case.py | 2 ++ > 2 files changed, 3 insertions(+) > > v2: setting self.runner for all target types instead of target conditional > paths in tests > > v1: https://lists.openembedded.org/g/openembedded-core/message/219377 > and https://lists.openembedded.org/g/openembedded-core/message/219378 > > diff --git a/meta/lib/oeqa/core/target/__init__.py b/meta/lib/oeqa/core/target/__init__.py > index 1382aa9b5239..177f648fe358 100644 > --- a/meta/lib/oeqa/core/target/__init__.py > +++ b/meta/lib/oeqa/core/target/__init__.py > @@ -10,6 +10,7 @@ class OETarget(object): > > def __init__(self, logger, *args, **kwargs): > self.logger = logger > + self.runner = None > > @abstractmethod > def start(self): > diff --git a/meta/lib/oeqa/runtime/case.py b/meta/lib/oeqa/runtime/case.py > index 9515ca2f3d62..2a47771a3d47 100644 > --- a/meta/lib/oeqa/runtime/case.py > +++ b/meta/lib/oeqa/runtime/case.py > @@ -23,6 +23,8 @@ class OERuntimeTestCase(OETestCase): > uninstall_package(self) > > def run_network_serialdebug(runner): > + if not runner: > + return > status, output = runner.run_serial("ip addr") > print("ip addr on target: %s %s" % (output, status)) > status, output = runner.run_serial("ping -c 1 %s" % self.target.server_ip) Hi Mikko, I think this series caused some issues on the Autobuilder: AssertionError: 100 != 0 : apt-get install --yes run-postinsts-dev https://autobuilder.yoctoproject.org/valkyrie/#/builders/23/builds/2031 https://autobuilder.yoctoproject.org/valkyrie/#/builders/35/builds/1879 https://autobuilder.yoctoproject.org/valkyrie/#/builders/48/builds/1816 Can you have a look? Antonin
Hi, On Wed, Jul 02, 2025 at 08:30:52AM +0200, Antonin Godard wrote: > On Tue Jul 1, 2025 at 9:33 AM CEST, Mikko Rapeli via lists.openembedded.org wrote: > > Set default self.runner to None. qemu target sets > > the runner to qemu. Then handle self.runner None in > > run_network_serialdebug(). This way ssh runner > > and failing ping or ssh tests handle the error cases. > > > > Signed-off-by: Mikko Rapeli <mikko.rapeli@linaro.org> > > --- > > meta/lib/oeqa/core/target/__init__.py | 1 + > > meta/lib/oeqa/runtime/case.py | 2 ++ > > 2 files changed, 3 insertions(+) > > > > v2: setting self.runner for all target types instead of target conditional > > paths in tests > > > > v1: https://lists.openembedded.org/g/openembedded-core/message/219377 > > and https://lists.openembedded.org/g/openembedded-core/message/219378 > > > > diff --git a/meta/lib/oeqa/core/target/__init__.py b/meta/lib/oeqa/core/target/__init__.py > > index 1382aa9b5239..177f648fe358 100644 > > --- a/meta/lib/oeqa/core/target/__init__.py > > +++ b/meta/lib/oeqa/core/target/__init__.py > > @@ -10,6 +10,7 @@ class OETarget(object): > > > > def __init__(self, logger, *args, **kwargs): > > self.logger = logger > > + self.runner = None > > > > @abstractmethod > > def start(self): > > diff --git a/meta/lib/oeqa/runtime/case.py b/meta/lib/oeqa/runtime/case.py > > index 9515ca2f3d62..2a47771a3d47 100644 > > --- a/meta/lib/oeqa/runtime/case.py > > +++ b/meta/lib/oeqa/runtime/case.py > > @@ -23,6 +23,8 @@ class OERuntimeTestCase(OETestCase): > > uninstall_package(self) > > > > def run_network_serialdebug(runner): > > + if not runner: > > + return > > status, output = runner.run_serial("ip addr") > > print("ip addr on target: %s %s" % (output, status)) > > status, output = runner.run_serial("ping -c 1 %s" % self.target.server_ip) > > Hi Mikko, > > I think this series caused some issues on the Autobuilder: > > AssertionError: 100 != 0 : apt-get install --yes run-postinsts-dev > > https://autobuilder.yoctoproject.org/valkyrie/#/builders/23/builds/2031 > https://autobuilder.yoctoproject.org/valkyrie/#/builders/35/builds/1879 > https://autobuilder.yoctoproject.org/valkyrie/#/builders/48/builds/1816 > > Can you have a look? Ok the apt test changes are causing these failures. I will drop those changes. Sorry about this, -Mikko
diff --git a/meta/lib/oeqa/core/target/__init__.py b/meta/lib/oeqa/core/target/__init__.py index 1382aa9b5239..177f648fe358 100644 --- a/meta/lib/oeqa/core/target/__init__.py +++ b/meta/lib/oeqa/core/target/__init__.py @@ -10,6 +10,7 @@ class OETarget(object): def __init__(self, logger, *args, **kwargs): self.logger = logger + self.runner = None @abstractmethod def start(self): diff --git a/meta/lib/oeqa/runtime/case.py b/meta/lib/oeqa/runtime/case.py index 9515ca2f3d62..2a47771a3d47 100644 --- a/meta/lib/oeqa/runtime/case.py +++ b/meta/lib/oeqa/runtime/case.py @@ -23,6 +23,8 @@ class OERuntimeTestCase(OETestCase): uninstall_package(self) def run_network_serialdebug(runner): + if not runner: + return status, output = runner.run_serial("ip addr") print("ip addr on target: %s %s" % (output, status)) status, output = runner.run_serial("ping -c 1 %s" % self.target.server_ip)
Set default self.runner to None. qemu target sets the runner to qemu. Then handle self.runner None in run_network_serialdebug(). This way ssh runner and failing ping or ssh tests handle the error cases. Signed-off-by: Mikko Rapeli <mikko.rapeli@linaro.org> --- meta/lib/oeqa/core/target/__init__.py | 1 + meta/lib/oeqa/runtime/case.py | 2 ++ 2 files changed, 3 insertions(+) v2: setting self.runner for all target types instead of target conditional paths in tests v1: https://lists.openembedded.org/g/openembedded-core/message/219377 and https://lists.openembedded.org/g/openembedded-core/message/219378