summaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa/selftest/cases/imagefeatures.py
diff options
context:
space:
mode:
authorEd Bartosh <ed.bartosh@linux.intel.com>2017-07-07 18:12:23 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-07-17 14:01:37 +0100
commiteeef9c2202a0adb6266977dab292701880afe72b (patch)
tree1240748beebf53e6daa3841007fa3a3bb94d2d37 /meta/lib/oeqa/selftest/cases/imagefeatures.py
parent5a514183e1df22ca0f9e3a73a54049de4bec840e (diff)
downloadpoky-eeef9c2202a0adb6266977dab292701880afe72b.tar.gz
imagefeatures: add test_image_fstypes test case
Tested if core-image-minimal can be built for existing fstypes by building an image and checking if result file <image>.<fstype> exists in the image deploy directory. (From OE-Core rev: 9db3dbde66e3590aea71400891eaea0ae2caf371) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oeqa/selftest/cases/imagefeatures.py')
-rw-r--r--meta/lib/oeqa/selftest/cases/imagefeatures.py28
1 files changed, 28 insertions, 0 deletions
diff --git a/meta/lib/oeqa/selftest/cases/imagefeatures.py b/meta/lib/oeqa/selftest/cases/imagefeatures.py
index e6652ec7ab..91d8e9b501 100644
--- a/meta/lib/oeqa/selftest/cases/imagefeatures.py
+++ b/meta/lib/oeqa/selftest/cases/imagefeatures.py
@@ -124,3 +124,31 @@ class ImageFeatures(OESelftestTestCase):
124 # check if result image is sparse 124 # check if result image is sparse
125 image_stat = os.stat(image_path) 125 image_stat = os.stat(image_path)
126 self.assertTrue(image_stat.st_size > image_stat.st_blocks * 512) 126 self.assertTrue(image_stat.st_size > image_stat.st_blocks * 512)
127
128 def test_image_fstypes(self):
129 """
130 Summary: Check if image of supported image fstypes can be built
131 Expected: core-image-minimal can be built for various image types
132 Product: oe-core
133 Author: Ed Bartosh <ed.bartosh@linux.intel.com>
134 """
135 image_name = 'core-image-minimal'
136
137 img_types = [itype for itype in get_bb_var("IMAGE_TYPES", image_name).split() \
138 if itype not in ('container', 'elf', 'multiubi')]
139
140 config = 'IMAGE_FSTYPES += "%s"\n'\
141 'MKUBIFS_ARGS ?= "-m 2048 -e 129024 -c 2047"\n'\
142 'UBINIZE_ARGS ?= "-m 2048 -p 128KiB -s 512"' % ' '.join(img_types)
143
144 self.write_config(config)
145
146 bitbake(image_name)
147
148 deploy_dir_image = get_bb_var('DEPLOY_DIR_IMAGE')
149 link_name = get_bb_var('IMAGE_LINK_NAME', image_name)
150 for itype in img_types:
151 image_path = os.path.join(deploy_dir_image, "%s.%s" % (link_name, itype))
152 # check if result image is in deploy directory
153 self.assertTrue(os.path.exists(image_path),
154 "%s image %s doesn't exist" % (itype, image_path))