Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Richard Purdie <richard.purdie@linuxfoundation.org>
To: rongqing.li@windriver.com
Cc: openembedded-core@lists.openembedded.org
Subject: Re: [PATCH 1/1] ptest-runner: trivial fixes and refine
Date: Wed, 11 Sep 2013 09:40:02 +0100	[thread overview]
Message-ID: <1378888802.3484.170.camel@ted> (raw)
In-Reply-To: <934e6208f68c0801666853fc81c3f67b39c368cb.1378884764.git.rongqing.li@windriver.com>

On Wed, 2013-09-11 at 15:34 +0800, rongqing.li@windriver.com wrote:
> From: Roy Li <rongqing.li@windriver.com>
> 
> 1. ptest files may be installed under /usr/lib64/ for 64bit filesystem
> or under /usr/lib/ for 64bit multilib filesystem, so we should check both
> directories
> 
> 2. If a soft link is linking to a directory under the same directory, we
> only run once.
> 
> [YOCTO #5125]
> [YOCTO #5126]
> 
> Signed-off-by: Roy Li <rongqing.li@windriver.com>
> ---
>  .../ptest-runner/files/ptest-runner                |   30 +++++++++++++++-----
>  1 file changed, 23 insertions(+), 7 deletions(-)
> 
> diff --git a/meta/recipes-support/ptest-runner/files/ptest-runner b/meta/recipes-support/ptest-runner/files/ptest-runner
> index 4f3c7ce..724e066 100644
> --- a/meta/recipes-support/ptest-runner/files/ptest-runner
> +++ b/meta/recipes-support/ptest-runner/files/ptest-runner
> @@ -1,16 +1,32 @@
>  #!/bin/sh
>  
>  echo "START: $0"
> -cd /usr/lib
> -for x in *
> +
> +for libdir in /usr/lib/ /usr/lib64/


We shouldn't hard code this. To keep things simple, I think you need to
search /usr/lib*...

Cheers,

Richard

>  do
> -    if [ -x "/usr/lib/$x/ptest/run-ptest" ]; then
> -       date "+%Y-%m-%dT%H:%M"
> +
> +    [ ! -d "$libdir" ] && continue
> +
> +    cd "$libdir"
> +    for x in `find -L ./ -name run-ptest -type f -perm /u+x,g+x`
> +    do
> +        # test if a dir is linking to one that they are under same directory
> +        # like perl5-->perl
> +        ptestdir=`dirname $x|cut -f2 -d"/"`
> +        if [ -h "$ptestdir" ]; then
> +            linkdir=`readlink -f "$ptestdir"`
> +            if [ `dirname "$linkdir"`"/" = "$libdir" ]; then
> +                continue
> +            fi
> +        fi
> +    
> +        date "+%Y-%m-%dT%H:%M"
>          echo "BEGIN: $x"
> -        cd /usr/lib/$x/ptest
> +        pushd `dirname "$x"`
>          ./run-ptest
> +        popd
>          echo "END: $x"
> -       date "+%Y-%m-%dT%H:%M"
> -    fi
> +        date "+%Y-%m-%dT%H:%M"
> +    done
>  done
>  echo "STOP: $0"




  reply	other threads:[~2013-09-11  8:40 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-11  7:34 [PATCH 0/1] ptest-runner: trivial fixes and refine rongqing.li
2013-09-11  7:34 ` [PATCH 1/1] " rongqing.li
2013-09-11  8:40   ` Richard Purdie [this message]
2013-09-11  9:02     ` Rongqing Li
  -- strict thread matches above, loose matches on Subject: below --
2013-09-11  9:17 [PATCH 0/1 v2] " rongqing.li
2013-09-11  9:17 ` [PATCH 1/1] " rongqing.li
2013-09-12 20:45   ` Chris Larson
2013-09-17 13:35     ` Björn Stenberg
2013-09-19 11:47     ` Björn Stenberg
2013-09-19 15:04       ` Randy MacLeod
2013-09-20  9:17         ` Björn Stenberg

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=1378888802.3484.170.camel@ted \
    --to=richard.purdie@linuxfoundation.org \
    --cc=openembedded-core@lists.openembedded.org \
    --cc=rongqing.li@windriver.com \
    /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