summaryrefslogtreecommitdiff
path: root/meta
diff options
context:
space:
mode:
authorStefan Stanacar <stefanx.stanacar@intel.com>2014-02-09 12:39:31 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-02-11 11:56:26 +0000
commit85c8dd4170a88a5d7f3d9ca181e75720302727c5 (patch)
treeb8094a2e0c3ce7e5902a3ba85f977bff79812644 /meta
parent97e263b99cbe8184a74f80738fd471cfdef29e0c (diff)
downloadopenembedded-core-85c8dd4170a88a5d7f3d9ca181e75720302727c5.tar.gz
openembedded-core-85c8dd4170a88a5d7f3d9ca181e75720302727c5.tar.bz2
openembedded-core-85c8dd4170a88a5d7f3d9ca181e75720302727c5.zip
testimage: fail if no package manifest is found
Sometimes we may forget to actually build the image we want to test (when testimage task is called manually). Instead of an ugly traceback we should fail nicely. The manifest is written after the rootfs so this ensures the image was actually built. Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/classes/testimage.bbclass7
1 files changed, 5 insertions, 2 deletions
diff --git a/meta/classes/testimage.bbclass b/meta/classes/testimage.bbclass
index 75ab716270..48e1032326 100644
--- a/meta/classes/testimage.bbclass
+++ b/meta/classes/testimage.bbclass
@@ -185,8 +185,11 @@ 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")
- with open(manifest) as f:
- self.pkgmanifest = f.read()
+ 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)
# test context
tc = TestContext()