diff options
author | Roy Li <rongqing.li@windriver.com> | 2013-09-11 17:17:32 +0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-09-11 11:07:59 +0100 |
commit | 775bc290fb9a17883965c60295d95a74e676b348 (patch) | |
tree | e9d6d3fb7dd68f16dd9811bf2144bc3835231bbf /meta | |
parent | 4c92281f0349eb6ccd7dd7c3e358ba7e7936fb6c (diff) | |
download | 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')
-rw-r--r-- | meta/recipes-support/ptest-runner/files/ptest-runner | 30 |
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 4f3c7ce730..ccb04341c8 100644 --- a/meta/recipes-support/ptest-runner/files/ptest-runner +++ b/meta/recipes-support/ptest-runner/files/ptest-runner | |||
@@ -1,16 +1,32 @@ | |||
1 | #!/bin/sh | 1 | #!/bin/sh |
2 | 2 | ||
3 | echo "START: $0" | 3 | echo "START: $0" |
4 | cd /usr/lib | 4 | |
5 | for x in * | 5 | for libdir in /usr/lib* |
6 | do | 6 | do |
7 | if [ -x "/usr/lib/$x/ptest/run-ptest" ]; then | 7 | |
8 | date "+%Y-%m-%dT%H:%M" | 8 | [ ! -d "$libdir" ] && continue |
9 | |||
10 | cd "$libdir" | ||
11 | for x in `find -L ./ -name run-ptest -type f -perm /u+x,g+x` | ||
12 | do | ||
13 | # test if a dir is linking to one that they are under same directory | ||
14 | # like perl5-->perl | ||
15 | ptestdir=`dirname $x|cut -f2 -d"/"` | ||
16 | if [ -h "$ptestdir" ]; then | ||
17 | linkdir=`readlink -f "$ptestdir"` | ||
18 | if [ `dirname "$linkdir"` = "$libdir" ]; then | ||
19 | continue | ||
20 | fi | ||
21 | fi | ||
22 | |||
23 | date "+%Y-%m-%dT%H:%M" | ||
9 | echo "BEGIN: $x" | 24 | echo "BEGIN: $x" |
10 | cd /usr/lib/$x/ptest | 25 | pushd `dirname "$x"` |
11 | ./run-ptest | 26 | ./run-ptest |
27 | popd | ||
12 | echo "END: $x" | 28 | echo "END: $x" |
13 | date "+%Y-%m-%dT%H:%M" | 29 | date "+%Y-%m-%dT%H:%M" |
14 | fi | 30 | done |
15 | done | 31 | done |
16 | echo "STOP: $0" | 32 | echo "STOP: $0" |