]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
testimage.bbclass: Don't require an image manifest
authorRandy Witt <randy.e.witt@linux.intel.com>
Wed, 16 Sep 2015 21:45:49 +0000 (14:45 -0700)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 21 Sep 2015 14:20:06 +0000 (15:20 +0100)
Sometimes an "image" may not actually have a manifest file such as when
using a "baremetal kernel". This change allows for  a user to set a
IMAGE_NO_MANIFEST flag to 1 in order to inform the code that there is no
corresponding manifest that should exist for an image.

Signed-off-by: Randy Witt <randy.e.witt@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
meta/classes/testimage.bbclass

index a1918ba9ecd742b74f5d48a65a89e1daf2034be0..70e28004fe4cdd7348a4a4c8a628fc2f37fb6760 100644 (file)
@@ -279,14 +279,20 @@ def testimage_main(d):
             self.imagefeatures = d.getVar("IMAGE_FEATURES", True).split()
             self.distrofeatures = d.getVar("DISTRO_FEATURES", True).split()
             manifest = os.path.join(d.getVar("DEPLOY_DIR_IMAGE", True), d.getVar("IMAGE_LINK_NAME", True) + ".manifest")
+            nomanifest = d.getVar("IMAGE_NO_MANIFEST", True)
+
             self.sigterm = False
             self.origsigtermhandler = signal.getsignal(signal.SIGTERM)
             signal.signal(signal.SIGTERM, self.sigterm_exception)
-            try:
-                with open(manifest) as f:
-                    self.pkgmanifest = f.read()
-            except IOError as e:
-                bb.fatal("No package manifest file found. Did you build the image?\n%s" % e)
+
+            if nomanifest is None or nomanifest != "1":
+                try:
+                    with open(manifest) as f:
+                        self.pkgmanifest = f.read()
+                except IOError as e:
+                    bb.fatal("No package manifest file found. Did you build the image?\n%s" % e)
+            else:
+                self.pkgmanifest = ""
 
         def sigterm_exception(self, signum, stackframe):
             bb.warn("TestImage received SIGTERM, shutting down...")