[OE-core] [yocto][PATCH 1/1] ptest: user-specified run-ptest script location

Tudor Florea tudor.florea at enea.com
Mon Sep 28 13:49:42 UTC 2015


Hi Ian

On 9/21/2015 10:11, Ian Ray wrote:
> Provides a new variable, PTEST_RUN_SCRIPT_PATH, which points to a
> directory where the run-ptest script is located.  This location
> defaults to the work directory but may be overridden within a recipe
> if a package ships its own run-ptest script.
> 
> Signed-off-by: Ian Ray <ian.ray at ge.com>
> ---
>  meta/classes/ptest.bbclass | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/meta/classes/ptest.bbclass b/meta/classes/ptest.bbclass
> index b5f470f..7d9d0cc 100644
> --- a/meta/classes/ptest.bbclass
> +++ b/meta/classes/ptest.bbclass
> @@ -3,6 +3,7 @@ DESCRIPTION_${PN}-ptest ?= "${DESCRIPTION}  \
>  This package contains a test directory ${PTEST_PATH} for package test purposes."
>  
>  PTEST_PATH ?= "${libdir}/${PN}/ptest"
> +PTEST_RUN_SCRIPT_PATH ??= "${WORKDIR}"
>  FILES_${PN}-ptest = "${PTEST_PATH}"
>  SECTION_${PN}-ptest = "devel"
>  ALLOW_EMPTY_${PN}-ptest = "1"
> @@ -37,8 +38,8 @@ do_install_ptest() {
>  }
>  
>  do_install_ptest_base() {
> -    if [ -f ${WORKDIR}/run-ptest ]; then
> -        install -D ${WORKDIR}/run-ptest ${D}${PTEST_PATH}/run-ptest
> +    if [ -f ${PTEST_RUN_SCRIPT_PATH}/run-ptest ]; then
> +        install -D ${PTEST_RUN_SCRIPT_PATH}/run-ptest ${D}${PTEST_PATH}/run-ptest
Is there any benefit in adding this? Do you have an example of package
that contains a run-ptest file that could benefit of this approach?
Usually, run-ptest is not part of the package but rather is a standalone
file referred by the package recipe. It is the responsibility of the
person implementing ptest functionality come up with a run-ptest file
(containing a script to be run on target to implement testing
functionality) hence is his/her responsibility as well to put it in the
right place.

>          if grep -q install-ptest: Makefile; then
>              oe_runmake DESTDIR=${D}${PTEST_PATH} install-ptest
>          fi
> 



More information about the Openembedded-core mailing list