[gnome-continuous-yocto/gnomeostree-3.28-rocko: 4238/8267] core/target/qemu.py Adds qemu target
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-continuous-yocto/gnomeostree-3.28-rocko: 4238/8267] core/target/qemu.py Adds qemu target
- Date: Sun, 17 Dec 2017 01:45:23 +0000 (UTC)
commit 211c5be54cde325242c7788f7e3eeb3f6eea7ac8
Author: Mariano Lopez <mariano lopez linux intel com>
Date: Tue Jan 3 13:58:36 2017 +0000
core/target/qemu.py Adds qemu target
This adds qemu target to be used in testimage.
It uses the current QemuRunner class in order
to boot and control qemu.
[YOCTO #10231]
(From OE-Core rev: 44d4e9d0bb31fbc28d8c1fad8860ff56e5ae043a)
Signed-off-by: Mariano Lopez <mariano lopez linux intel com>
Signed-off-by: Richard Purdie <richard purdie linuxfoundation org>
meta/lib/oeqa/core/target/qemu.py | 45 +++++++++++++++++++++++++++++++++++++
1 files changed, 45 insertions(+), 0 deletions(-)
---
diff --git a/meta/lib/oeqa/core/target/qemu.py b/meta/lib/oeqa/core/target/qemu.py
new file mode 100644
index 0000000..641dd6a
--- /dev/null
+++ b/meta/lib/oeqa/core/target/qemu.py
@@ -0,0 +1,45 @@
+# 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']
+
+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):
+
+ 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()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]