summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEd Bartosh <ed.bartosh@linux.intel.com>2015-06-26 18:55:02 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-07-02 23:08:35 +0100
commitb42d7d26e11164c4811d0b0923982c0e387ed7bb (patch)
tree80d1cfaad445618a51550074fa5e006a9e004e0d
parentc86a0d290fe919140a95658741c522a22d7988b6 (diff)
downloadpoky-b42d7d26e11164c4811d0b0923982c0e387ed7bb.tar.gz
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>
-rw-r--r--meta/lib/oeqa/selftest/wic.py10
-rw-r--r--scripts/lib/image/canned-wks/directdisk-multi-rootfs.wks23
2 files changed, 33 insertions, 0 deletions
diff --git a/meta/lib/oeqa/selftest/wic.py b/meta/lib/oeqa/selftest/wic.py
index 53855625b8..3cfc2ffcba 100644
--- a/meta/lib/oeqa/selftest/wic.py
+++ b/meta/lib/oeqa/selftest/wic.py
@@ -133,3 +133,13 @@ class Wic(oeSelfTest):
133 self.assertEqual(2, runCmd("wic create directdisk " 133 self.assertEqual(2, runCmd("wic create directdisk "
134 "--image-name core-image-minimal " 134 "--image-name core-image-minimal "
135 "-c wrong", ignore_status=True).status) 135 "-c wrong", ignore_status=True).status)
136
137 def test16_rootfs_indirect_recipes(self):
138 """Test usage of rootfs plugin with rootfs recipes"""
139 wks = "directdisk-multi-rootfs"
140 self.assertEqual(0, runCmd("wic create %s "
141 "--image-name core-image-minimal "
142 "--rootfs rootfs1=core-image-minimal "
143 "--rootfs rootfs2=core-image-minimal" \
144 % wks).status)
145 self.assertEqual(1, len(glob(self.resultdir + "%s*.direct" % wks)))
diff --git a/scripts/lib/image/canned-wks/directdisk-multi-rootfs.wks b/scripts/lib/image/canned-wks/directdisk-multi-rootfs.wks
new file mode 100644
index 0000000000..f3c6df543f
--- /dev/null
+++ b/scripts/lib/image/canned-wks/directdisk-multi-rootfs.wks
@@ -0,0 +1,23 @@
1# short-description: Create multi rootfs image using rootfs plugin
2# long-description: Creates a partitioned disk image with two rootfs partitions
3# using rootfs plugin.
4#
5# Partitions can use either
6# - indirect rootfs references to image recipe(s):
7# wic create directdisk-multi-indirect-recipes -e core-image-minimal \
8# --rootfs-dir rootfs1=core-image-minimal
9# --rootfs-dir rootfs2=core-image-minimal-dev
10#
11# - or paths to rootfs directories:
12# wic create directdisk-multi-rootfs \
13# --rootfs-dir rootfs1=tmp/work/qemux86_64-poky-linux/core-image-minimal/1.0-r0/rootfs/
14# --rootfs-dir rootfs2=tmp/work/qemux86_64-poky-linux/core-image-minimal-dev/1.0-r0/rootfs/
15#
16# - or any combinations of -r and --rootfs command line options
17
18part /boot --source bootimg-pcbios --ondisk sda --label boot --active --align 1024
19part / --source rootfs --rootfs-dir=rootfs1 --ondisk sda --fstype=ext3 --label platform --align 1024
20part /rescue --source rootfs --rootfs-dir=rootfs2 --ondisk sda --fstype=ext3 --label secondary --align 1024
21
22bootloader --timeout=0 --append="rootwait rootfstype=ext3 video=vesafb vga=0x318 console=tty0"
23