imagefeatures.py: Added testcase to track IMAGE_GEN_DEBUGFS
v4 cover imagefeatures.py: Added testcase to track IMAGE_GEN_DEBUGFS
Patch to add a testcase for IMAGE_GEN_DEBUGFS variable. Checks if debug filesystem was created.
Changed on V4:
- Rebased with master.
- Added id to tests missing it.
The following changes since commit 4469acdf1d0338220f3fe2ecb5e079eea6fda375:
lib/oe/utils: remove param_bool() (2017-12-02 11:25:34 +0000)
are available in the git repository at:
git://git.yoctoproject.org/poky-contrib jairglez/ImageGenDebugfs
http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=jairglez/ImageGenDebugfs
Humberto Ibarra (1):
imagefeatures.py: Added testcase to track IMAGE_GEN_DEBUGFS
Jair Gonzalez (1):
imagefeatures.py: Add id to tests missing it
meta/lib/oeqa/selftest/cases/imagefeatures.py | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+)
Signature · 1 line
2.7.5
PATCH v4 1/2 imagefeatures.py: Added testcase to track IMAGE_GEN_DEBUGFS
From: Humberto Ibarra <[email protected]>
Add new testcase to check varibale IMAGE_GEN_DEBUGFS. Test makes sure that debug filesystem is created accordingly.
[YOCTO #10906]
--- meta/lib/oeqa/selftest/cases/imagefeatures.py | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+)
meta/lib/oeqa/selftest/cases/imagefeatures.py +21 -0
@@ -4,6 +4,7 @@ from oeqa.core.decorator.oeid import OETestID from oeqa.utils.sshcontrol import SSHControl import os import json +import glob class ImageFeatures(OESelftestTestCase):
@@ -238,3 +239,23 @@ USERADD_GID_TABLES += "files/static-group" """ self.write_config(config) bitbake("core-image-base") + + 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 + Product: oe-core + Author: Humberto Ibarra <[email protected]> + """ + + image_name = 'core-image-minimal' + deploy_dir_image = get_bb_var('DEPLOY_DIR_IMAGE') + + features = 'IMAGE_GEN_DEBUGFS = "1"\n' + features += 'IMAGE_FSTYPES_DEBUGFS = "tar.bz2"' + 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')
Signature · 1 line
2.7.5
PATCH v4 2/2 imagefeatures.py: Add id to tests missing it
In reply to Jair GonzalezThis commit adds an id to the following tests:
- test_useradd_static
- test_image_gen_debugfs
--- meta/lib/oeqa/selftest/cases/imagefeatures.py | 2 ++ 1 file changed, 2 insertions(+)
meta/lib/oeqa/selftest/cases/imagefeatures.py +2 -0
@@ -230,6 +230,7 @@ class ImageFeatures(OESelftestTestCase): self.assertTrue(os.path.exists(image_path), "%s image %s doesn't exist" % (itype, image_path)) + @OETestID(1955) def test_useradd_static(self): config = """ USERADDEXTENSION = "useradd-staticids"
@@ -240,6 +241,7 @@ USERADD_GID_TABLES += "files/static-group" self.write_config(config) bitbake("core-image-base") + @OETestID(1956) def test_image_gen_debugfs(self): """ Summary: Check debugfs generation
Signature · 1 line
2.7.5
Quoted 19 lines · Jair Gonzalez
meta/lib/oeqa/selftest/cases/imagefeatures.py +4
-0+ def test_image_gen_debugfs(self): + """ + Summary: Check debugfs generation + Expected: 1. core-image-minimal can be build with
IMAGE_GEN_DEBUGFSvariable setmeta/lib/oeqa/selftest/cases/imagefeatures.py +14
-0+ 2. debug filesystem is created when variable set + Product: oe-core + Author: Humberto Ibarra <[email protected]> + """ + + image_name = 'core-image-minimal' + deploy_dir_image = get_bb_var('DEPLOY_DIR_IMAGE') + + features = 'IMAGE_GEN_DEBUGFS = "1"\n' + features += 'IMAGE_FSTYPES_DEBUGFS = "tar.bz2"' + self.write_config(features) + + bitbake(image_name) + debug_files = glob.glob(os.path.join(deploy_
Quoted 3 lines
dir_image,"*-dbg.rootfs.tar.bz2"))
+ self.assertNotEqual(len(debug_files), 0, 'debug filesystem not
generated')
Checking the file exists doesn't really exercise the codepaths, it should at least verify the tarball contains the debug symbols for some packages that are in that image.
Ross