summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2017-07-28 20:14:35 -0400
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-07-30 08:46:20 +0100
commitf809daa9acc12cf87a6da3813e94f24c2ddc563f (patch)
tree6e818e2e0814bfc0252bd94557c52226fe39ab7e /meta
parent41cc7f82823bee250e60f3a8fa403238f0b1d8dc (diff)
downloadpoky-f809daa9acc12cf87a6da3813e94f24c2ddc563f.tar.gz
imagefeatures: Add a test for many CONVERSION_CMDs being chained
Add a new test to create a long (and not otherwise useful) image, ext4.bmap.gz.bz2.lzo.xz.u-boot and also the sha256sum of it. Check that the resulting sha256sum is valid. Cc: Ed Bartosh <ed.bartosh@linux.intel.com> (From OE-Core rev: ac4402bff547b017284b12c1874d4094c169419d) Signed-off-by: Tom Rini <trini@konsulko.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/lib/oeqa/selftest/cases/imagefeatures.py30
1 files changed, 30 insertions, 0 deletions
diff --git a/meta/lib/oeqa/selftest/cases/imagefeatures.py b/meta/lib/oeqa/selftest/cases/imagefeatures.py
index dac74ba72b..2c59ef6490 100644
--- a/meta/lib/oeqa/selftest/cases/imagefeatures.py
+++ b/meta/lib/oeqa/selftest/cases/imagefeatures.py
@@ -130,6 +130,36 @@ class ImageFeatures(OESelftestTestCase):
130 # check if the resulting gzip is valid 130 # check if the resulting gzip is valid
131 self.assertTrue(runCmd('gzip -t %s' % gzip_path)) 131 self.assertTrue(runCmd('gzip -t %s' % gzip_path))
132 132
133 def test_long_chain_conversion(self):
134 """
135 Summary: Check for chaining many CONVERSION_CMDs together
136 Expected: 1. core-image-minimal can be built with
137 ext4.bmap.gz.bz2.lzo.xz.u-boot and also create a
138 sha256sum
139 2. The above image has a valid sha256sum
140 Product: oe-core
141 Author: Tom Rini <trini@konsulko.com>
142 """
143
144 conv = "ext4.bmap.gz.bz2.lzo.xz.u-boot"
145 features = 'IMAGE_FSTYPES += "%s %s.sha256sum"' % (conv, conv)
146 self.write_config(features)
147
148 image_name = 'core-image-minimal'
149 bitbake(image_name)
150
151 deploy_dir_image = get_bb_var('DEPLOY_DIR_IMAGE')
152 link_name = get_bb_var('IMAGE_LINK_NAME', image_name)
153 image_path = os.path.join(deploy_dir_image, "%s.%s" %
154 (link_name, conv))
155
156 # check if resulting image is in the deploy directory
157 self.assertTrue(os.path.exists(image_path))
158 self.assertTrue(os.path.exists(image_path + ".sha256sum"))
159
160 # check if the resulting sha256sum agrees
161 self.assertTrue(runCmd('cd %s;sha256sum -c %s.%s.sha256sum' %
162 (deploy_dir_image, link_name, conv)))
133 163
134 def test_image_fstypes(self): 164 def test_image_fstypes(self):
135 """ 165 """