summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBjörn Stenberg <bjst@enea.com>2013-04-10 15:34:56 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-04-11 12:20:35 +0100
commit44120a053c0cf2c7134bb1ee29854dddf28e4cf8 (patch)
treeb0bbc3bacb153087cfe61a75ecdae31d4bfbc2d5
parentb96ad97486230e406351bc8dc47a854f92570ac8 (diff)
downloadpoky-44120a053c0cf2c7134bb1ee29854dddf28e4cf8.tar.gz
ptest bug fixes
Move ${PN}-ptest to start of PACKAGES to ensure all ptest files are packaged in the -ptest package. Add QA exclusions to insane.bbclass to ensure -ptest packages can contain any files they need. Disable ptest for native packages. Don't emit errors on missing _ptest functions. (From OE-Core rev: 01bea4ef932e46eb2fcc8b4be7ff5e2b5b2a0978) Signed-off-by: Björn Stenberg <bjst@enea.com> Signed-off-by: Anders Roxell <anders.roxell@enea.com> Signed-off-by: Josep Puigdemont <josep.puigdemont@enea.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/classes/insane.bbclass6
-rw-r--r--meta/classes/native.bbclass3
-rw-r--r--meta/classes/ptest.bbclass17
3 files changed, 11 insertions, 15 deletions
diff --git a/meta/classes/insane.bbclass b/meta/classes/insane.bbclass
index 75db7a2d8a..336beaa061 100644
--- a/meta/classes/insane.bbclass
+++ b/meta/classes/insane.bbclass
@@ -216,7 +216,7 @@ def package_qa_check_dev(path, name, d, elf, messages):
216 Check for ".so" library symlinks in non-dev packages 216 Check for ".so" library symlinks in non-dev packages
217 """ 217 """
218 218
219 if not name.endswith("-dev") and not name.endswith("-dbg") and not name.startswith("nativesdk-") and path.endswith(".so") and os.path.islink(path): 219 if not name.endswith("-dev") and not name.endswith("-dbg") and not name.endswith("-ptest") and not name.startswith("nativesdk-") and path.endswith(".so") and os.path.islink(path):
220 messages.append("non -dev/-dbg/-nativesdk package contains symlink .so: %s path '%s'" % \ 220 messages.append("non -dev/-dbg/-nativesdk package contains symlink .so: %s path '%s'" % \
221 (name, package_qa_clean_path(path,d))) 221 (name, package_qa_clean_path(path,d)))
222 222
@@ -229,7 +229,7 @@ def package_qa_check_staticdev(path, name, d, elf, messages):
229 libgcc.a, libgcov.a will be skipped in their packages 229 libgcc.a, libgcov.a will be skipped in their packages
230 """ 230 """
231 231
232 if not name.endswith("-pic") and not name.endswith("-staticdev") and path.endswith(".a") and not path.endswith("_nonshared.a"): 232 if not name.endswith("-pic") and not name.endswith("-staticdev") and not name.endswith("-ptest") and path.endswith(".a") and not path.endswith("_nonshared.a"):
233 messages.append("non -staticdev package contains static .a library: %s path '%s'" % \ 233 messages.append("non -staticdev package contains static .a library: %s path '%s'" % \
234 (name, package_qa_clean_path(path,d))) 234 (name, package_qa_clean_path(path,d)))
235 235
@@ -273,7 +273,7 @@ def package_qa_check_dbg(path, name, d, elf, messages):
273 Check for ".debug" files or directories outside of the dbg package 273 Check for ".debug" files or directories outside of the dbg package
274 """ 274 """
275 275
276 if not "-dbg" in name: 276 if not "-dbg" in name and not "-ptest" in name:
277 if '.debug' in path.split(os.path.sep): 277 if '.debug' in path.split(os.path.sep):
278 messages.append("non debug package contains .debug directory: %s path %s" % \ 278 messages.append("non debug package contains .debug directory: %s path %s" % \
279 (name, package_qa_clean_path(path,d))) 279 (name, package_qa_clean_path(path,d)))
diff --git a/meta/classes/native.bbclass b/meta/classes/native.bbclass
index bfc9e4c7db..cd930f0702 100644
--- a/meta/classes/native.bbclass
+++ b/meta/classes/native.bbclass
@@ -50,6 +50,9 @@ TOOLCHAIN_OPTIONS = ""
50 50
51DEPENDS_GETTEXT = "gettext-native" 51DEPENDS_GETTEXT = "gettext-native"
52 52
53# Don't build ptest natively
54PTEST_ENABLED = "0"
55
53# Don't use site files for native builds 56# Don't use site files for native builds
54export CONFIG_SITE = "" 57export CONFIG_SITE = ""
55 58
diff --git a/meta/classes/ptest.bbclass b/meta/classes/ptest.bbclass
index 6ab5ee411f..37357e8215 100644
--- a/meta/classes/ptest.bbclass
+++ b/meta/classes/ptest.bbclass
@@ -7,25 +7,18 @@ DESCRIPTION_${PN}-ptest ?= "${DESCRIPTION} \
7This package contains a test directory ${PTEST_PATH} for package test purposes." 7This package contains a test directory ${PTEST_PATH} for package test purposes."
8 8
9PTEST_PATH ?= "${libdir}/${PN}/ptest" 9PTEST_PATH ?= "${libdir}/${PN}/ptest"
10FILES_${PN}-ptest = "${PTEST_PATH}/*" 10FILES_${PN}-ptest = "${PTEST_PATH}"
11SECTION_${PN}-ptest = "devel" 11SECTION_${PN}-ptest = "devel"
12ALLOW_EMPTY_${PN}-ptest = "1" 12ALLOW_EMPTY_${PN}-ptest = "1"
13PTEST_ENABLED = "${@base_contains("DISTRO_FEATURES", "ptest", "1", "0", d)}" 13PTEST_ENABLED = "${@base_contains("DISTRO_FEATURES", "ptest", "1", "0", d)}"
14RDEPENDS_${PN}-ptest_virtclass-native = "" 14RDEPENDS_${PN}-ptest_virtclass-native = ""
15RDEPENDS_${PN}-ptest_virtclass-nativesdk = "" 15RDEPENDS_${PN}-ptest_virtclass-nativesdk = ""
16 16
17PACKAGES += "${@base_contains('DISTRO_FEATURES', 'ptest', '${PN}-ptest', '', d)}" 17PACKAGES =+ "${@base_contains('DISTRO_FEATURES', 'ptest', '${PN}-ptest', '', d)}"
18
19FILES_${PN}-dbg += "${PTEST_PATH}/.debug \
20 ${PTEST_PATH}/*/.debug \
21 ${PTEST_PATH}/*/*/.debug \
22 ${PTEST_PATH}/*/*/*/.debug \
23 ${PTEST_PATH}/*/*/*/*/.debug \
24 "
25 18
26do_configure_ptest_base() { 19do_configure_ptest_base() {
27 if [ ${PTEST_ENABLED} = 1 ]; then 20 if [ ${PTEST_ENABLED} = 1 ]; then
28 if [ type -t do_configure_ptest = function ]; then 21 if [ a$(type -t do_configure_ptest) = afunction ]; then
29 do_configure_ptest 22 do_configure_ptest
30 fi 23 fi
31 fi 24 fi
@@ -33,7 +26,7 @@ do_configure_ptest_base() {
33 26
34do_compile_ptest_base() { 27do_compile_ptest_base() {
35 if [ ${PTEST_ENABLED} = 1 ]; then 28 if [ ${PTEST_ENABLED} = 1 ]; then
36 if [ type -t do_compile_ptest = function ]; then 29 if [ a$(type -t do_compile_ptest) = afunction ]; then
37 do_compile_ptest 30 do_compile_ptest
38 fi 31 fi
39 fi 32 fi
@@ -46,7 +39,7 @@ do_install_ptest_base() {
46 if grep -q install-ptest: Makefile; then 39 if grep -q install-ptest: Makefile; then
47 oe_runmake DESTDIR=${D}${PTEST_PATH} install-ptest 40 oe_runmake DESTDIR=${D}${PTEST_PATH} install-ptest
48 fi 41 fi
49 if [ type -t do_install_ptest = function ]; then 42 if [ a$(type -t do_install_ptest) = afunction ]; then
50 do_install_ptest 43 do_install_ptest
51 fi 44 fi
52 fi 45 fi