summaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa
diff options
context:
space:
mode:
authorMikko Rapeli <mikko.rapeli@linaro.org>2025-07-01 10:33:54 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2025-07-03 10:40:17 +0100
commit2d900c3061e1215b85cc41d6e0de8c196c4c85c2 (patch)
treea4b503f1630a91216a1098cfbf5cfc60d03e33a3 /meta/lib/oeqa
parent12a735bf258fae496ad36d2c15fc2a13f6e6a6c6 (diff)
downloadpoky-2d900c3061e1215b85cc41d6e0de8c196c4c85c2.tar.gz
oeqa/runtime: set self.runner and handle None
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. (From OE-Core rev: 39f72147ef402bea54a66abf984315c1f93aa141) Signed-off-by: Mikko Rapeli <mikko.rapeli@linaro.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oeqa')
-rw-r--r--meta/lib/oeqa/core/target/__init__.py1
-rw-r--r--meta/lib/oeqa/runtime/case.py2
2 files changed, 3 insertions, 0 deletions
diff --git a/meta/lib/oeqa/core/target/__init__.py b/meta/lib/oeqa/core/target/__init__.py
index 1382aa9b52..177f648fe3 100644
--- a/meta/lib/oeqa/core/target/__init__.py
+++ b/meta/lib/oeqa/core/target/__init__.py
@@ -10,6 +10,7 @@ class OETarget(object):
10 10
11 def __init__(self, logger, *args, **kwargs): 11 def __init__(self, logger, *args, **kwargs):
12 self.logger = logger 12 self.logger = logger
13 self.runner = None
13 14
14 @abstractmethod 15 @abstractmethod
15 def start(self): 16 def start(self):
diff --git a/meta/lib/oeqa/runtime/case.py b/meta/lib/oeqa/runtime/case.py
index 9515ca2f3d..2a47771a3d 100644
--- a/meta/lib/oeqa/runtime/case.py
+++ b/meta/lib/oeqa/runtime/case.py
@@ -23,6 +23,8 @@ class OERuntimeTestCase(OETestCase):
23 uninstall_package(self) 23 uninstall_package(self)
24 24
25def run_network_serialdebug(runner): 25def run_network_serialdebug(runner):
26 if not runner:
27 return
26 status, output = runner.run_serial("ip addr") 28 status, output = runner.run_serial("ip addr")
27 print("ip addr on target: %s %s" % (output, status)) 29 print("ip addr on target: %s %s" % (output, status))
28 status, output = runner.run_serial("ping -c 1 %s" % self.target.server_ip) 30 status, output = runner.run_serial("ping -c 1 %s" % self.target.server_ip)