]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
oeqa/runtime: set self.runner and handle None
authorMikko Rapeli <mikko.rapeli@linaro.org>
Tue, 1 Jul 2025 07:33:54 +0000 (10:33 +0300)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 3 Jul 2025 09:38:22 +0000 (10:38 +0100)
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>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/lib/oeqa/core/target/__init__.py
meta/lib/oeqa/runtime/case.py

index 1382aa9b5239913d20a79df005f3429f859cc676..177f648fe35816e6a167def0d07c18e0360311a2 100644 (file)
@@ -10,6 +10,7 @@ class OETarget(object):
 
     def __init__(self, logger, *args, **kwargs):
         self.logger = logger
+        self.runner = None
 
     @abstractmethod
     def start(self):
index 9515ca2f3d622037b0a8845d7564f4489211f8ea..2a47771a3d47879c0e363f7300269d716fe7fbc8 100644 (file)
@@ -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)