[oe-commits] [openembedded-core] 04/05: testimage.bbclass: add additional dependency

git at git.openembedded.org git at git.openembedded.org
Fri Apr 21 07:22:47 UTC 2017


This is an automated email from the git hooks/post-receive script.

rpurdie pushed a commit to branch master
in repository openembedded-core.

commit 6e019537b9eb3af482e474a8cb248fe7312f4b58
Author: brian avery <avery.brian at gmail.com>
AuthorDate: Thu Apr 20 10:38:18 2017 -0700

    testimage.bbclass: add additional dependency
    
    qemu-native-helper has an additional task that needs to be run in order
    for testimage to work. This task is usually run by default in a full
    build but there are use cases where it might be skipped. This commit
    adds the dependency explicitly.
    
    Also, this commit adds a try/catch error message to make it clearer what
    you need to do if you try to run testimage before you have built or
    downloaded the image artifacts.
    
    [YOCTO #11375]
    
    Signed-off-by: brian avery <brian.avery at intel.com>
    Signed-off-by: Ross Burton <ross.burton at intel.com>
---
 meta/classes/testimage.bbclass | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/meta/classes/testimage.bbclass b/meta/classes/testimage.bbclass
index a259423..fb21460 100644
--- a/meta/classes/testimage.bbclass
+++ b/meta/classes/testimage.bbclass
@@ -71,7 +71,7 @@ TEST_QEMUBOOT_TIMEOUT ?= "1000"
 TEST_TARGET ?= "qemu"
 
 TESTIMAGEDEPENDS = ""
-TESTIMAGEDEPENDS_qemuall = "qemu-native:do_populate_sysroot qemu-helper-native:do_populate_sysroot"
+TESTIMAGEDEPENDS_qemuall = "qemu-native:do_populate_sysroot qemu-helper-native:do_populate_sysroot qemu-helper-native:do_addto_recipe_sysroot"
 TESTIMAGEDEPENDS += "${@bb.utils.contains('IMAGE_PKGTYPE', 'rpm', 'cpio-native:do_populate_sysroot', '', d)}"
 TESTIMAGEDEPENDS_qemuall += "${@bb.utils.contains('IMAGE_PKGTYPE', 'rpm', 'cpio-native:do_populate_sysroot', '', d)}"
 TESTIMAGEDEPENDS_qemuall += "${@bb.utils.contains('IMAGE_PKGTYPE', 'rpm', 'createrepo-c-native:do_populate_sysroot', '', d)}"
@@ -166,7 +166,11 @@ def testimage_main(d):
                              d.getVar('IMAGE_LINK_NAME')))
 
     tdname = "%s.testdata.json" % image_name
-    td = json.load(open(tdname, "r"))
+    try:
+        td = json.load(open(tdname, "r"))
+    except (FileNotFoundError) as err:
+         bb.fatal('File %s Not Found. Have you built the image with INHERIT+="testimage" in the conf/local.conf?' % tdname)
+
     # Some variables need to be updates (mostly paths) with the
     # ones of the current environment because some tests require them.
     updateTestData(d, td, d.getVar('TESTIMAGE_UPDATE_VARS').split())

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list