ptest-runner: trivial fixes and refine
cover ptest-runner: trivial fixes and refine
From: Roy Li <[email protected]>
The following changes since commit 5b451a46550ba62e2fbfe5dbe50723b34a4fd527:
systemd.bbclass: get the correct /lib directory (2013-09-10 23:15:09 +0100)
are available in the git repository at:
git://git.pokylinux.org/poky-contrib roy/ptest
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=roy/ptest
Roy Li (1):
ptest-runner: trivial fixes and refine
.../ptest-runner/files/ptest-runner | 30 +++++++++++++++----- 1 file changed, 23 insertions(+), 7 deletions(-)
Signature · 1 line
1.7.10.4
PATCH 1/1 ptest-runner: trivial fixes and refine
From: Roy Li <[email protected]>
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]
--- .../ptest-runner/files/ptest-runner | 30 +++++++++++++++----- 1 file changed, 23 insertions(+), 7 deletions(-)
meta/recipes-support/ptest-runner/files/ptest-runner +23 -7
@@ -1,16 +1,32 @@ #!/bin/sh echo "START: $0" -cd /usr/lib -for x in * + +for libdir in /usr/lib/ /usr/lib64/ 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"
Signature · 1 line
1.7.10.4
Quoted 22 lines · On Wed, 2013-09-11 at 15:34 +0800, [email protected] wrote:
From: Roy Li <[email protected]>
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 directories2. 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 <[email protected]>--- .../ptest-runner/files/ptest-runner | 30 +++++++++++++++----- 1 file changed, 23 insertions(+), 7 deletions(-)meta/recipes-support/ptest-runner/files/ptest-runner +0
-0
meta/recipes-support/ptest-runner/files/ptest-runner line 5
Quoted 7 lines
meta/recipes-support/ptest-runner/files/ptest-runner +2
-2@@ -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
Quoted 32 lines
meta/recipes-support/ptest-runner/files/ptest-runner +21
-5do - 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"
Quoted 35 lines · Richard Purdie
Quoted 22 lines · On Wed, 2013-09-11 at 15:34 +0800, [email protected] wrote:
From: Roy Li <[email protected]>
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 directories2. 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 <[email protected]>--- .../ptest-runner/files/ptest-runner | 30 +++++++++++++++----- 1 file changed, 23 insertions(+), 7 deletions(-)meta/recipes-support/ptest-runner/files/ptest-runner +0
-0meta/recipes-support/ptest-runner/files/ptest-runner line 5
Quoted 7 lines
meta/recipes-support/ptest-runner/files/ptest-runner +2
-2@@ -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*...
Quoted 3 lines
Cheers,
Richard
Thanks, I will change it
-Roy
Quoted 37 lines
Quoted 33 lines
meta/recipes-support/ptest-runner/files/ptest-runner +21
-5do - 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"
Signature · 2 lines
Best Reagrds, Roy | RongQing Li