aboutsummaryrefslogtreecommitdiffstats
path: root/meta/recipes-support/ptest-runner/files/ptest-runner
blob: ccb04341c855b1f6671a4a1a2f6a66e4d3417589 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/bin/sh

echo "START: $0"

for libdir in /usr/lib*
do

    [ ! -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"
        pushd `dirname "$x"`
        ./run-ptest
        popd
        echo "END: $x"
        date "+%Y-%m-%dT%H:%M"
    done
done
echo "STOP: $0"