diff options
-rw-r--r-- | meta/classes/testimage.bbclass | 16 |
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...") |