summaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa/targetcontrol.py
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2016-09-06 14:44:41 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-09-09 12:07:32 +0100
commit8c46605d16a5ace05dfe5d165563a44b2f03c957 (patch)
treecb431c7120593ce6112eb85b0f6568fa8563be31 /meta/lib/oeqa/targetcontrol.py
parent0d214406c440eac521a24c27c769e53363493d41 (diff)
downloadpoky-8c46605d16a5ace05dfe5d165563a44b2f03c957.tar.gz
oeqa: Use snapshot instead of copying the rootfs image
Rather than copying images, use the snapshot option to qemu. This fixes a regression caused by the recent runqemu changes where the wrong images were being testes since the image is copied without the qemuboot.conf file. This means the latest image is found by runqemu rather than the specified one, leading to various confused testing results. It could be fixed by copying more files but use snapshot mode instead. (From OE-Core rev: eab91997d415b0e690b3482749a32087e6a8b00a) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oeqa/targetcontrol.py')
-rw-r--r--meta/lib/oeqa/targetcontrol.py9
1 files changed, 2 insertions, 7 deletions
diff --git a/meta/lib/oeqa/targetcontrol.py b/meta/lib/oeqa/targetcontrol.py
index 3209ef0430..24669f461d 100644
--- a/meta/lib/oeqa/targetcontrol.py
+++ b/meta/lib/oeqa/targetcontrol.py
@@ -119,8 +119,7 @@ class QemuTarget(BaseTarget):
119 119
120 self.image_fstype = self.get_image_fstype(d) 120 self.image_fstype = self.get_image_fstype(d)
121 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)
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(d.getVar("DEPLOY_DIR_IMAGE", True), d.getVar("IMAGE_LINK_NAME", True) + '.' + self.image_fstype)
123 self.rootfs = os.path.join(self.testdir, d.getVar("IMAGE_LINK_NAME", True) + '-testimage.' + self.image_fstype)
124 self.kernel = os.path.join(d.getVar("DEPLOY_DIR_IMAGE", True), d.getVar("KERNEL_IMAGETYPE", False) + '-' + d.getVar('MACHINE', False) + '.bin') 123 self.kernel = os.path.join(d.getVar("DEPLOY_DIR_IMAGE", True), d.getVar("KERNEL_IMAGETYPE", False) + '-' + d.getVar('MACHINE', False) + '.bin')
125 dump_target_cmds = d.getVar("testimage_dump_target", True) 124 dump_target_cmds = d.getVar("testimage_dump_target", True)
126 dump_host_cmds = d.getVar("testimage_dump_host", True) 125 dump_host_cmds = d.getVar("testimage_dump_host", True)
@@ -166,11 +165,7 @@ class QemuTarget(BaseTarget):
166 self.target_dumper = TargetDumper(dump_target_cmds, dump_dir, self.runner) 165 self.target_dumper = TargetDumper(dump_target_cmds, dump_dir, self.runner)
167 166
168 def deploy(self): 167 def deploy(self):
169 try: 168 bb.utils.mkdirhier(self.testdir)
170 bb.utils.mkdirhier(self.testdir)
171 shutil.copyfile(self.origrootfs, self.rootfs)
172 except Exception as e:
173 bb.fatal("Error copying rootfs: %s" % e)
174 169
175 qemuloglink = os.path.join(self.testdir, "qemu_boot_log") 170 qemuloglink = os.path.join(self.testdir, "qemu_boot_log")
176 if os.path.islink(qemuloglink): 171 if os.path.islink(qemuloglink):