diff options
Diffstat (limited to 'meta/recipes-support/ptest-runner/files')
-rwxr-xr-x | meta/recipes-support/ptest-runner/files/ptest-runner | 54 |
1 files changed, 0 insertions, 54 deletions
diff --git a/meta/recipes-support/ptest-runner/files/ptest-runner b/meta/recipes-support/ptest-runner/files/ptest-runner deleted file mode 100755 index 204cbdfc76..0000000000 --- a/meta/recipes-support/ptest-runner/files/ptest-runner +++ /dev/null | |||
@@ -1,54 +0,0 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | determine_ptests_to_run() | ||
4 | { | ||
5 | for libdir in /usr/lib* | ||
6 | do | ||
7 | [ ! -d "$libdir" ] && continue | ||
8 | |||
9 | for x in `ls -d $libdir/*/ptest 2>/dev/null` | ||
10 | do | ||
11 | [ ! -f $x/run-ptest ] && continue | ||
12 | [ -h `dirname $x` ] && continue | ||
13 | |||
14 | #found a ptest in the system | ||
15 | PTEST_FOUND=$(basename $(dirname $x)) | ||
16 | |||
17 | # when no pkg-names were specified, by default run each one | ||
18 | if [[ -z $@ ]]; then | ||
19 | printf " $x" | ||
20 | else | ||
21 | #check if this ptest has been asked for and add it | ||
22 | if [[ $@ =~ $PTEST_FOUND ]]; then | ||
23 | printf " $x" | ||
24 | fi | ||
25 | fi | ||
26 | done | ||
27 | done | ||
28 | } | ||
29 | |||
30 | run_ptests() | ||
31 | { | ||
32 | ANYFAILED=no | ||
33 | |||
34 | #the paths were sanity-checked in determine_ptests_to_run() | ||
35 | for ptst_path in $PTESTS_TO_RUN | ||
36 | do | ||
37 | date "+%Y-%m-%dT%H:%M" | ||
38 | echo "BEGIN: $ptst_path" | ||
39 | cd "$ptst_path" | ||
40 | ./run-ptest || ANYFAILED=yes | ||
41 | echo "END: $ptest_path" | ||
42 | date "+%Y-%m-%dT%H:%M" | ||
43 | done | ||
44 | } | ||
45 | |||
46 | echo "START: $0" | ||
47 | PTESTS_TO_RUN=$(determine_ptests_to_run $@) | ||
48 | run_ptests | ||
49 | echo "STOP: $0" | ||
50 | |||
51 | if [ "$ANYFAILED" = "yes" ]; then | ||
52 | exit 1 | ||
53 | fi | ||
54 | exit 0 | ||