diff options
author | Jussi Kukkonen <jussi.kukkonen@intel.com> | 2015-08-27 10:40:22 +0300 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-09-01 11:44:00 +0100 |
commit | 3a37c439c7abdc5b0d269b80192f1b8d327f8e11 (patch) | |
tree | 8db5414d11b77e17aa9b1b5830623bac9100120f /meta/recipes-support/nettle/files/run-ptest | |
parent | 38f4e92ab96fe472b3efc2d359a25a6916019c49 (diff) | |
download | poky-3a37c439c7abdc5b0d269b80192f1b8d327f8e11.tar.gz |
nettle: Add ptests
Use the nettle testsuite as ptests. Skip "sha1-huge-test" because
it can take 20 minutes to finish.
(From OE-Core rev: 75839c401f319d4367cb1b9259d0931170212ec8)
Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-support/nettle/files/run-ptest')
-rw-r--r-- | meta/recipes-support/nettle/files/run-ptest | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/meta/recipes-support/nettle/files/run-ptest b/meta/recipes-support/nettle/files/run-ptest new file mode 100644 index 0000000000..b90bed66d2 --- /dev/null +++ b/meta/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 | |||