diff options
author | Lucian Musat <george.l.musat@intel.com> | 2015-04-09 11:08:10 +0300 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-04-10 18:10:27 +0100 |
commit | fa5970e0d9f74bc4cb2552c7ce57262f67f2fa1d (patch) | |
tree | d2a2c84f441b847efffa483e0b21d86de534ddf4 /meta/lib/oeqa/targetcontrol.py | |
parent | bcd9f0578fd3bb1569635e78a0d7d315213bd25f (diff) | |
download | poky-fa5970e0d9f74bc4cb2552c7ce57262f67f2fa1d.tar.gz |
oeqa/targetcontrol: Add support for poky-tiny in QemuTarget.
(From OE-Core rev: 8f1a52a3f72506911154769e6ad4a44f32c3112e)
Signed-off-by: Lucian Musat <george.l.musat@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oeqa/targetcontrol.py')
-rw-r--r-- | meta/lib/oeqa/targetcontrol.py | 33 |
1 files changed, 24 insertions, 9 deletions
diff --git a/meta/lib/oeqa/targetcontrol.py b/meta/lib/oeqa/targetcontrol.py index 1f4770f94e..9a681a3674 100644 --- a/meta/lib/oeqa/targetcontrol.py +++ b/meta/lib/oeqa/targetcontrol.py | |||
@@ -12,6 +12,7 @@ import traceback | |||
12 | import sys | 12 | import sys |
13 | from oeqa.utils.sshcontrol import SSHControl | 13 | from oeqa.utils.sshcontrol import SSHControl |
14 | from oeqa.utils.qemurunner import QemuRunner | 14 | from oeqa.utils.qemurunner import QemuRunner |
15 | from oeqa.utils.qemutinyrunner import QemuTinyRunner | ||
15 | from oeqa.controllers.testtargetloader import TestTargetLoader | 16 | from oeqa.controllers.testtargetloader import TestTargetLoader |
16 | from abc import ABCMeta, abstractmethod | 17 | from abc import ABCMeta, abstractmethod |
17 | 18 | ||
@@ -110,7 +111,7 @@ class BaseTarget(object): | |||
110 | 111 | ||
111 | class QemuTarget(BaseTarget): | 112 | class QemuTarget(BaseTarget): |
112 | 113 | ||
113 | supported_image_fstypes = ['ext3', 'ext4'] | 114 | supported_image_fstypes = ['ext3', 'ext4', 'cpio.gz'] |
114 | 115 | ||
115 | def __init__(self, d): | 116 | def __init__(self, d): |
116 | 117 | ||
@@ -120,14 +121,25 @@ class QemuTarget(BaseTarget): | |||
120 | self.qemulog = os.path.join(self.testdir, "qemu_boot_log.%s" % self.datetime) | 121 | self.qemulog = os.path.join(self.testdir, "qemu_boot_log.%s" % self.datetime) |
121 | self.origrootfs = os.path.join(d.getVar("DEPLOY_DIR_IMAGE", True), d.getVar("IMAGE_LINK_NAME", True) + '.' + self.image_fstype) | 122 | self.origrootfs = os.path.join(d.getVar("DEPLOY_DIR_IMAGE", True), d.getVar("IMAGE_LINK_NAME", True) + '.' + self.image_fstype) |
122 | self.rootfs = os.path.join(self.testdir, d.getVar("IMAGE_LINK_NAME", True) + '-testimage.' + self.image_fstype) | 123 | self.rootfs = os.path.join(self.testdir, d.getVar("IMAGE_LINK_NAME", True) + '-testimage.' + self.image_fstype) |
123 | 124 | self.kernel = os.path.join(d.getVar("DEPLOY_DIR_IMAGE", True), d.getVar("KERNEL_IMAGETYPE") + '-' + d.getVar('MACHINE') + '.bin') | |
124 | self.runner = QemuRunner(machine=d.getVar("MACHINE", True), | 125 | |
125 | rootfs=self.rootfs, | 126 | if d.getVar("DISTRO", True) == "poky-tiny": |
126 | tmpdir = d.getVar("TMPDIR", True), | 127 | self.runner = QemuTinyRunner(machine=d.getVar("MACHINE", True), |
127 | deploy_dir_image = d.getVar("DEPLOY_DIR_IMAGE", True), | 128 | rootfs=self.rootfs, |
128 | display = d.getVar("BB_ORIGENV", False).getVar("DISPLAY", True), | 129 | tmpdir = d.getVar("TMPDIR", True), |
129 | logfile = self.qemulog, | 130 | deploy_dir_image = d.getVar("DEPLOY_DIR_IMAGE", True), |
130 | boottime = int(d.getVar("TEST_QEMUBOOT_TIMEOUT", True))) | 131 | display = d.getVar("BB_ORIGENV", False).getVar("DISPLAY", True), |
132 | logfile = self.qemulog, | ||
133 | kernel = self.kernel, | ||
134 | boottime = int(d.getVar("TEST_QEMUBOOT_TIMEOUT", True))) | ||
135 | else: | ||
136 | self.runner = QemuRunner(machine=d.getVar("MACHINE", True), | ||
137 | rootfs=self.rootfs, | ||
138 | tmpdir = d.getVar("TMPDIR", True), | ||
139 | deploy_dir_image = d.getVar("DEPLOY_DIR_IMAGE", True), | ||
140 | display = d.getVar("BB_ORIGENV", False).getVar("DISPLAY", True), | ||
141 | logfile = self.qemulog, | ||
142 | boottime = int(d.getVar("TEST_QEMUBOOT_TIMEOUT", True))) | ||
131 | 143 | ||
132 | def deploy(self): | 144 | def deploy(self): |
133 | try: | 145 | try: |
@@ -167,6 +179,9 @@ class QemuTarget(BaseTarget): | |||
167 | else: | 179 | else: |
168 | raise bb.build.FuncFailed("%s - FAILED to re-start qemu - check the task log and the boot log" % self.pn) | 180 | raise bb.build.FuncFailed("%s - FAILED to re-start qemu - check the task log and the boot log" % self.pn) |
169 | 181 | ||
182 | def run_serial(self, command): | ||
183 | return self.runner.run_serial(command) | ||
184 | |||
170 | 185 | ||
171 | class SimpleRemoteTarget(BaseTarget): | 186 | class SimpleRemoteTarget(BaseTarget): |
172 | 187 | ||