summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/lib/oeqa/selftest/imagefeatures.py27
1 files changed, 27 insertions, 0 deletions
diff --git a/meta/lib/oeqa/selftest/imagefeatures.py b/meta/lib/oeqa/selftest/imagefeatures.py
index 8a53899c7d..08e382f2b7 100644
--- a/meta/lib/oeqa/selftest/imagefeatures.py
+++ b/meta/lib/oeqa/selftest/imagefeatures.py
@@ -98,3 +98,30 @@ class ImageFeatures(oeSelfTest):
98 # Build a core-image-weston 98 # Build a core-image-weston
99 bitbake('core-image-weston') 99 bitbake('core-image-weston')
100 100
101 def test_bmap(self):
102 """
103 Summary: Check bmap support
104 Expected: 1. core-image-minimal can be build with bmap support
105 2. core-image-minimal is sparse
106 Product: oe-core
107 Author: Ed Bartosh <ed.bartosh@linux.intel.com>
108 """
109
110 features = 'IMAGE_FSTYPES += " ext4 ext4.bmap"'
111 self.write_config(features)
112
113 image_name = 'core-image-minimal'
114 bitbake(image_name)
115
116 deploy_dir = get_bb_var('DEPLOY_DIR_IMAGE')
117 link_name = get_bb_var('IMAGE_LINK_NAME', image_name)
118 image_path = os.path.join(deploy_dir, "%s.ext4" % link_name)
119 bmap_path = "%s.bmap" % image_path
120
121 # check if result image and bmap file are in deploy directory
122 self.assertTrue(os.path.exists(image_path))
123 self.assertTrue(os.path.exists(bmap_path))
124
125 # check if result image is sparse
126 image_stat = os.stat(image_path)
127 self.assertTrue(image_stat.st_size > image_stat.st_blocks * 512)