diff options
Diffstat (limited to 'meta/recipes-support/attr/acl/run-ptest')
-rw-r--r-- | meta/recipes-support/attr/acl/run-ptest | 37 |
1 files changed, 26 insertions, 11 deletions
diff --git a/meta/recipes-support/attr/acl/run-ptest b/meta/recipes-support/attr/acl/run-ptest index 3af75c84fe..f28d8c1212 100644 --- a/meta/recipes-support/attr/acl/run-ptest +++ b/meta/recipes-support/attr/acl/run-ptest | |||
@@ -1,16 +1,31 @@ | |||
1 | #!/bin/sh | 1 | #!/bin/sh |
2 | # | ||
3 | #This script is used to run acl test suites | ||
4 | 2 | ||
5 | #umask 077 | 3 | failed=0 |
4 | all=0 | ||
6 | 5 | ||
7 | mkdir -p /tmp/acl-ptest/test | ||
8 | cp test/test.* /tmp/acl-ptest/test | ||
9 | 6 | ||
10 | set +e | 7 | for f in *.test; do |
11 | make test-suite.log | 8 | LD_PRELOAD=$(pwd)/libtestlookup.so ./run $f |
12 | exitcode=$? | 9 | case "$?" in |
13 | if [ $exitcode -ne 0 -a -e test-suite.log ]; then | 10 | 0) |
14 | cat test-suite.log | 11 | echo "PASS: $f" |
12 | all=$((all + 1)) | ||
13 | ;; | ||
14 | 77) | ||
15 | echo "SKIP: $f" | ||
16 | ;; | ||
17 | *) | ||
18 | echo "FAIL: $f" | ||
19 | failed=$((failed + 1)) | ||
20 | all=$((all + 1)) | ||
21 | ;; | ||
22 | esac | ||
23 | done | ||
24 | |||
25 | if [ "$failed" -eq 0 ] ; then | ||
26 | echo "All $all tests passed" | ||
27 | exit 0 | ||
28 | else | ||
29 | echo "$failed of $all tests failed" | ||
30 | exit 1 | ||
15 | fi | 31 | fi |
16 | exit $exitcode | ||