mirror of
git://git.yoctoproject.org/poky
synced 2026-10-02 18:05:05 +00:00
The idea on getTarget is to use kwargs to send custom variables to different targets, instead of this, a new variable was added (just used for custom targets) and this broke testexport. So in order to fix it, just add the custom variable to kwargs. This fixes the use of getTarget() in testexport class that was introduced in 1dc8010afd71fe46fb28bb86fb7c07a5fbd3d7cf. (From OE-Core rev: cf138029a1f18f991fc7a28c81d85884942e9d56) Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
46 lines
1.6 KiB
Python
46 lines
1.6 KiB
Python
# Copyright (C) 2016 Intel Corporation
|
|
# Released under the MIT license (see COPYING.MIT)
|
|
|
|
import os
|
|
import sys
|
|
import signal
|
|
import time
|
|
|
|
from .ssh import OESSHTarget
|
|
from oeqa.utils.qemurunner import QemuRunner
|
|
|
|
supported_fstypes = ['ext3', 'ext4', 'cpio.gz', 'wic', 'elf']
|
|
|
|
class OEQemuTarget(OESSHTarget):
|
|
def __init__(self, logger, ip, server_ip, timeout=300, user='root',
|
|
port=None, machine='', rootfs='', kernel='', kvm=False,
|
|
dump_dir='', dump_host_cmds='', display='', bootlog='',
|
|
tmpdir='', dir_image='', boottime=60, **kwargs):
|
|
|
|
super(OEQemuTarget, self).__init__(logger, ip, server_ip, timeout,
|
|
user, port)
|
|
|
|
self.ip = ip
|
|
self.server_ip = server_ip
|
|
self.machine = machine
|
|
self.rootfs = rootfs
|
|
self.kernel = kernel
|
|
self.kvm = kvm
|
|
|
|
self.runner = QemuRunner(machine=machine, rootfs=rootfs, tmpdir=tmpdir,
|
|
deploy_dir_image=dir_image, display=display,
|
|
logfile=bootlog, boottime=boottime,
|
|
use_kvm=kvm, dump_dir=dump_dir,
|
|
dump_host_cmds=dump_host_cmds)
|
|
|
|
def start(self, params=None, extra_bootparams=None):
|
|
if self.runner.start(params, extra_bootparams=extra_bootparams):
|
|
self.ip = self.runner.ip
|
|
self.server_ip = self.runner.server_ip
|
|
else:
|
|
self.stop()
|
|
raise RuntimeError("FAILED to start qemu - check the task log and the boot log")
|
|
|
|
def stop(self):
|
|
self.runner.stop()
|