diff options
author | Romuald Jeanne <romuald.jeanne@st.com> | 2023-03-27 16:38:30 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2023-03-30 23:26:04 +0100 |
commit | 6815f716927477988d2ca2111c74285dcc15c053 (patch) | |
tree | 0414834c5dd56f42eb90f46caf36848511157377 /meta/lib/oeqa | |
parent | 953007b68ba61003700e9907df04e4a05b65a3f8 (diff) | |
download | poky-6815f716927477988d2ca2111c74285dcc15c053.tar.gz |
oeqa/selftest/imagefeatures: set a test for mutliubi in test_image_fstypes
Allow 'multiubi' fstype image.
Set 'MULTIUBI_BUILD' with two entries to allow configuration for two
different '.ubifs'.
Configure 'MKUBIFS_ARGS_*' and 'UBINIZE_ARGS_*' for both configurations.
(From OE-Core rev: 96d4486df6d870ef19e2055b026729e66bc118f3)
Signed-off-by: Romuald Jeanne <romuald.jeanne@st.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oeqa')
-rw-r--r-- | meta/lib/oeqa/selftest/cases/imagefeatures.py | 25 |
1 files changed, 20 insertions, 5 deletions
diff --git a/meta/lib/oeqa/selftest/cases/imagefeatures.py b/meta/lib/oeqa/selftest/cases/imagefeatures.py index 3dc750594c..d31b43d9cc 100644 --- a/meta/lib/oeqa/selftest/cases/imagefeatures.py +++ b/meta/lib/oeqa/selftest/cases/imagefeatures.py | |||
@@ -199,7 +199,7 @@ class ImageFeatures(OESelftestTestCase): | |||
199 | image = 'core-image-minimal' | 199 | image = 'core-image-minimal' |
200 | 200 | ||
201 | all_image_types = set(get_bb_var("IMAGE_TYPES", image).split()) | 201 | all_image_types = set(get_bb_var("IMAGE_TYPES", image).split()) |
202 | skip_image_types = set(('container', 'elf', 'f2fs', 'multiubi', 'tar.zst', 'wic.zst', 'squashfs-lzo')) | 202 | skip_image_types = set(('container', 'elf', 'f2fs', 'tar.zst', 'wic.zst', 'squashfs-lzo')) |
203 | img_types = all_image_types - skip_image_types | 203 | img_types = all_image_types - skip_image_types |
204 | 204 | ||
205 | config = """ | 205 | config = """ |
@@ -207,16 +207,31 @@ IMAGE_FSTYPES += "%s" | |||
207 | WKS_FILE = "wictestdisk.wks" | 207 | WKS_FILE = "wictestdisk.wks" |
208 | MKUBIFS_ARGS ?= "-m 2048 -e 129024 -c 2047" | 208 | MKUBIFS_ARGS ?= "-m 2048 -e 129024 -c 2047" |
209 | UBINIZE_ARGS ?= "-m 2048 -p 128KiB -s 512" | 209 | UBINIZE_ARGS ?= "-m 2048 -p 128KiB -s 512" |
210 | MULTIUBI_BUILD += "mtd_2_128" | ||
211 | MKUBIFS_ARGS_mtd_2_128 ?= "-m 2048 -e 129024 -c 2047" | ||
212 | UBINIZE_ARGS_mtd_2_128 ?= "-m 2048 -p 128KiB -s 512" | ||
213 | MULTIUBI_BUILD += "mtd_4_256" | ||
214 | MKUBIFS_ARGS_mtd_4_256 ?= "-m 4096 -e 253952 -c 4096" | ||
215 | UBINIZE_ARGS_mtd_4_256 ?= "-m 4096 -p 256KiB" | ||
210 | """ % ' '.join(img_types) | 216 | """ % ' '.join(img_types) |
211 | self.write_config(config) | 217 | self.write_config(config) |
212 | 218 | ||
213 | bitbake(image) | 219 | bitbake(image) |
214 | bb_vars = get_bb_vars(['DEPLOY_DIR_IMAGE', 'IMAGE_LINK_NAME'], image) | 220 | bb_vars = get_bb_vars(['DEPLOY_DIR_IMAGE', 'IMAGE_LINK_NAME', 'MULTIUBI_BUILD'], image) |
215 | 221 | ||
216 | for itype in img_types: | 222 | for itype in img_types: |
217 | image_path = os.path.join(bb_vars['DEPLOY_DIR_IMAGE'], "%s.%s" % (bb_vars['IMAGE_LINK_NAME'], itype)) | 223 | if itype == 'multiubi': |
218 | # check if result image is in deploy directory | 224 | # For multiubi build we need to manage MULTIUBI_BUILD entry to append |
219 | self.assertTrue(os.path.exists(image_path), | 225 | # specific name to IMAGE_LINK_NAME |
226 | for vname in bb_vars['MULTIUBI_BUILD'].split(): | ||
227 | image_path = os.path.join(bb_vars['DEPLOY_DIR_IMAGE'], "%s_%s.ubifs" % (bb_vars['IMAGE_LINK_NAME'], vname)) | ||
228 | # check if result image is in deploy directory | ||
229 | self.assertTrue(os.path.exists(image_path), | ||
230 | "%s image %s doesn't exist" % (itype, image_path)) | ||
231 | else: | ||
232 | image_path = os.path.join(bb_vars['DEPLOY_DIR_IMAGE'], "%s.%s" % (bb_vars['IMAGE_LINK_NAME'], itype)) | ||
233 | # check if result image is in deploy directory | ||
234 | self.assertTrue(os.path.exists(image_path), | ||
220 | "%s image %s doesn't exist" % (itype, image_path)) | 235 | "%s image %s doesn't exist" % (itype, image_path)) |
221 | 236 | ||
222 | def test_useradd_static(self): | 237 | def test_useradd_static(self): |