wic: Test rootfs plugin using image recipes

Added canned wks and testcase to create multi-rootfs images referring
bitbake image recipes.

(From OE-Core rev: 723ed56eda0e64b9678b846ef2001465b15e0c1b)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Ed Bartosh
2015-06-26 18:55:02 +03:00
committed by Richard Purdie
parent c86a0d290f
commit b42d7d26e1
2 changed files with 33 additions and 0 deletions

View File

@@ -133,3 +133,13 @@ class Wic(oeSelfTest):
self.assertEqual(2, runCmd("wic create directdisk "
"--image-name core-image-minimal "
"-c wrong", ignore_status=True).status)
def test16_rootfs_indirect_recipes(self):
"""Test usage of rootfs plugin with rootfs recipes"""
wks = "directdisk-multi-rootfs"
self.assertEqual(0, runCmd("wic create %s "
"--image-name core-image-minimal "
"--rootfs rootfs1=core-image-minimal "
"--rootfs rootfs2=core-image-minimal" \
% wks).status)
self.assertEqual(1, len(glob(self.resultdir + "%s*.direct" % wks)))

View File

@@ -0,0 +1,23 @@
# short-description: Create multi rootfs image using rootfs plugin
# long-description: Creates a partitioned disk image with two rootfs partitions
# using rootfs plugin.
#
# Partitions can use either
# - indirect rootfs references to image recipe(s):
# wic create directdisk-multi-indirect-recipes -e core-image-minimal \
# --rootfs-dir rootfs1=core-image-minimal
# --rootfs-dir rootfs2=core-image-minimal-dev
#
# - or paths to rootfs directories:
# wic create directdisk-multi-rootfs \
# --rootfs-dir rootfs1=tmp/work/qemux86_64-poky-linux/core-image-minimal/1.0-r0/rootfs/
# --rootfs-dir rootfs2=tmp/work/qemux86_64-poky-linux/core-image-minimal-dev/1.0-r0/rootfs/
#
# - or any combinations of -r and --rootfs command line options
part /boot --source bootimg-pcbios --ondisk sda --label boot --active --align 1024
part / --source rootfs --rootfs-dir=rootfs1 --ondisk sda --fstype=ext3 --label platform --align 1024
part /rescue --source rootfs --rootfs-dir=rootfs2 --ondisk sda --fstype=ext3 --label secondary --align 1024
bootloader --timeout=0 --append="rootwait rootfstype=ext3 video=vesafb vga=0x318 console=tty0"