[yocto] [meta-security][PATCH] libseccomp: convert test package to ptest

akuster808 akuster808 at gmail.com
Sat Feb 18 15:59:53 PST 2017


Wenzong Fan,


On 02/16/2017 10:44 PM, wenzong.fan at windriver.com wrote:
> From: Wenzong Fan <wenzong.fan at windriver.com>
I had to fixup  your changes against master-next. I just pushed to 
master-next.  If you sign-off, I will push to master.

thanks,
- armin
>
> Signed-off-by: Wenzong Fan <wenzong.fan at windriver.com>
> ---
>   recipes-security/libseccomp/files/run-ptest |  4 ++++
>   recipes-security/libseccomp/libseccomp.bb   | 24 ++++++++++++------------
>   2 files changed, 16 insertions(+), 12 deletions(-)
>   create mode 100644 recipes-security/libseccomp/files/run-ptest
>
> diff --git a/recipes-security/libseccomp/files/run-ptest b/recipes-security/libseccomp/files/run-ptest
> new file mode 100644
> index 0000000..54b4a63
> --- /dev/null
> +++ b/recipes-security/libseccomp/files/run-ptest
> @@ -0,0 +1,4 @@
> +#!/bin/sh
> +
> +cd tests
> +./regression -a
> diff --git a/recipes-security/libseccomp/libseccomp.bb b/recipes-security/libseccomp/libseccomp.bb
> index c131bea..830e051 100644
> --- a/recipes-security/libseccomp/libseccomp.bb
> +++ b/recipes-security/libseccomp/libseccomp.bb
> @@ -8,37 +8,37 @@ SRCREV = "937e774d8ccfd063a601f49ef46769de3926b62d"
>   
>   PV = "2.3.1+git${SRCPV}"
>   
> -SRC_URI = "git://github.com/seccomp/libseccomp.git"
> +SRC_URI = "git://github.com/seccomp/libseccomp.git \
> +           file://run-ptest \
> +"
>   
>   S = "${WORKDIR}/git"
>   
> -inherit autotools-brokensep pkgconfig
> +inherit autotools-brokensep pkgconfig ptest
>   
>   PACKAGECONFIG ??= ""
>   PACKAGECONFIG[python] = "--enable-python, --disable-python, python"
>   
> -do_compile_append() {
> +do_compile_ptest() {
>       oe_runmake -C tests check-build
>   }
>   
> -do_install_append() {
> -    install -d ${D}/${libdir}/${PN}/tests
> -    install -d ${D}/${libdir}/${PN}/tools
> +do_install_ptest() {
> +    install -d ${D}${PTEST_PATH}/tests
> +    install -d ${D}${PTEST_PATH}/tools
>       for file in $(find tests/* -executable -type f); do
> -        install -m 744 ${S}/${file} ${D}/${libdir}/${PN}/tests
> +        install -m 744 ${S}/${file} ${D}${PTEST_PATH}/tests
>       done
>       for file in $(find tests/*.tests -type f); do
> -        install -m 744 ${S}/${file} ${D}/${libdir}/${PN}/tests
> +        install -m 744 ${S}/${file} ${D}${PTEST_PATH}/tests
>       done
>       for file in $(find tools/* -executable -type f); do
> -        install -m 744 ${S}/${file} ${D}/${libdir}/${PN}/tools
> +        install -m 744 ${S}/${file} ${D}${PTEST_PATH}/tools
>       done
>   }
>   
> -PACKAGES += " ${PN}-tests"
>   FILES_${PN} = "${bindir} ${libdir}/${PN}.so*"
> -FILES_${PN}-tests = "${libdir}/${PN}/tools ${libdir}/${PN}/tests"
>   FILES_${PN}-dbg += "${libdir}/${PN}/tests/.debug/* ${libdir}/${PN}/tools/.debug"
>   
>   RDEPENDS_${PN} = "bash"
> -RDEPENDS_${PN}-tests = "bash"
> +RDEPENDS_${PN}-ptest = "bash"




More information about the yocto mailing list