summaryrefslogtreecommitdiffstats
path: root/meta/classes/testimage.bbclass
diff options
context:
space:
mode:
authorRandy Witt <randy.e.witt@linux.intel.com>2015-09-16 14:45:49 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-09-23 09:52:53 +0100
commita66f5867295713ab8132c34c3ad6675dd37c028c (patch)
tree9cb264172f9c2767d5b8bc9face61b48dfbf9353 /meta/classes/testimage.bbclass
parent39c11d8296417299c2a70606f5db73e7776d17c6 (diff)
downloadpoky-a66f5867295713ab8132c34c3ad6675dd37c028c.tar.gz
testimage.bbclass: Don't require an image manifest
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. (From OE-Core rev: 78f5c3cb3971c31a950deb5cab8992f3ba577440) Signed-off-by: Randy Witt <randy.e.witt@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/testimage.bbclass')
-rw-r--r--meta/classes/testimage.bbclass16
1 files changed, 11 insertions, 5 deletions
diff --git a/meta/classes/testimage.bbclass b/meta/classes/testimage.bbclass
index a1918ba9ec..70e28004fe 100644
--- a/meta/classes/testimage.bbclass
+++ b/meta/classes/testimage.bbclass
@@ -279,14 +279,20 @@ def testimage_main(d):
279 self.imagefeatures = d.getVar("IMAGE_FEATURES", True).split() 279 self.imagefeatures = d.getVar("IMAGE_FEATURES", True).split()
280 self.distrofeatures = d.getVar("DISTRO_FEATURES", True).split() 280 self.distrofeatures = d.getVar("DISTRO_FEATURES", True).split()
281 manifest = os.path.join(d.getVar("DEPLOY_DIR_IMAGE", True), d.getVar("IMAGE_LINK_NAME", True) + ".manifest") 281 manifest = os.path.join(d.getVar("DEPLOY_DIR_IMAGE", True), d.getVar("IMAGE_LINK_NAME", True) + ".manifest")
282 nomanifest = d.getVar("IMAGE_NO_MANIFEST", True)
283
282 self.sigterm = False 284 self.sigterm = False
283 self.origsigtermhandler = signal.getsignal(signal.SIGTERM) 285 self.origsigtermhandler = signal.getsignal(signal.SIGTERM)
284 signal.signal(signal.SIGTERM, self.sigterm_exception) 286 signal.signal(signal.SIGTERM, self.sigterm_exception)
285 try: 287
286 with open(manifest) as f: 288 if nomanifest is None or nomanifest != "1":
287 self.pkgmanifest = f.read() 289 try:
288 except IOError as e: 290 with open(manifest) as f:
289 bb.fatal("No package manifest file found. Did you build the image?\n%s" % e) 291 self.pkgmanifest = f.read()
292 except IOError as e:
293 bb.fatal("No package manifest file found. Did you build the image?\n%s" % e)
294 else:
295 self.pkgmanifest = ""
290 296
291 def sigterm_exception(self, signum, stackframe): 297 def sigterm_exception(self, signum, stackframe):
292 bb.warn("TestImage received SIGTERM, shutting down...") 298 bb.warn("TestImage received SIGTERM, shutting down...")