Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Ed Bartosh <ed.bartosh@linux.intel.com>
To: openembedded-core@lists.openembedded.org
Subject: [wic][PATCH v2 02/20] wic: Test rootfs plugin using image recipes
Date: Tue, 30 Jun 2015 11:51:34 +0300	[thread overview]
Message-ID: <1435654312-18177-3-git-send-email-ed.bartosh@linux.intel.com> (raw)
In-Reply-To: <1435654312-18177-1-git-send-email-ed.bartosh@linux.intel.com>

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

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>

 create mode 100644 scripts/lib/image/canned-wks/directdisk-multi-rootfs.wks

diff --git a/meta/lib/oeqa/selftest/wic.py b/meta/lib/oeqa/selftest/wic.py
index 5385562..3cfc2ff 100644
--- a/meta/lib/oeqa/selftest/wic.py
+++ b/meta/lib/oeqa/selftest/wic.py
@@ -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)))
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 0000000..f3c6df5
--- /dev/null
+++ b/scripts/lib/image/canned-wks/directdisk-multi-rootfs.wks
@@ -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"
+
-- 
2.1.4



  parent reply	other threads:[~2015-06-30  8:52 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-30  8:51 [wic][PATCH v2 00/20] miscellaneous fixes. poky-conrib:ed/wic/misc Ed Bartosh
2015-06-30  8:51 ` [wic][PATCH v2 01/20] wic: Fix misleading message Ed Bartosh
2015-06-30  8:51 ` Ed Bartosh [this message]
2015-06-30  8:51 ` [wic][PATCH v2 03/20] wic: Test rootfs plugin using rootfs paths Ed Bartosh
2015-06-30  8:51 ` [wic][PATCH v2 04/20] wic: Refactor getting bitbake variables Ed Bartosh
2015-06-30  8:51 ` [wic][PATCH v2 05/20] wic: Include mount point into image report Ed Bartosh
2015-06-30  8:51 ` [wic][PATCH v2 06/20] wic: Remove annoing debug message Ed Bartosh
2015-06-30  8:51 ` [wic][PATCH v2 07/20] wic: Turn off debug output for 'bitbake -e' Ed Bartosh
2015-06-30  8:51 ` [wic][PATCH v2 08/20] wic: Refactor prepare_rootfs API Ed Bartosh
2015-06-30  8:51 ` [wic][PATCH v2 09/20] wic: Rename partition images Ed Bartosh
2015-06-30  8:51 ` [wic][PATCH v2 10/20] wic: Get rid of useless variable 'image_rootfs' Ed Bartosh
2015-06-30  8:51 ` [wic][PATCH v2 11/20] wic: Call methods better way Ed Bartosh
2015-06-30  8:51 ` [wic][PATCH v2 12/20] wic: Refactor prepare_empty_partition API Ed Bartosh
2015-06-30  8:51 ` [wic][PATCH v2 13/20] wic: Remove duplicated code Ed Bartosh
2015-06-30  8:51 ` [wic][PATCH v2 14/20] wic: Fix naming conflict Ed Bartosh
2015-06-30  8:51 ` [wic][PATCH v2 15/20] wic: Add --uuid partition option Ed Bartosh
2015-06-30  8:51 ` [wic][PATCH v2 16/20] wic: Refactor fstab update code Ed Bartosh
2015-06-30  8:51 ` [wic][PATCH v2 17/20] wic: Remove __write_partition method Ed Bartosh
2015-06-30  8:51 ` [wic][PATCH v2 18/20] wic: Fix confusing error message Ed Bartosh
2015-06-30  8:51 ` [wic][PATCH v2 19/20] wic: Code cleanup: long lines, identation and whitespaces Ed Bartosh
2015-06-30  8:51 ` [wic][PATCH v2 20/20] wic: Code cleanup: unused imports Ed Bartosh

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1435654312-18177-3-git-send-email-ed.bartosh@linux.intel.com \
    --to=ed.bartosh@linux.intel.com \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox