[OE-core] [PATCH 1/1] imagefeatures.py: Added testcase to track IMAGE_GEN_DEBUGFS
Humberto Ibarra
humberto.ibarra.lopez at intel.com
Fri Jun 16 17:01:40 UTC 2017
Add new testcase to check varibale IMAGE_GEN_DEBUGFS. Test makes
sure that debug filesystem and packages are created accordingly.
[YOCTO #10906]
Signed-off-by: Humberto Ibarra <humberto.ibarra.lopez at intel.com>
---
meta/lib/oeqa/selftest/cases/imagefeatures.py | 33 +++++++++++++++++++++++++++
1 file changed, 33 insertions(+)
diff --git a/meta/lib/oeqa/selftest/cases/imagefeatures.py b/meta/lib/oeqa/selftest/cases/imagefeatures.py
index 45a06fe..8bf084e 100644
--- a/meta/lib/oeqa/selftest/cases/imagefeatures.py
+++ b/meta/lib/oeqa/selftest/cases/imagefeatures.py
@@ -3,6 +3,7 @@ from oeqa.utils.commands import runCmd, bitbake, get_bb_var, runqemu
from oeqa.core.decorator.oeid import OETestID
from oeqa.utils.sshcontrol import SSHControl
import os
+import glob
class ImageFeatures(OESelftestTestCase):
@@ -123,3 +124,35 @@ class ImageFeatures(OESelftestTestCase):
# check if result image is sparse
image_stat = os.stat(image_path)
self.assertTrue(image_stat.st_size > image_stat.st_blocks * 512)
+
+ def test_image_gen_debugfs(self):
+ """
+ Summary: Check debugfs generation
+ Expected: 1. core-image-minimal can be build with IMAGE_GEN_DEBUGFS variable set
+ 2. debug filesystem is created when variable set
+ 3. debug packages created, either rpm, deb or ipk
+ Product: oe-core
+ Author: Humberto Ibarra <humberto.ibarra.lopez at intel.com>
+ """
+
+ image_name = 'core-image-minimal'
+ clean_cmd = '-c clean %s' % image_name
+ deploy_dir_image = get_bb_var('DEPLOY_DIR_IMAGE')
+
+ for pack_class in [ "rpm", "deb", "ipk"]:
+ bitbake(clean_cmd)
+ features = 'IMAGE_GEN_DEBUGFS = "1"\n'
+ features += 'IMAGE_FSTYPES_DEBUGFS = "tar.bz2"\n'
+ features += 'PACKAGE_CLASSES = "package_%s"' % pack_class
+ self.write_config(features)
+
+ bitbake(image_name)
+ debug_files = glob.glob(os.path.join(deploy_dir_image,"*-dbg.rootfs.tar.bz2"))
+ self.assertNotEqual(len(debug_files), 0,
+ 'debug filesystem not generated for %s' % pack_class)
+
+ deploy_packages_var = 'DEPLOY_DIR_%s' % pack_class.upper()
+ debug_pack_files = glob.glob(os.path.join(get_bb_var(deploy_packages_var),
+ get_bb_var("MACHINE").replace("-","_"), "*-dbg*"))
+ self.assertNotEqual(len(debug_pack_files), 0,
+ 'debug packages not generated for %s' % pack_class)
--
2.7.5
More information about the Openembedded-core
mailing list