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>
This commit is contained in:
Mikko Rapeli 2025-07-01 10:33:54 +03:00 committed by Richard Purdie
parent 12a735bf25
commit 2d900c3061
2 changed files with 3 additions and 0 deletions

View File

@ -10,6 +10,7 @@ class OETarget(object):
def __init__(self, logger, *args, **kwargs):
self.logger = logger
self.runner = None
@abstractmethod
def start(self):

View 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)