diff options
Diffstat (limited to 'meta/lib/oeqa/selftest/cases/imagefeatures.py')
-rw-r--r-- | meta/lib/oeqa/selftest/cases/imagefeatures.py | 74 |
1 files changed, 0 insertions, 74 deletions
diff --git a/meta/lib/oeqa/selftest/cases/imagefeatures.py b/meta/lib/oeqa/selftest/cases/imagefeatures.py index 415e0315fc..6723a8198f 100644 --- a/meta/lib/oeqa/selftest/cases/imagefeatures.py +++ b/meta/lib/oeqa/selftest/cases/imagefeatures.py | |||
@@ -264,80 +264,6 @@ PNBLACKLIST[busybox] = "Don't build this" | |||
264 | 264 | ||
265 | bitbake("--graphviz core-image-sato") | 265 | bitbake("--graphviz core-image-sato") |
266 | 266 | ||
267 | def test_fit_image(self): | ||
268 | """ | ||
269 | Summary: Check if FIT image and Image Tree Source (its) are built | ||
270 | and the Image Tree Source has the correct fields. | ||
271 | Expected: 1. fitImage and fitImage-its can be built | ||
272 | 2. The type, load address, entrypoint address and | ||
273 | default values of kernel and ramdisk are as expected | ||
274 | in the Image Tree Source. Not all the fields are tested, | ||
275 | only the key fields that wont vary between different | ||
276 | architectures. | ||
277 | Product: oe-core | ||
278 | Author: Usama Arif <usama.arif@arm.com> | ||
279 | """ | ||
280 | config = """ | ||
281 | # Enable creation of fitImage | ||
282 | KERNEL_IMAGETYPE = "Image" | ||
283 | KERNEL_IMAGETYPES += " fitImage " | ||
284 | KERNEL_CLASSES = " kernel-fitimage " | ||
285 | |||
286 | # RAM disk variables including load address and entrypoint for kernel and RAM disk | ||
287 | IMAGE_FSTYPES += "cpio.gz" | ||
288 | INITRAMFS_IMAGE = "core-image-minimal" | ||
289 | UBOOT_RD_LOADADDRESS = "0x88000000" | ||
290 | UBOOT_RD_ENTRYPOINT = "0x88000000" | ||
291 | UBOOT_LOADADDRESS = "0x80080000" | ||
292 | UBOOT_ENTRYPOINT = "0x80080000" | ||
293 | """ | ||
294 | self.write_config(config) | ||
295 | |||
296 | # fitImage is created as part of linux recipe | ||
297 | bitbake("virtual/kernel") | ||
298 | |||
299 | image_type = "core-image-minimal" | ||
300 | deploy_dir_image = get_bb_var('DEPLOY_DIR_IMAGE') | ||
301 | machine = get_bb_var('MACHINE') | ||
302 | fitimage_its_path = os.path.join(deploy_dir_image, | ||
303 | "fitImage-its-%s-%s-%s" % (image_type, machine, machine)) | ||
304 | fitimage_path = os.path.join(deploy_dir_image, | ||
305 | "fitImage-%s-%s-%s" % (image_type, machine, machine)) | ||
306 | |||
307 | self.assertTrue(os.path.exists(fitimage_its_path), | ||
308 | "%s image tree source doesn't exist" % (fitimage_its_path)) | ||
309 | self.assertTrue(os.path.exists(fitimage_path), | ||
310 | "%s FIT image doesn't exist" % (fitimage_path)) | ||
311 | |||
312 | # Check that the type, load address, entrypoint address and default | ||
313 | # values for kernel and ramdisk in Image Tree Source are as expected. | ||
314 | # The order of fields in the below array is important. Not all the | ||
315 | # fields are tested, only the key fields that wont vary between | ||
316 | # different architectures. | ||
317 | its_field_check = ['type = "kernel";', | ||
318 | 'load = <0x80080000>;', | ||
319 | 'entry = <0x80080000>;', | ||
320 | 'type = "ramdisk";', | ||
321 | 'load = <0x88000000>;', | ||
322 | 'entry = <0x88000000>;', | ||
323 | 'default = "conf@1";', | ||
324 | 'kernel = "kernel@1";', | ||
325 | 'ramdisk = "ramdisk@1";' | ||
326 | ] | ||
327 | |||
328 | with open(fitimage_its_path) as its_file: | ||
329 | field_index = 0 | ||
330 | for line in its_file: | ||
331 | if field_index == len(its_field_check): | ||
332 | break | ||
333 | if its_field_check[field_index] in line: | ||
334 | field_index +=1 | ||
335 | |||
336 | if field_index != len(its_field_check): # if its equal, the test passed | ||
337 | self.assertTrue(field_index == len(its_field_check), | ||
338 | "Fields in Image Tree Source File %s did not match, error in finding %s" | ||
339 | % (fitimage_its_path, its_field_check[field_index])) | ||
340 | |||
341 | def test_image_gen_debugfs(self): | 267 | def test_image_gen_debugfs(self): |
342 | """ | 268 | """ |
343 | Summary: Check debugfs generation | 269 | Summary: Check debugfs generation |