mirror of
git://git.yoctoproject.org/poky.git
synced 2025-07-04 20:54:45 +02:00
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:
parent
12a735bf25
commit
2d900c3061
|
@ -10,6 +10,7 @@ class OETarget(object):
|
|||
|
||||
def __init__(self, logger, *args, **kwargs):
|
||||
self.logger = logger
|
||||
self.runner = None
|
||||
|
||||
@abstractmethod
|
||||
def start(self):
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue
Block a user