summaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa
diff options
context:
space:
mode:
authorEd Bartosh <ed.bartosh@linux.intel.com>2017-03-22 15:42:32 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-03-23 13:19:49 +0000
commitd2e02098669a43bf6fc61a963850c276d6884fce (patch)
tree6eb12eaf11a293fbeee3e45e6e5b01e7bd6bd737 /meta/lib/oeqa
parentfa10b24950d3c55b7d7ebb15a7f5ebe413ca42f1 (diff)
downloadpoky-d2e02098669a43bf6fc61a963850c276d6884fce.tar.gz
oe-selftest: test wic rawcopy plugin
Added test_rawcopy_plugin_qemu test case and wks template. This test builds ext4 rootfs image, copies it to the root partition of the wic image using rawcopy plugin and boots wic image in qemu. [YOCTO #10618] (From OE-Core rev: db1f511228e26aaeeff452427637942747bbf42b) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oeqa')
-rw-r--r--meta/lib/oeqa/selftest/wic.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/meta/lib/oeqa/selftest/wic.py b/meta/lib/oeqa/selftest/wic.py
index 4aacd86085..2e22362e42 100644
--- a/meta/lib/oeqa/selftest/wic.py
+++ b/meta/lib/oeqa/selftest/wic.py
@@ -681,3 +681,19 @@ part /etc --source rootfs --ondisk mmcblk0 --fstype=ext4 --exclude-path bin/ --r
681 os.remove(wkspath) 681 os.remove(wkspath)
682 wicout = glob(self.resultdir + "%s-*direct" % wksname) 682 wicout = glob(self.resultdir + "%s-*direct" % wksname)
683 self.assertEqual(0, len(wicout)) 683 self.assertEqual(0, len(wicout))
684
685 @only_for_arch(['i586', 'i686', 'x86_64'])
686 def test_rawcopy_plugin_qemu(self):
687 """Test rawcopy plugin in qemu"""
688 # build ext4 and wic images
689 for fstype in ("ext4", "wic"):
690 config = 'IMAGE_FSTYPES = "%s"\nWKS_FILE = "test_rawcopy_plugin.wks.in"\n' % fstype
691 self.append_config(config)
692 self.assertEqual(0, bitbake('core-image-minimal').status)
693 self.remove_config(config)
694
695 with runqemu('core-image-minimal', ssh=False, image_fstype='wic') as qemu:
696 cmd = "grep vda. /proc/partitions |wc -l"
697 status, output = qemu.run_serial(cmd)
698 self.assertEqual(1, status, 'Failed to run command "%s": %s' % (cmd, output))
699 self.assertEqual(output, '2')