Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Tudor Florea <tudor.florea@enea.com>
To: Ian Ray <ian.ray@ge.com>, <openembedded-core@lists.openembedded.org>
Subject: Re: [yocto][PATCH 1/1] ptest: user-specified run-ptest script location
Date: Mon, 28 Sep 2015 16:49:42 +0300	[thread overview]
Message-ID: <56094576.6070803@enea.com> (raw)
In-Reply-To: <1442819513-20171-2-git-send-email-ian.ray@ge.com>

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@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
> 


  reply	other threads:[~2015-09-28 13:50 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-21  7:11 [yocto][PATCH 0/1] new PTEST_RUN_SCRIPT_PATH Ian Ray
2015-09-21  7:11 ` [yocto][PATCH 1/1] ptest: user-specified run-ptest script location Ian Ray
2015-09-28 13:49   ` Tudor Florea [this message]
2015-09-28 14:46     ` Ray, Ian (GE Healthcare)
2015-09-28 15:23       ` Burton, Ross
2015-09-28 15:41         ` Ray, Ian (GE Healthcare)
2015-09-28 18:44           ` Tudor Florea
2015-09-29  6:59             ` Ray, Ian (GE Healthcare)
2015-09-29 13:17               ` Richard Purdie
2015-09-29 19:53               ` Tudor Florea
2015-09-30 10:35                 ` Ray, Ian (GE Healthcare)

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=56094576.6070803@enea.com \
    --to=tudor.florea@enea.com \
    --cc=ian.ray@ge.com \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox