aboutsummaryrefslogtreecommitdiffstats
path: root/meta/classes/image.bbclass
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2013-09-19 11:10:34 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-09-20 12:14:32 +0100
commit72269a8fbec35c39af30fbabb1fa9ca7c5ee8d69 (patch)
tree81eab280f1d9e3191d9a19b9a70f4867a00c1e41 /meta/classes/image.bbclass
parent5d46c3df578f44597d8ce70add423e0c15982705 (diff)
downloadopenembedded-core-contrib-72269a8fbec35c39af30fbabb1fa9ca7c5ee8d69.tar.gz
classes/testimage-auto: add class to allow automatically running image tests
Setting TEST_IMAGE = "1" alone will now automatically run tests on the image immediately after the image is built instead of having to add INHERIT += "testimage" and run bitbake -c testimage <image> manually (but that will still work). This restores functionality that was present in the older imagetest-qemu class with IMAGETEST. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Diffstat (limited to 'meta/classes/image.bbclass')
-rw-r--r--meta/classes/image.bbclass3
1 files changed, 3 insertions, 0 deletions
diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
index 889547a441..246a4db7fc 100644
--- a/meta/classes/image.bbclass
+++ b/meta/classes/image.bbclass
@@ -16,6 +16,9 @@ RRECOMMENDS += "${PACKAGE_INSTALL_ATTEMPTONLY}"
INHIBIT_DEFAULT_DEPS = "1"
+TESTIMAGECLASS = "${@base_conditional('TEST_IMAGE', '1', 'testimage-auto', '', d)}"
+inherit ${TESTIMAGECLASS}
+
# IMAGE_FEATURES may contain any available package group
IMAGE_FEATURES ?= ""
IMAGE_FEATURES[type] = "list"