]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
beaglebonetarget.py: Add support for get_extra_files() classmethod
authorCorneliu Stoicescu <corneliux.stoicescu@intel.com>
Fri, 6 Jun 2014 18:24:41 +0000 (21:24 +0300)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 17 Jun 2014 10:44:48 +0000 (11:44 +0100)
[YOCTO #6254]

Adding support for the get_extra_files() method to the BeagleBoneTarget class.

Signed-off-by: Corneliu Stoicescu <corneliux.stoicescu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta-yocto-bsp/lib/oeqa/controllers/beaglebonetarget.py

index 0d148d7b4f26d97f2071698f7faf35d7950c14fc..86b638c8967c3643315ed496f31bf0aa9342312d 100644 (file)
@@ -30,12 +30,15 @@ from oeqa.controllers.masterimage import MasterImageHardwareTarget
 
 class BeagleBoneTarget(MasterImageHardwareTarget):
 
+    dtbs = {'uImage-am335x-bone.dtb': 'am335x-bone.dtb', 'uImage-am335x-boneblack.dtb': 'am335x-boneblack.dtb'}
+
+    @classmethod
+    def get_extra_files(self):
+        return list(self.dtbs.keys())
+
     def __init__(self, d):
         super(BeagleBoneTarget, self).__init__(d)
 
-        self.dtbs = [('uImage-am335x-bone.dtb', 'am335x-bone.dtb'),
-                     ('uImage-am335x-boneblack.dtb', 'am335x-boneblack.dtb')]
-
         self.deploy_cmds = [
                 'mkdir -p /mnt/testrootfs',
                 'mount -L testrootfs /mnt/testrootfs',
@@ -44,7 +47,7 @@ class BeagleBoneTarget(MasterImageHardwareTarget):
                 '[ -e /mnt/testrootfs/boot/uImage ] || cp ~/test-kernel /mnt/testrootfs/boot/uImage',
                 ]
 
-        for _, dtbfn in self.dtbs:
+        for _, dtbfn in self.dtbs.iteritems():
             # Kernel and dtb files may not be in the image, so copy them if not
             self.deploy_cmds.append('[ -e /mnt/testrootfs/boot/{0} ] || cp ~/{0} /mnt/testrootfs/boot/'.format(dtbfn))
 
@@ -58,7 +61,7 @@ class BeagleBoneTarget(MasterImageHardwareTarget):
         # Kernel and dtb files may not be in the image, so copy them just in case
         self.master.copy_to(self.kernel, "~/test-kernel")
         kernelpath = os.path.dirname(self.kernel)
-        for dtborig, dtbfn in self.dtbs:
+        for dtborig, dtbfn in self.dtbs.iteritems():
             dtbfile = os.path.join(kernelpath, dtborig)
             if os.path.exists(dtbfile):
                 self.master.copy_to(dtbfile, "~/%s" % dtbfn)