[gnome-continuous-yocto/gnomeostree-3.28-rocko: 7033/8267] imagefeatures: Extend test_bmap to validate gzip
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-continuous-yocto/gnomeostree-3.28-rocko: 7033/8267] imagefeatures: Extend test_bmap to validate gzip
- Date: Sun, 17 Dec 2017 05:40:48 +0000 (UTC)
commit 41cc7f82823bee250e60f3a8fa403238f0b1d8dc
Author: Tom Rini <trini konsulko com>
Date: Fri Jul 28 20:14:34 2017 -0400
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>
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 91d8e9b..dac74ba 100644
--- a/meta/lib/oeqa/selftest/cases/imagefeatures.py
+++ b/meta/lib/oeqa/selftest/cases/imagefeatures.py
@@ -106,7 +106,7 @@ class ImageFeatures(OESelftestTestCase):
Author: Ed Bartosh <ed bartosh linux intel com>
"""
- features = 'IMAGE_FSTYPES += " ext4 ext4.bmap"'
+ features = 'IMAGE_FSTYPES += " ext4 ext4.bmap ext4.bmap.gz"'
self.write_config(features)
image_name = 'core-image-minimal'
@@ -116,15 +116,21 @@ class ImageFeatures(OESelftestTestCase):
link_name = get_bb_var('IMAGE_LINK_NAME', image_name)
image_path = os.path.join(deploy_dir_image, "%s.ext4" % link_name)
bmap_path = "%s.bmap" % image_path
+ gzip_path = "%s.gz" % bmap_path
- # check if result image and bmap file are in deploy directory
+ # check if result image, bmap and bmap.gz files are in deploy directory
self.assertTrue(os.path.exists(image_path))
self.assertTrue(os.path.exists(bmap_path))
+ self.assertTrue(os.path.exists(gzip_path))
# check if result image is sparse
image_stat = os.stat(image_path)
self.assertTrue(image_stat.st_size > image_stat.st_blocks * 512)
+ # check if the resulting gzip is valid
+ self.assertTrue(runCmd('gzip -t %s' % gzip_path))
+
+
def test_image_fstypes(self):
"""
Summary: Check if image of supported image fstypes can be built
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]