* [PATCH 0/1] testimage: Add missing dependency
@ 2017-04-20 17:38 brian avery
2017-04-20 17:38 ` [PATCH 1/1] testimage.bbclass: add additional dependency brian avery
0 siblings, 1 reply; 2+ messages in thread
From: brian avery @ 2017-04-20 17:38 UTC (permalink / raw)
To: openembedded-core
As part of RSS, qemu-native-helper got an additional task: "addto_recipe_sysroot".
This task is usually run as part of an image build. In some use cases like downloading
image artefacts and then running testimage, it can be skipped. This adds the dependency explicitly.
I also added an error message that catches running testimage before creating or downloading the
images.
-brian
The following changes since commit 55a53f53263ff4bf7bd6d0c454c464e595e11e4c:
build-appliance-image: Update to master head revision (2017-04-20 08:16:46 +0100)
are available in the git repository at:
git://git.yoctoproject.org/poky-contrib bavery/testimage/11375_2
http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=bavery/testimage/11375_2
brian avery (1):
testimage.bbclass: add additional dependency
meta/classes/testimage.bbclass | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
--
1.9.1
^ permalink raw reply [flat|nested] 2+ messages in thread
* [PATCH 1/1] testimage.bbclass: add additional dependency
2017-04-20 17:38 [PATCH 0/1] testimage: Add missing dependency brian avery
@ 2017-04-20 17:38 ` brian avery
0 siblings, 0 replies; 2+ messages in thread
From: brian avery @ 2017-04-20 17:38 UTC (permalink / raw)
To: openembedded-core
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@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())
--
1.9.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-04-20 17:38 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-04-20 17:38 [PATCH 0/1] testimage: Add missing dependency brian avery
2017-04-20 17:38 ` [PATCH 1/1] testimage.bbclass: add additional dependency brian avery
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.