diff options
Diffstat (limited to 'recipes-support/nettle/files/run-ptest')
-rw-r--r-- | recipes-support/nettle/files/run-ptest | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/recipes-support/nettle/files/run-ptest b/recipes-support/nettle/files/run-ptest new file mode 100644 index 0000000..b90bed6 --- /dev/null +++ b/recipes-support/nettle/files/run-ptest | |||
@@ -0,0 +1,36 @@ | |||
1 | #! /bin/sh | ||
2 | |||
3 | cd testsuite | ||
4 | |||
5 | failed=0 | ||
6 | all=0 | ||
7 | |||
8 | for f in *-test; do | ||
9 | if [ "$f" = "sha1-huge-test" ] ; then | ||
10 | echo "SKIP: $f (skipped for ludicrous run time)" | ||
11 | continue | ||
12 | fi | ||
13 | |||
14 | "./$f" | ||
15 | case "$?" in | ||
16 | 0) | ||
17 | echo "PASS: $f" | ||
18 | all=$((all + 1)) | ||
19 | ;; | ||
20 | 77) | ||
21 | echo "SKIP: $f" | ||
22 | ;; | ||
23 | *) | ||
24 | echo "FAIL: $f" | ||
25 | failed=$((failed + 1)) | ||
26 | all=$((all + 1)) | ||
27 | ;; | ||
28 | esac | ||
29 | done | ||
30 | |||
31 | if [ "$failed" -eq 0 ] ; then | ||
32 | echo "All $all tests passed" | ||
33 | else | ||
34 | echo "$failed of $all tests failed" | ||
35 | fi | ||
36 | |||