summaryrefslogtreecommitdiffstats
path: root/meta/classes
diff options
context:
space:
mode:
authorRichard Purdie <rpurdie@linux.intel.com>2010-11-28 14:45:31 +0000
committerRichard Purdie <rpurdie@linux.intel.com>2010-12-07 12:31:09 +0000
commit55859b9c3d6fb806427ccbcfb6cda095ef557f29 (patch)
treed706d602f094dd97becb844327fdeca58ec903a7 /meta/classes
parent7aacc310b58f4347e3763ff04efdbc77f76c7d85 (diff)
downloadpoky-55859b9c3d6fb806427ccbcfb6cda095ef557f29.tar.gz
imagetest-qemu: Allow the task to run after any rootfs is created and also standalone
One bitbake invocation can cause multiple images to be generated. We should test each one and we cna do this by running after the rootfs task. Running the tests standlone is also still possible with a new separate standlone task. Acked-by: Scott Garman <scott.a.garman@intel.com> Acked-by: Jiajun Xu <jiajun.xu@intel.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'meta/classes')
-rw-r--r--meta/classes/imagetest-qemu.bbclass21
1 files changed, 15 insertions, 6 deletions
diff --git a/meta/classes/imagetest-qemu.bbclass b/meta/classes/imagetest-qemu.bbclass
index 07bdf01340..4b3ddfc362 100644
--- a/meta/classes/imagetest-qemu.bbclass
+++ b/meta/classes/imagetest-qemu.bbclass
@@ -1,8 +1,3 @@
1addtask qemuimagetest before do_build
2# after do_rootfs
3do_qemuimagetest[nostamp] = "1"
4do_qemuimagetest[depends] += "qemu-native:do_populate_sysroot"
5
6# Test related variables 1# Test related variables
7# By default, TEST_DIR is created under WORKDIR 2# By default, TEST_DIR is created under WORKDIR
8TEST_DIR ?= "${WORKDIR}/qemuimagetest" 3TEST_DIR ?= "${WORKDIR}/qemuimagetest"
@@ -12,6 +7,20 @@ TEST_TMP ?= "${TEST_DIR}/tmp"
12TEST_SCEN ?= "sanity" 7TEST_SCEN ?= "sanity"
13 8
14python do_qemuimagetest() { 9python do_qemuimagetest() {
10 qemuimagetest_main(d)
11}
12addtask qemuimagetest before do_build after do_rootfs
13do_qemuimagetest[nostamp] = "1"
14do_qemuimagetest[depends] += "qemu-native:do_populate_sysroot"
15
16python do_qemuimagetest_standalone() {
17 qemuimagetest_main(d)
18}
19addtask qemuimagetest_standalone
20do_qemuimagetest_standalone[nostamp] = "1"
21do_qemuimagetest_standalone[depends] += "qemu-native:do_populate_sysroot"
22
23def qemuimagetest_main(d):
15 import sys 24 import sys
16 import re 25 import re
17 import os 26 import os
@@ -142,4 +151,4 @@ python do_qemuimagetest() {
142 151
143 if ret != 0: 152 if ret != 0:
144 raise bb.build.FuncFailed("Some testcases fail, pls. check test result and test log!!!") 153 raise bb.build.FuncFailed("Some testcases fail, pls. check test result and test log!!!")
145} 154