diff options
author | Ross Burton <ross.burton@arm.com> | 2023-06-08 12:59:15 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2023-06-09 13:55:20 +0100 |
commit | 098df1bd77ac231903194bec556bb7be20496141 (patch) | |
tree | 4f50289b5b1d9ca6987298f6f577707692d5acb8 /meta/recipes-support/nettle/nettle | |
parent | 5be5b6ee21baa32e35fd9a9d1e093edfa32f1a7f (diff) | |
download | poky-098df1bd77ac231903194bec556bb7be20496141.tar.gz |
nettle: rewrite ptest integration
Instead of patching a relative path to an unversioned libnettle.so to be
a bare filename which then needs nettle-dev to be installed, create a
symlink in the expected place which points to the actual library. This
means nettle-ptest no longer needs to depend on nettle-dev.
Explicitly skip symbols-test, it has been silently failing as nm isn't
available and also needs a static libnettle.a to run.
Install two rsa-* example binaries that are needed for pkcs1-conv-test
to pass.
(From OE-Core rev: dc5cd169e8b9a0f9d9881f116a8d83706460bb7c)
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-support/nettle/nettle')
-rw-r--r-- | meta/recipes-support/nettle/nettle/dlopen-test.patch | 29 | ||||
-rw-r--r-- | meta/recipes-support/nettle/nettle/run-ptest | 40 |
2 files changed, 22 insertions, 47 deletions
diff --git a/meta/recipes-support/nettle/nettle/dlopen-test.patch b/meta/recipes-support/nettle/nettle/dlopen-test.patch deleted file mode 100644 index ab9b91f88b..0000000000 --- a/meta/recipes-support/nettle/nettle/dlopen-test.patch +++ /dev/null | |||
@@ -1,29 +0,0 @@ | |||
1 | Remove the relative path for libnettle.so so the test | ||
2 | program can find it. | ||
3 | Relative paths are not suitable, as the folder strucure for ptest | ||
4 | is different from the one expected by the nettle testsuite. | ||
5 | |||
6 | Upstream-Status: Inappropriate [embedded specific] | ||
7 | |||
8 | Signed-off-by: Juro Bystricky <juro.bystricky@intel.com> | ||
9 | Signed-off-by: Mingli Yu <mingli.yu@windriver.com> | ||
10 | --- | ||
11 | testsuite/dlopen-test.c | 2 +- | ||
12 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
13 | |||
14 | diff --git a/testsuite/dlopen-test.c b/testsuite/dlopen-test.c | ||
15 | index 4265bf7..1a25d17 100644 | ||
16 | --- a/testsuite/dlopen-test.c | ||
17 | +++ b/testsuite/dlopen-test.c | ||
18 | @@ -15,7 +15,7 @@ int | ||
19 | main (int argc UNUSED, char **argv UNUSED) | ||
20 | { | ||
21 | #if HAVE_LIBDL | ||
22 | - void *handle = dlopen ("../libnettle." SO_EXT, RTLD_NOW); | ||
23 | + void *handle = dlopen ("libnettle.so", RTLD_NOW); | ||
24 | int (*get_version)(void); | ||
25 | if (!handle) | ||
26 | { | ||
27 | -- | ||
28 | 2.17.1 | ||
29 | |||
diff --git a/meta/recipes-support/nettle/nettle/run-ptest b/meta/recipes-support/nettle/nettle/run-ptest index b90bed66d2..61a43c78f1 100644 --- a/meta/recipes-support/nettle/nettle/run-ptest +++ b/meta/recipes-support/nettle/nettle/run-ptest | |||
@@ -6,31 +6,35 @@ failed=0 | |||
6 | all=0 | 6 | all=0 |
7 | 7 | ||
8 | for f in *-test; do | 8 | for f in *-test; do |
9 | if [ "$f" = "sha1-huge-test" ] ; then | 9 | case "$f" in |
10 | echo "SKIP: $f (skipped for ludicrous run time)" | 10 | "sha1-huge-test") |
11 | continue | 11 | echo "SKIP: $f (long run time)" |
12 | fi | ||
13 | |||
14 | "./$f" | ||
15 | case "$?" in | ||
16 | 0) | ||
17 | echo "PASS: $f" | ||
18 | all=$((all + 1)) | ||
19 | ;; | 12 | ;; |
20 | 77) | 13 | "symbols-test") |
21 | echo "SKIP: $f" | 14 | echo "SKIP: $f (needs static libraries)" |
22 | ;; | 15 | ;; |
23 | *) | 16 | *) |
24 | echo "FAIL: $f" | 17 | "./$f" |
25 | failed=$((failed + 1)) | 18 | case "$?" in |
26 | all=$((all + 1)) | 19 | 0) |
20 | echo "PASS: $f" | ||
21 | all=$((all + 1)) | ||
22 | ;; | ||
23 | 77) | ||
24 | echo "SKIP: $f" | ||
25 | ;; | ||
26 | *) | ||
27 | echo "FAIL: $f" | ||
28 | failed=$((failed + 1)) | ||
29 | all=$((all + 1)) | ||
30 | ;; | ||
31 | esac | ||
27 | ;; | 32 | ;; |
28 | esac | 33 | esac |
29 | done | 34 | done |
30 | 35 | ||
31 | if [ "$failed" -eq 0 ] ; then | 36 | if [ "$failed" -eq 0 ] ; then |
32 | echo "All $all tests passed" | 37 | echo "All $all tests passed" |
33 | else | 38 | else |
34 | echo "$failed of $all tests failed" | 39 | echo "$failed of $all tests failed" |
35 | fi | 40 | fi |
36 | |||