diff options
Diffstat (limited to 'meta/lib/oeqa')
| -rw-r--r-- | meta/lib/oeqa/selftest/cases/runqemu.py | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/meta/lib/oeqa/selftest/cases/runqemu.py b/meta/lib/oeqa/selftest/cases/runqemu.py index f01e1eec66..bedcf97548 100644 --- a/meta/lib/oeqa/selftest/cases/runqemu.py +++ b/meta/lib/oeqa/selftest/cases/runqemu.py | |||
| @@ -31,7 +31,7 @@ class RunqemuTests(OESelftestTestCase): | |||
| 31 | if self.td["HOST_ARCH"] in ('i586', 'i686', 'x86_64'): | 31 | if self.td["HOST_ARCH"] in ('i586', 'i686', 'x86_64'): |
| 32 | self.fstypes += " iso hddimg" | 32 | self.fstypes += " iso hddimg" |
| 33 | if self.machine == "qemux86-64": | 33 | if self.machine == "qemux86-64": |
| 34 | self.fstypes += " wic.vmdk wic.qcow2 wic.vdi" | 34 | self.fstypes += " wic.vmdk wic.qcow2 wic.vdi wic.zst" |
| 35 | 35 | ||
| 36 | self.cmd_common = "runqemu nographic" | 36 | self.cmd_common = "runqemu nographic" |
| 37 | kvm = oe.types.qemu_use_kvm(get_bb_var('QEMU_USE_KVM'), self.td["TARGET_ARCH"]) | 37 | kvm = oe.types.qemu_use_kvm(get_bb_var('QEMU_USE_KVM'), self.td["TARGET_ARCH"]) |
| @@ -152,6 +152,25 @@ SYSLINUX_TIMEOUT = "10" | |||
| 152 | with open(qemu.qemurunnerlog) as f: | 152 | with open(qemu.qemurunnerlog) as f: |
| 153 | self.assertTrue(qemu.runner.logged, "Failed: %s, %s" % (cmd, f.read())) | 153 | self.assertTrue(qemu.runner.logged, "Failed: %s, %s" % (cmd, f.read())) |
| 154 | 154 | ||
| 155 | @skipIfNotMachine("qemux86-64", "wic tests are qemux86-64 specific currently") | ||
| 156 | def test_boot_compressed_wic_by_path(self): | ||
| 157 | """Test runqemu /path/to/rootfs.wic.zst""" | ||
| 158 | rootfs = "%s.wic.zst" % (self.image_link_name) | ||
| 159 | rootfs = os.path.join(self.deploy_dir_image, rootfs) | ||
| 160 | if not os.path.exists(rootfs): | ||
| 161 | self.skipTest("%s not found" % rootfs) | ||
| 162 | cmd = "%s %s snapshot" % (self.cmd_common, rootfs) | ||
| 163 | with runqemu(self.recipe, ssh=False, launch_cmd=cmd) as qemu: | ||
| 164 | with open(qemu.qemurunnerlog) as f: | ||
| 165 | self.assertTrue(qemu.runner.logged, "Failed: %s, %s" % (cmd, f.read())) | ||
| 166 | |||
| 167 | @skipIfNotMachine("qemux86-64", "wic tests are qemux86-64 specific currently") | ||
| 168 | def test_boot_compressed_wic_by_recipe(self): | ||
| 169 | """Test runqemu recipe-image wic.zst""" | ||
| 170 | cmd = "%s %s snapshot wic.zst" % (self.cmd_common, self.recipe) | ||
| 171 | with runqemu(self.recipe, ssh=False, launch_cmd=cmd) as qemu: | ||
| 172 | with open(qemu.qemurunnerlog) as f: | ||
| 173 | self.assertTrue(qemu.runner.logged, "Failed: %s, %s" % (cmd, f.read())) | ||
| 155 | 174 | ||
| 156 | # This test was designed as a separate class to test that shutdown | 175 | # This test was designed as a separate class to test that shutdown |
| 157 | # command will shutdown qemu as expected on each qemu architecture | 176 | # command will shutdown qemu as expected on each qemu architecture |
