[oe-commits] Corneliu Stoicescu : scripts/test-remote-image: add value check for rootfs fstype, change method name used.

git at git.openembedded.org git at git.openembedded.org
Tue Jun 24 18:54:33 UTC 2014


Module: openembedded-core.git
Branch: master
Commit: 6d8366bd6145bf3ad484ed9fe4b1ddb4c499f72b
URL:    http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=6d8366bd6145bf3ad484ed9fe4b1ddb4c499f72b

Author: Corneliu Stoicescu <corneliux.stoicescu at intel.com>
Date:   Mon Jun 23 15:59:45 2014 +0300

scripts/test-remote-image: add value check for rootfs fstype, change method name used.

As per change in the oeqa/targetcontrol.py's BaseTarget class, changing the use of get_image_fstype() to match_image_fstype().

Also because there is no longer a value check done by the target controller's match_image_fstype() method, we have to do one here.

+ one helper comment for the get_controller() method.

Signed-off-by: Corneliu Stoicescu <corneliux.stoicescu at intel.com>
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>

---

 scripts/test-remote-image | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/scripts/test-remote-image b/scripts/test-remote-image
index 6da6672..7d02a84 100755
--- a/scripts/test-remote-image
+++ b/scripts/test-remote-image
@@ -136,7 +136,7 @@ class AutoTargetProfile(BaseTargetProfile):
         self.set_manifest_file()
         self.set_extra_download_files()
 
-
+    # Get the controller object that will be used by bitbake.
     def get_controller(self):
         from oeqa.controllers.testtargetloader import TestTargetLoader
 
@@ -158,8 +158,13 @@ class AutoTargetProfile(BaseTargetProfile):
 
     def set_rootfs_file(self):
         image_fstypes = get_bb_var('IMAGE_FSTYPES').split(' ')
-        fstype = self.controller.get_image_fstype(d=None, image_fstypes=image_fstypes)
-        self.rootfs_file = self.image_name + '.' + fstype
+        # Get a matching value between target's IMAGE_FSTYPES and the image fstypes suppoerted by the target controller.
+        fstype = self.controller.match_image_fstype(d=None, image_fstypes=image_fstypes)
+        if fstype:
+            self.rootfs_file = self.image_name + '.' + fstype
+        else:
+            log.error("Could not get a compatible image fstype. Check that IMAGE_FSTYPES and the target controller's supported_image_fstypes fileds have common values.")
+            sys.exit(1)
 
     def set_manifest_file(self):
         self.manifest_file = self.image_name + ".manifest"



More information about the Openembedded-commits mailing list