[OE-core] [PATCH 1/1] imagefeatures.py: Added testcase to track IMAGE_GEN_DEBUGFS

Ibarra Lopez, Humberto humberto.ibarra.lopez at intel.com
Fri Jun 16 17:37:47 UTC 2017


Thought about testing debug packages because the bug comments mentioned iterating through rpm, deb and ipk. If there is no value to this part I could drop it and only test for the debug filesystem. In this cases there any value to check the debug filesystem in all three package classes?

Humberto

From: Burton, Ross [mailto:ross.burton at intel.com]
Sent: Friday, June 16, 2017 12:07 PM
To: Ibarra Lopez, Humberto <humberto.ibarra.lopez at intel.com>
Cc: OE-core <openembedded-core at lists.openembedded.org>
Subject: Re: [OE-core] [PATCH 1/1] imagefeatures.py: Added testcase to track IMAGE_GEN_DEBUGFS


On 16 June 2017 at 18:01, Humberto Ibarra <humberto.ibarra.lopez at intel.com<mailto:humberto.ibarra.lopez at intel.com>> wrote:
+        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)

Each call to get_bb_var() is a call to bitbake, so it's best to batch up these as much as possible into a single get_bb_vars() call.

Also is there any point to checking that dbg packages were created?

Ross
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openembedded.org/pipermail/openembedded-core/attachments/20170616/8dfbff6f/attachment-0002.html>


More information about the Openembedded-core mailing list