diff options
author | Simone Weiss <simone.weiss@elektrobit.com> | 2022-05-04 14:25:15 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2022-05-05 21:17:36 +0100 |
commit | abb249841a0f8896023229b2df9eb209d9492089 (patch) | |
tree | a45bf79abb8f73349116f4e063ace3673c9c02fa /meta/recipes-support/libgcrypt | |
parent | 3fe41b9b46e4bb34c0c751426053472823315f60 (diff) | |
download | poky-abb249841a0f8896023229b2df9eb209d9492089.tar.gz |
libgcrypt: Add ptest
Add a ptest for libgcript to core-image-ptest-all. All tests passed on a trial
run.
(From OE-Core rev: 7e101c0231f9593185146770f1496a38fa9c590e)
Signed-off-by: Simone Weiss <simone.weiss@elektrobit.com>
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-support/libgcrypt')
-rw-r--r-- | meta/recipes-support/libgcrypt/files/run-ptest | 3 | ||||
-rw-r--r-- | meta/recipes-support/libgcrypt/libgcrypt_1.10.1.bb | 15 |
2 files changed, 17 insertions, 1 deletions
diff --git a/meta/recipes-support/libgcrypt/files/run-ptest b/meta/recipes-support/libgcrypt/files/run-ptest new file mode 100644 index 0000000000..4818a061b4 --- /dev/null +++ b/meta/recipes-support/libgcrypt/files/run-ptest | |||
@@ -0,0 +1,3 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | make -C build/tests runtest-TESTS | ||
diff --git a/meta/recipes-support/libgcrypt/libgcrypt_1.10.1.bb b/meta/recipes-support/libgcrypt/libgcrypt_1.10.1.bb index 251e0d0348..aa83de226d 100644 --- a/meta/recipes-support/libgcrypt/libgcrypt_1.10.1.bb +++ b/meta/recipes-support/libgcrypt/libgcrypt_1.10.1.bb | |||
@@ -18,6 +18,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \ | |||
18 | " | 18 | " |
19 | 19 | ||
20 | DEPENDS = "libgpg-error" | 20 | DEPENDS = "libgpg-error" |
21 | RDEPENDS:${PN}-ptest = "bash" | ||
21 | 22 | ||
22 | UPSTREAM_CHECK_URI = "https://gnupg.org/download/index.html" | 23 | UPSTREAM_CHECK_URI = "https://gnupg.org/download/index.html" |
23 | SRC_URI = "${GNUPG_MIRROR}/libgcrypt/libgcrypt-${PV}.tar.bz2 \ | 24 | SRC_URI = "${GNUPG_MIRROR}/libgcrypt/libgcrypt-${PV}.tar.bz2 \ |
@@ -25,6 +26,7 @@ SRC_URI = "${GNUPG_MIRROR}/libgcrypt/libgcrypt-${PV}.tar.bz2 \ | |||
25 | file://0003-tests-bench-slope.c-workaround-ICE-failure-on-mips-w.patch \ | 26 | file://0003-tests-bench-slope.c-workaround-ICE-failure-on-mips-w.patch \ |
26 | file://0002-libgcrypt-fix-building-error-with-O2-in-sysroot-path.patch \ | 27 | file://0002-libgcrypt-fix-building-error-with-O2-in-sysroot-path.patch \ |
27 | file://0004-tests-Makefile.am-fix-undefined-reference-to-pthread.patch \ | 28 | file://0004-tests-Makefile.am-fix-undefined-reference-to-pthread.patch \ |
29 | file://run-ptest \ | ||
28 | " | 30 | " |
29 | SRC_URI[sha256sum] = "ef14ae546b0084cd84259f61a55e07a38c3b53afc0f546bffcef2f01baffe9de" | 31 | SRC_URI[sha256sum] = "ef14ae546b0084cd84259f61a55e07a38c3b53afc0f546bffcef2f01baffe9de" |
30 | 32 | ||
@@ -33,11 +35,13 @@ CVE_CHECK_IGNORE += "CVE-2018-12433 CVE-2018-12438" | |||
33 | 35 | ||
34 | BINCONFIG = "${bindir}/libgcrypt-config" | 36 | BINCONFIG = "${bindir}/libgcrypt-config" |
35 | 37 | ||
36 | inherit autotools texinfo binconfig-disabled pkgconfig | 38 | inherit autotools texinfo binconfig-disabled pkgconfig ptest |
37 | 39 | ||
38 | EXTRA_OECONF = "--disable-asm" | 40 | EXTRA_OECONF = "--disable-asm" |
39 | EXTRA_OEMAKE:class-target = "LIBTOOLFLAGS='--tag=CC'" | 41 | EXTRA_OEMAKE:class-target = "LIBTOOLFLAGS='--tag=CC'" |
40 | 42 | ||
43 | PRIVATE_LIBS:${PN}-ptest:append = " libgcrypt.so.20" | ||
44 | |||
41 | PACKAGECONFIG ??= "capabilities" | 45 | PACKAGECONFIG ??= "capabilities" |
42 | PACKAGECONFIG[capabilities] = "--with-capabilities,--without-capabilities,libcap" | 46 | PACKAGECONFIG[capabilities] = "--with-capabilities,--without-capabilities,libcap" |
43 | 47 | ||
@@ -52,6 +56,15 @@ do_install:append() { | |||
52 | install -m 0644 ${B}/src/libgcrypt.pc ${D}/${libdir}/pkgconfig/ | 56 | install -m 0644 ${B}/src/libgcrypt.pc ${D}/${libdir}/pkgconfig/ |
53 | } | 57 | } |
54 | 58 | ||
59 | do_install_ptest() { | ||
60 | cp -r --preserve=mode,links -v ${S} ${D}${PTEST_PATH} | ||
61 | cp -r --preserve=mode,links -v ${B} ${D}${PTEST_PATH} | ||
62 | rm ${D}${PTEST_PATH}/build/cipher/gost-s-box | ||
63 | rm ${D}${PTEST_PATH}/build/doc/yat2m | ||
64 | find ${D}/${PTEST_PATH}/build -name "*.cmake" -or -name "Makefile" \ | ||
65 | | xargs sed -e "s|${WORKDIR}|${PTEST_PATH}|g" -e "s|${WORKDIR}/recipe-sysroot-native||g" -i | ||
66 | } | ||
67 | |||
55 | PACKAGES =+ "dumpsexp-dev" | 68 | PACKAGES =+ "dumpsexp-dev" |
56 | 69 | ||
57 | FILES:${PN}-dev += "${bindir}/hmac256" | 70 | FILES:${PN}-dev += "${bindir}/hmac256" |