aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/lib/oeqa/selftest/cases/runtime_test.py33
1 files changed, 33 insertions, 0 deletions
diff --git a/meta/lib/oeqa/selftest/cases/runtime_test.py b/meta/lib/oeqa/selftest/cases/runtime_test.py
index 9fec4d869bc..d0e467e6d5c 100644
--- a/meta/lib/oeqa/selftest/cases/runtime_test.py
+++ b/meta/lib/oeqa/selftest/cases/runtime_test.py
@@ -237,3 +237,36 @@ postinst-delayed-t \
sshargs = '-o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no'
result = runCmd('ssh %s root@%s %s' % (sshargs, qemu.ip, testcommand))
self.assertEqual(result.status, 0, 'File %s was not created at firts boot'% fileboot_name)
+
+class GeneratedImages(OESelftestTestCase):
+ @OETestID(1845)
+ def test_integrity_compressed_images(self):
+ """
+ Summary: The purpose of this test is to verify the correct behavior of all the available images compression.
+ Bugzilla ID: [10745]
+ Steps:
+ 1. Add IMAGE_FSTYPES += "[type(s)]" to ~/conf/local.conf
+ 2. Build a "core-image-minimal" using this configuration.
+ 3. Verify that the image compressed file is present in rootfs directory.
+ """
+ # Step 1 Add configuration to conf/local.conf
+ image_types = get_bb_var('IMAGE_TYPES', 'core-image-minimal')
+ features = 'IMAGE_CONTAINER_NO_DUMMY = "1"\n'
+ features_list = image_types.split()
+ self.write_config("IMAGE_FSTYPES += \"%s\"" % image_types)
+ self.append_config(features)
+
+ # Step 2, compile.
+ build = 'core-image-minimal'
+ bitbake(build)
+
+ for image_feature in features_list:
+ # Step 3 Verify compressed images are present in rottfs directory.
+ need_vars = ['DEPLOY_DIR_IMAGE','MACHINE']
+ bb_vars = get_bb_vars(need_vars, 'core-image-minimal')
+ deploy_dir_image = bb_vars['DEPLOY_DIR_IMAGE']
+ machine = bb_vars['MACHINE']
+ compressed_file = "%s-%s.%s" % (build, machine, image_feature)
+ complete_path = os.path.join(deploy_dir_image, compressed_file)
+ msg = "Couldn't find compressed file: %s" % complete_path
+ self.assertEqual(os.path.isfile(complete_path), True, msg)