[oe-commits] [openembedded-core] 08/10: oe-selftest: test wic rawcopy plugin
git at git.openembedded.org
git at git.openembedded.org
Wed Mar 22 15:08:12 UTC 2017
This is an automated email from the git hooks/post-receive script.
rpurdie pushed a commit to branch master-next
in repository openembedded-core.
commit db1f511228e26aaeeff452427637942747bbf42b
Author: Ed Bartosh <ed.bartosh at linux.intel.com>
AuthorDate: Wed Mar 22 15:42:32 2017 +0200
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]
Signed-off-by: Ed Bartosh <ed.bartosh at linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
meta-selftest/wic/test_rawcopy_plugin.wks.in | 6 ++++++
meta/lib/oeqa/selftest/wic.py | 16 ++++++++++++++++
2 files changed, 22 insertions(+)
diff --git a/meta-selftest/wic/test_rawcopy_plugin.wks.in b/meta-selftest/wic/test_rawcopy_plugin.wks.in
new file mode 100644
index 0000000..83be4be
--- /dev/null
+++ b/meta-selftest/wic/test_rawcopy_plugin.wks.in
@@ -0,0 +1,6 @@
+# short-description: This file is used in oe-selftest wic module to test rawcopy plugin
+
+part /boot --active --source bootimg-pcbios
+part / --source rawcopy --sourceparams="file=core-image-minimal-${MACHINE}.ext4" --use-uuid
+
+bootloader --timeout=0 --append="console=ttyS0,115200n8"
diff --git a/meta/lib/oeqa/selftest/wic.py b/meta/lib/oeqa/selftest/wic.py
index 4aacd86..2e22362 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
os.remove(wkspath)
wicout = glob(self.resultdir + "%s-*direct" % wksname)
self.assertEqual(0, len(wicout))
+
+ @only_for_arch(['i586', 'i686', 'x86_64'])
+ def test_rawcopy_plugin_qemu(self):
+ """Test rawcopy plugin in qemu"""
+ # build ext4 and wic images
+ for fstype in ("ext4", "wic"):
+ config = 'IMAGE_FSTYPES = "%s"\nWKS_FILE = "test_rawcopy_plugin.wks.in"\n' % fstype
+ self.append_config(config)
+ self.assertEqual(0, bitbake('core-image-minimal').status)
+ self.remove_config(config)
+
+ with runqemu('core-image-minimal', ssh=False, image_fstype='wic') as qemu:
+ cmd = "grep vda. /proc/partitions |wc -l"
+ status, output = qemu.run_serial(cmd)
+ self.assertEqual(1, status, 'Failed to run command "%s": %s' % (cmd, output))
+ self.assertEqual(output, '2')
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Openembedded-commits
mailing list