]> code.ossystems Code Review - openembedded-core.git/commitdiff
oe-selftest: test building wic image by bitbake
authorEd Bartosh <ed.bartosh@linux.intel.com>
Sun, 30 Aug 2015 21:14:26 +0000 (00:14 +0300)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sun, 30 Aug 2015 22:26:14 +0000 (23:26 +0100)
Added test case to verify building of wic-image-minimal recipe
and produced artifacts: manifest and bzipped partitioned image.

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/lib/oeqa/selftest/wic.py

index fe8a2d06f427f3261d2e73f7dd7105f437ab8496..deb2333e0535a01fbd6d8bb06dd84ccbc626f32f 100644 (file)
@@ -188,3 +188,17 @@ class Wic(oeSelfTest):
             for var in wicvars:
                 self.assertTrue(var in content, "%s is not in .env file" % var)
                 self.assertTrue(content[var])
+
+    def test20_wic_image_type(self):
+        """Test building wic images by bitbake"""
+        self.assertEqual(0, bitbake('wic-image-minimal').status)
+
+        deploy_dir = get_bb_var('DEPLOY_DIR_IMAGE')
+        machine = get_bb_var('MACHINE')
+        prefix = os.path.join(deploy_dir, 'wic-image-minimal-%s.' % machine)
+        # check if we have result image and manifests symlinks
+        # pointing to existing files
+        for suffix in ('wic.bz2', 'manifest'):
+            path = prefix + suffix
+            self.assertTrue(os.path.islink(path))
+            self.assertTrue(os.path.isfile(os.path.realpath(path)))