@@ -15,7 +15,8 @@ class QemuTargetZephyr(OETarget):
machine='', rootfs='', tmpdir ='',dir_image ='',display=None,
kernel='',boottime=60,bootlog='',kvm=False,slirp=False,
dump_dir='',serial_ports=0,ovmf=None,tmpfsdir='' ,target_modules_path='',powercontrol_cmd='',powercontrol_extra_args='',
- serialcontrol_cmd=None,serialcontrol_extra_args='',testimage_dump_target='',testimage_dump_monitor='',native_sysroot=None):
+ serialcontrol_cmd=None,serialcontrol_extra_args='',testimage_dump_target='',testimage_dump_monitor='',native_sysroot=None,
+ ignore_ssh_fails=True):
timeout = 300
user = 'root'
@@ -60,3 +61,17 @@ class QemuTargetZephyr(OETarget):
def serial_readline(self):
return self.runner.serial_readline()
+
+ def run(self, cmd, timeout=None, ignore_status=True, raw=False, ignore_ssh_fails=False):
+ """
+ QemuTargetZephyr has no SSH (or other remote shell) support, only
+ a serial console. Treat every call as an SSH failure (status 255),
+ matching OESSHTarget's convention, so that callers written for
+ SSH-capable targets (e.g. testimage's post-failure actions) degrade
+ gracefully instead of raising a TypeError.
+ """
+ status, output = 255, "QemuTargetZephyr has no SSH support; only serial console access is available"
+ if not ignore_ssh_fails:
+ raise AssertionError(output)
+ return (status, output)
+