diff options
author | Tom Rini <trini@konsulko.com> | 2017-07-28 20:14:34 -0400 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-07-30 08:46:20 +0100 |
commit | 41cc7f82823bee250e60f3a8fa403238f0b1d8dc (patch) | |
tree | 70ea328d0d943f41f7991ae7b508e4e6669356b8 /meta/lib | |
parent | 03d5daf1aeebc16800c589af6d62d5b72741696c (diff) | |
download | poky-41cc7f82823bee250e60f3a8fa403238f0b1d8dc.tar.gz |
imagefeatures: Extend test_bmap to validate gzip
We extend the existing test_bmap test to also produce an ext4.bmap.gz
file and then have gzip confirm that it contains valid gzip data. This
tests that we are able to chain at least 2 CONVERSION_CMDs together.
Cc: Ed Bartosh <ed.bartosh@linux.intel.com>
(From OE-Core rev: 1e9ca92f84d9d5b4e56d47dfd4b3d7f9aba3d21b)
Signed-off-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib')
-rw-r--r-- | meta/lib/oeqa/selftest/cases/imagefeatures.py | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/meta/lib/oeqa/selftest/cases/imagefeatures.py b/meta/lib/oeqa/selftest/cases/imagefeatures.py index 91d8e9b501..dac74ba72b 100644 --- a/meta/lib/oeqa/selftest/cases/imagefeatures.py +++ b/meta/lib/oeqa/selftest/cases/imagefeatures.py | |||
@@ -106,7 +106,7 @@ class ImageFeatures(OESelftestTestCase): | |||
106 | Author: Ed Bartosh <ed.bartosh@linux.intel.com> | 106 | Author: Ed Bartosh <ed.bartosh@linux.intel.com> |
107 | """ | 107 | """ |
108 | 108 | ||
109 | features = 'IMAGE_FSTYPES += " ext4 ext4.bmap"' | 109 | features = 'IMAGE_FSTYPES += " ext4 ext4.bmap ext4.bmap.gz"' |
110 | self.write_config(features) | 110 | self.write_config(features) |
111 | 111 | ||
112 | image_name = 'core-image-minimal' | 112 | image_name = 'core-image-minimal' |
@@ -116,15 +116,21 @@ class ImageFeatures(OESelftestTestCase): | |||
116 | link_name = get_bb_var('IMAGE_LINK_NAME', image_name) | 116 | link_name = get_bb_var('IMAGE_LINK_NAME', image_name) |
117 | image_path = os.path.join(deploy_dir_image, "%s.ext4" % link_name) | 117 | image_path = os.path.join(deploy_dir_image, "%s.ext4" % link_name) |
118 | bmap_path = "%s.bmap" % image_path | 118 | bmap_path = "%s.bmap" % image_path |
119 | gzip_path = "%s.gz" % bmap_path | ||
119 | 120 | ||
120 | # check if result image and bmap file are in deploy directory | 121 | # check if result image, bmap and bmap.gz files are in deploy directory |
121 | self.assertTrue(os.path.exists(image_path)) | 122 | self.assertTrue(os.path.exists(image_path)) |
122 | self.assertTrue(os.path.exists(bmap_path)) | 123 | self.assertTrue(os.path.exists(bmap_path)) |
124 | self.assertTrue(os.path.exists(gzip_path)) | ||
123 | 125 | ||
124 | # check if result image is sparse | 126 | # check if result image is sparse |
125 | image_stat = os.stat(image_path) | 127 | image_stat = os.stat(image_path) |
126 | self.assertTrue(image_stat.st_size > image_stat.st_blocks * 512) | 128 | self.assertTrue(image_stat.st_size > image_stat.st_blocks * 512) |
127 | 129 | ||
130 | # check if the resulting gzip is valid | ||
131 | self.assertTrue(runCmd('gzip -t %s' % gzip_path)) | ||
132 | |||
133 | |||
128 | def test_image_fstypes(self): | 134 | def test_image_fstypes(self): |
129 | """ | 135 | """ |
130 | Summary: Check if image of supported image fstypes can be built | 136 | Summary: Check if image of supported image fstypes can be built |