summaryrefslogtreecommitdiffstats
path: root/meta/classes/ptest.bbclass
diff options
context:
space:
mode:
authorNathan Rossi <nathan.rossi@xilinx.com>2014-01-10 18:01:33 +1000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-01-14 11:33:51 +0000
commitad6f3ea1b4e2d05a9308e957bc7431fa8f96a342 (patch)
tree31a4c1d6717e28391633c84c53594a0223eddcde /meta/classes/ptest.bbclass
parentf543a8e77f19070243c55166e161bc360eb40495 (diff)
downloadpoky-ad6f3ea1b4e2d05a9308e957bc7431fa8f96a342.tar.gz
ptest.bblass: Fix package QA issues when disabled
When the ptest distro feature is disabled, a ptest directory is still created in the install phase, This directory is not cleaned up or consumed by any package and will throw a QA error, e.g. ERROR: QA Issue: glib-2.0: Files/directories were installed but not shipped /usr/lib/glib-2.0/ptest ERROR: QA run found fatal errors. Please consider fixing them. ERROR: Function failed: do_package_qa This is caused by the do_install_ptest_base[cleandirs] attribute which is not setup to be conditional on ptest being enabled. This patch refactors the use of PTEST_ENABLED in the *ptest_base tasks, replacing the conditional execution with the removal of the tasks from the build, this prevents any part (including cleandirs) of the ptest tasks from executing when disabled. (From OE-Core rev: def21f3f0bedae51651f1f0fc58b62b8aaaf37ae) Signed-off-by: Nathan Rossi <nathan.rossi@xilinx.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/ptest.bbclass')
-rw-r--r--meta/classes/ptest.bbclass25
1 files changed, 12 insertions, 13 deletions
diff --git a/meta/classes/ptest.bbclass b/meta/classes/ptest.bbclass
index ec10f80e68..e5bbb89ade 100644
--- a/meta/classes/ptest.bbclass
+++ b/meta/classes/ptest.bbclass
@@ -18,9 +18,7 @@ do_configure_ptest() {
18} 18}
19 19
20do_configure_ptest_base() { 20do_configure_ptest_base() {
21 if [ ${PTEST_ENABLED} = 1 ]; then 21 do_configure_ptest
22 do_configure_ptest
23 fi
24} 22}
25 23
26do_compile_ptest() { 24do_compile_ptest() {
@@ -28,9 +26,7 @@ do_compile_ptest() {
28} 26}
29 27
30do_compile_ptest_base() { 28do_compile_ptest_base() {
31 if [ ${PTEST_ENABLED} = 1 ]; then 29 do_compile_ptest
32 do_compile_ptest
33 fi
34} 30}
35 31
36do_install_ptest() { 32do_install_ptest() {
@@ -38,14 +34,12 @@ do_install_ptest() {
38} 34}
39 35
40do_install_ptest_base() { 36do_install_ptest_base() {
41 if [ ${PTEST_ENABLED} = 1 ]; then 37 if [ -f ${WORKDIR}/run-ptest ]; then
42 if [ -f ${WORKDIR}/run-ptest ]; then 38 install -D ${WORKDIR}/run-ptest ${D}${PTEST_PATH}/run-ptest
43 install -D ${WORKDIR}/run-ptest ${D}${PTEST_PATH}/run-ptest 39 if grep -q install-ptest: Makefile; then
44 if grep -q install-ptest: Makefile; then 40 oe_runmake DESTDIR=${D}${PTEST_PATH} install-ptest
45 oe_runmake DESTDIR=${D}${PTEST_PATH} install-ptest
46 fi
47 do_install_ptest
48 fi 41 fi
42 do_install_ptest
49 fi 43 fi
50} 44}
51 45
@@ -58,4 +52,9 @@ addtask install_ptest_base after do_install before do_package do_populate_sy
58python () { 52python () {
59 if not bb.data.inherits_class('native', d) and not bb.data.inherits_class('cross', d): 53 if not bb.data.inherits_class('native', d) and not bb.data.inherits_class('cross', d):
60 d.setVarFlag('do_install_ptest_base', 'fakeroot', 1) 54 d.setVarFlag('do_install_ptest_base', 'fakeroot', 1)
55
56 # Remove all '*ptest_base' tasks when ptest is not enabled
57 if not(d.getVar('PTEST_ENABLED', True) == "1"):
58 for i in filter(lambda k: d.getVarFlag(k, "task") and k.endswith("ptest_base"), d.keys()):
59 bb.build.deltask(i, d)
61} 60}