diff options
author | Björn Stenberg <bjst@enea.com> | 2013-04-10 15:34:56 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-04-11 12:01:41 +0100 |
commit | 01bea4ef932e46eb2fcc8b4be7ff5e2b5b2a0978 (patch) | |
tree | 8f17078960e005eca6e64010b0bbdb5d4be11c55 | |
parent | 5f6d33b05b4e7883f2728ca812cb5386d1e36989 (diff) | |
download | openembedded-core-01bea4ef932e46eb2fcc8b4be7ff5e2b5b2a0978.tar.gz openembedded-core-01bea4ef932e46eb2fcc8b4be7ff5e2b5b2a0978.tar.bz2 openembedded-core-01bea4ef932e46eb2fcc8b4be7ff5e2b5b2a0978.zip |
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.
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.bbclass | 6 | ||||
-rw-r--r-- | meta/classes/native.bbclass | 3 | ||||
-rw-r--r-- | meta/classes/ptest.bbclass | 17 |
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): Check for ".so" library symlinks in non-dev packages """ - if not name.endswith("-dev") and not name.endswith("-dbg") and not name.startswith("nativesdk-") and path.endswith(".so") and os.path.islink(path): + 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): messages.append("non -dev/-dbg/-nativesdk package contains symlink .so: %s path '%s'" % \ (name, package_qa_clean_path(path,d))) @@ -229,7 +229,7 @@ def package_qa_check_staticdev(path, name, d, elf, messages): libgcc.a, libgcov.a will be skipped in their packages """ - if not name.endswith("-pic") and not name.endswith("-staticdev") and path.endswith(".a") and not path.endswith("_nonshared.a"): + 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"): messages.append("non -staticdev package contains static .a library: %s path '%s'" % \ (name, package_qa_clean_path(path,d))) @@ -273,7 +273,7 @@ def package_qa_check_dbg(path, name, d, elf, messages): Check for ".debug" files or directories outside of the dbg package """ - if not "-dbg" in name: + if not "-dbg" in name and not "-ptest" in name: if '.debug' in path.split(os.path.sep): messages.append("non debug package contains .debug directory: %s path %s" % \ (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 = "" DEPENDS_GETTEXT = "gettext-native" +# Don't build ptest natively +PTEST_ENABLED = "0" + # Don't use site files for native builds export CONFIG_SITE = "" 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} \ This package contains a test directory ${PTEST_PATH} for package test purposes." PTEST_PATH ?= "${libdir}/${PN}/ptest" -FILES_${PN}-ptest = "${PTEST_PATH}/*" +FILES_${PN}-ptest = "${PTEST_PATH}" SECTION_${PN}-ptest = "devel" ALLOW_EMPTY_${PN}-ptest = "1" PTEST_ENABLED = "${@base_contains("DISTRO_FEATURES", "ptest", "1", "0", d)}" RDEPENDS_${PN}-ptest_virtclass-native = "" RDEPENDS_${PN}-ptest_virtclass-nativesdk = "" -PACKAGES += "${@base_contains('DISTRO_FEATURES', 'ptest', '${PN}-ptest', '', d)}" - -FILES_${PN}-dbg += "${PTEST_PATH}/.debug \ - ${PTEST_PATH}/*/.debug \ - ${PTEST_PATH}/*/*/.debug \ - ${PTEST_PATH}/*/*/*/.debug \ - ${PTEST_PATH}/*/*/*/*/.debug \ - " +PACKAGES =+ "${@base_contains('DISTRO_FEATURES', 'ptest', '${PN}-ptest', '', d)}" do_configure_ptest_base() { if [ ${PTEST_ENABLED} = 1 ]; then - if [ type -t do_configure_ptest = function ]; then + if [ a$(type -t do_configure_ptest) = afunction ]; then do_configure_ptest fi fi @@ -33,7 +26,7 @@ do_configure_ptest_base() { do_compile_ptest_base() { if [ ${PTEST_ENABLED} = 1 ]; then - if [ type -t do_compile_ptest = function ]; then + if [ a$(type -t do_compile_ptest) = afunction ]; then do_compile_ptest fi fi @@ -46,7 +39,7 @@ do_install_ptest_base() { if grep -q install-ptest: Makefile; then oe_runmake DESTDIR=${D}${PTEST_PATH} install-ptest fi - if [ type -t do_install_ptest = function ]; then + if [ a$(type -t do_install_ptest) = afunction ]; then do_install_ptest fi fi |