summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimone Weiss <simone.weiss@elektrobit.com>2022-05-04 14:25:15 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2022-05-05 21:17:36 +0100
commitabb249841a0f8896023229b2df9eb209d9492089 (patch)
treea45bf79abb8f73349116f4e063ace3673c9c02fa
parent3fe41b9b46e4bb34c0c751426053472823315f60 (diff)
downloadpoky-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>
-rw-r--r--meta/conf/distro/include/ptest-packagelists.inc1
-rw-r--r--meta/recipes-support/libgcrypt/files/run-ptest3
-rw-r--r--meta/recipes-support/libgcrypt/libgcrypt_1.10.1.bb15
3 files changed, 18 insertions, 1 deletions
diff --git a/meta/conf/distro/include/ptest-packagelists.inc b/meta/conf/distro/include/ptest-packagelists.inc
index 54a290871e..a1ead90649 100644
--- a/meta/conf/distro/include/ptest-packagelists.inc
+++ b/meta/conf/distro/include/ptest-packagelists.inc
@@ -87,6 +87,7 @@ PTESTS_SLOW = "\
87 glib-2.0-ptest \ 87 glib-2.0-ptest \
88 gstreamer1.0-ptest \ 88 gstreamer1.0-ptest \
89 libevent-ptest \ 89 libevent-ptest \
90 libgcrypt-ptest \
90 lttng-tools-ptest \ 91 lttng-tools-ptest \
91 openssh-ptest \ 92 openssh-ptest \
92 openssl-ptest \ 93 openssl-ptest \
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
3make -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
20DEPENDS = "libgpg-error" 20DEPENDS = "libgpg-error"
21RDEPENDS:${PN}-ptest = "bash"
21 22
22UPSTREAM_CHECK_URI = "https://gnupg.org/download/index.html" 23UPSTREAM_CHECK_URI = "https://gnupg.org/download/index.html"
23SRC_URI = "${GNUPG_MIRROR}/libgcrypt/libgcrypt-${PV}.tar.bz2 \ 24SRC_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 "
29SRC_URI[sha256sum] = "ef14ae546b0084cd84259f61a55e07a38c3b53afc0f546bffcef2f01baffe9de" 31SRC_URI[sha256sum] = "ef14ae546b0084cd84259f61a55e07a38c3b53afc0f546bffcef2f01baffe9de"
30 32
@@ -33,11 +35,13 @@ CVE_CHECK_IGNORE += "CVE-2018-12433 CVE-2018-12438"
33 35
34BINCONFIG = "${bindir}/libgcrypt-config" 36BINCONFIG = "${bindir}/libgcrypt-config"
35 37
36inherit autotools texinfo binconfig-disabled pkgconfig 38inherit autotools texinfo binconfig-disabled pkgconfig ptest
37 39
38EXTRA_OECONF = "--disable-asm" 40EXTRA_OECONF = "--disable-asm"
39EXTRA_OEMAKE:class-target = "LIBTOOLFLAGS='--tag=CC'" 41EXTRA_OEMAKE:class-target = "LIBTOOLFLAGS='--tag=CC'"
40 42
43PRIVATE_LIBS:${PN}-ptest:append = " libgcrypt.so.20"
44
41PACKAGECONFIG ??= "capabilities" 45PACKAGECONFIG ??= "capabilities"
42PACKAGECONFIG[capabilities] = "--with-capabilities,--without-capabilities,libcap" 46PACKAGECONFIG[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
59do_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
55PACKAGES =+ "dumpsexp-dev" 68PACKAGES =+ "dumpsexp-dev"
56 69
57FILES:${PN}-dev += "${bindir}/hmac256" 70FILES:${PN}-dev += "${bindir}/hmac256"