[OE-core] [V2 1/2] bluez4: Install the test script

Saul Wold sgw at linux.intel.com
Fri Nov 15 17:03:28 UTC 2013


On 11/14/2013 10:52 PM, Zhong Hongbo wrote:
> From: Zhong Hongbo <hongbo.zhong at windriver.com>
>
> In defalut, the bluez-test script do not be installed in the rootfs.
> After the user enable ptest feature, it will be install.
>
I think these tests are not the same as ptest, I think these are more 
like testapps, so I am not sure using ptest as a PACKAGECONFIG is correct.

They could be packaged as testtools similar to bluez5 and installed with 
packagegroup-core-tools-testapps,

Sau!

> Signed-off-by: Zhong Hongbo <hongbo.zhong at windriver.com>
> ---
>   .../bluez/bluez4-4.101/install-test-script.patch   |   42 ++++++++++++++++++++
>   meta/recipes-connectivity/bluez/bluez4_4.101.bb    |   13 +++++-
>   2 files changed, 54 insertions(+), 1 deletion(-)
>   create mode 100644 meta/recipes-connectivity/bluez/bluez4-4.101/install-test-script.patch
>
> diff --git a/meta/recipes-connectivity/bluez/bluez4-4.101/install-test-script.patch b/meta/recipes-connectivity/bluez/bluez4-4.101/install-test-script.patch
> new file mode 100644
> index 0000000..bd7f31d
> --- /dev/null
> +++ b/meta/recipes-connectivity/bluez/bluez4-4.101/install-test-script.patch
> @@ -0,0 +1,42 @@
> +Upstream-Status: Inappropriate
> +
> +Install the test scripts to /usr/bin directory
> +
> +Signed-off-by: Zhong Hongbo <hongbo.zhong at windriver.com>
> +---
> +diff -Nurd bluez-4.101.orig/configure.ac bluez-4.101/configure.ac
> +--- bluez-4.101.orig/configure.ac	2013-11-14 17:11:28.249903077 +0800
> ++++ bluez-4.101/configure.ac	2013-11-14 17:17:18.089902204 +0800
> +@@ -61,6 +61,11 @@
> + fi
> + AM_CONDITIONAL(SYSTEMD, test -n "${path_systemdunit}")
> +
> ++AC_ARG_WITH([bluez4testdir],
> ++    AS_HELP_STRING([--with-bluez4testdir=DIR], [bluez4 script test directory]),
> ++    [], [with_bluez4testdir=/usr/bin/])
> ++AC_SUBST([BLUEZ4_TEST_DIR], [$with_bluez4testdir])
> ++
> + AC_ARG_WITH([udevdir],
> +     AS_HELP_STRING([--with-udevdir=DIR], [udev directory]),
> +     [], [with_udevdir=/lib/udev/])
> +diff -Nurd bluez-4.101.orig/Makefile.tools bluez-4.101/Makefile.tools
> +--- bluez-4.101.orig/Makefile.tools	2013-11-14 17:11:28.237903079 +0800
> ++++ bluez-4.101/Makefile.tools	2013-11-14 17:18:11.577902071 +0800
> +@@ -227,6 +227,17 @@
> + 		test/service-spp.xml test/service-opp.xml test/service-ftp.xml \
> + 		test/simple-player test/test-nap
> +
> ++bluez4_testdir = @BLUEZ4_TEST_DIR@
> ++dist_bluez4_test_SCRIPTS = test/sap-client test/hsplay test/hsmicro \
> ++		test/monitor-bluetooth test/list-devices \
> ++		test/test-discovery test/test-manager test/test-adapter \
> ++		test/test-device test/test-service test/test-serial \
> ++		test/test-telephony test/test-network test/simple-agent \
> ++		test/simple-service test/simple-endpoint test/test-audio \
> ++		test/test-input test/test-sap-server test/test-oob \
> ++		test/test-attrib test/test-proximity test/test-thermometer \
> ++		test/test-serial-proxy test/test-health test/test-health-sink \
> ++		test/simple-player test/test-nap
> + if HIDD
> + bin_PROGRAMS += compat/hidd
> +
> diff --git a/meta/recipes-connectivity/bluez/bluez4_4.101.bb b/meta/recipes-connectivity/bluez/bluez4_4.101.bb
> index d6c3e26..e61ba02 100644
> --- a/meta/recipes-connectivity/bluez/bluez4_4.101.bb
> +++ b/meta/recipes-connectivity/bluez/bluez4_4.101.bb
> @@ -7,6 +7,7 @@ SRC_URI += "file://bluetooth.conf \
>               file://fix-udev-paths.patch \
>               file://obsolete_automake_macros.patch \
>               file://network-fix-network-Connect-method-parameters.patch \
> +            file://install-test-script.patch \
>   "
>
>   SRC_URI[md5sum] = "fb42cb7038c380eb0e2fa208987c96ad"
> @@ -25,7 +26,7 @@ do_install_append() {
>   RDEPENDS_${PN}-dev = "bluez-hcidump"
>
>   ALLOW_EMPTY_libasound-module-bluez = "1"
> -PACKAGES =+ "libasound-module-bluez"
> +PACKAGES =+ "libasound-module-bluez ${PN}-test"
>
>   FILES_libasound-module-bluez = "${libdir}/alsa-lib/lib*.so ${datadir}/alsa"
>   FILES_${PN} += "${libdir}/bluetooth/plugins ${libdir}/bluetooth/plugins/*.so ${base_libdir}/udev/ ${nonarch_base_libdir}/udev/ ${systemd_unitdir}/ ${datadir}/dbus-1"
> @@ -34,6 +35,16 @@ FILES_${PN}-dev += "\
>     ${libdir}/alsa-lib/*.la \
>   "
>
> +RDEPENDS_${PN} += "${@base_contains('DISTRO_FEATURES', 'ptest', '${PN}-test', '', d)}"
> +FILES_${PN}-test += "\
> +  ${bindir}/test-* \
> +  ${bindir}/simple-* \
> +  ${bindir}/hsmicro \
> +  ${bindir}/hsplay \
> +  ${bindir}/list-devices \
> +  ${bindir}/monitor-bluetooth \
> +"
> +
>   FILES_${PN}-dbg += "\
>     ${libdir}/bluetooth/plugins/.debug \
>     ${libdir}/*/.debug \
>



More information about the Openembedded-core mailing list