summaryrefslogtreecommitdiffstats
path: root/meta/recipes-support
diff options
context:
space:
mode:
authorRoy Li <rongqing.li@windriver.com>2013-09-11 17:17:32 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-09-11 11:07:59 +0100
commit775bc290fb9a17883965c60295d95a74e676b348 (patch)
treee9d6d3fb7dd68f16dd9811bf2144bc3835231bbf /meta/recipes-support
parent4c92281f0349eb6ccd7dd7c3e358ba7e7936fb6c (diff)
downloadast2050-yocto-poky-775bc290fb9a17883965c60295d95a74e676b348.zip
ast2050-yocto-poky-775bc290fb9a17883965c60295d95a74e676b348.tar.gz
ptest-runner: trivial fixes and refine
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] (From OE-Core rev: 51c43e08b388ed15520c66977bbb49df18e5f124) Signed-off-by: Roy Li <rongqing.li@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-support')
-rw-r--r--meta/recipes-support/ptest-runner/files/ptest-runner30
1 files 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..ccb0434 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*
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"
OpenPOWER on IntegriCloud