]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
libgpg-error: Add ptest
authorSimone Weiss <simone.weiss@elektrobit.com>
Tue, 19 Apr 2022 12:59:41 +0000 (14:59 +0200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 20 Apr 2022 09:30:50 +0000 (10:30 +0100)
Add a ptest for libgpg-error to core-image-ptest-all. Avoid refreshing the
Makefile in qemu as this would fail and is not needed. All tests passed on
a trial run.

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>
meta/conf/distro/include/ptest-packagelists.inc
meta/recipes-support/libgpg-error/libgpg-error/run-ptest [new file with mode: 0644]
meta/recipes-support/libgpg-error/libgpg-error_1.44.bb

index b51cce4d9e1e436918a01c1afc4416e13da9add6..54a290871e8d1f4cc1f19407dad1b08df21b0229 100644 (file)
@@ -25,6 +25,7 @@ PTESTS_FAST = "\
     json-glib-ptest \
     libconvert-asn1-perl-ptest \
     liberror-perl-ptest \
+    libgpg-error-ptest\
     libnl-ptest \
     libmodule-build-perl-ptest \
     libpcre-ptest \
diff --git a/meta/recipes-support/libgpg-error/libgpg-error/run-ptest b/meta/recipes-support/libgpg-error/libgpg-error/run-ptest
new file mode 100644 (file)
index 0000000..2d23159
--- /dev/null
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+make -o Makefile runtest-TESTS
index 41adad0ede2d479f4386c2d0935d5d81c4dee66f..f5b482f4c95a6f0312bd2b88fffa3015a376f2f9 100644 (file)
@@ -17,13 +17,16 @@ UPSTREAM_CHECK_URI = "https://gnupg.org/download/index.html"
 SRC_URI = "${GNUPG_MIRROR}/libgpg-error/libgpg-error-${PV}.tar.bz2 \
            file://pkgconfig.patch \
            file://0001-Do-not-fail-when-testing-config-scripts.patch \
+           file://run-ptest \
            "
 
 SRC_URI[sha256sum] = "8e3d2da7a8b9a104dd8e9212ebe8e0daf86aa838cc1314ba6bc4de8f2d8a1ff9"
 
 BINCONFIG = "${bindir}/gpg-error-config"
 
-inherit autotools binconfig-disabled pkgconfig gettext multilib_header multilib_script
+inherit autotools binconfig-disabled pkgconfig gettext multilib_header multilib_script ptest
+
+RDEPENDS:${PN}-ptest:append = " make"
 
 MULTILIB_SCRIPTS = "${PN}-dev:${bindir}/gpgrt-config"
 
@@ -35,6 +38,15 @@ do_install:append() {
        oe_multilib_header gpg-error.h gpgrt.h
 }
 
+do_compile_ptest() {
+    oe_runmake -C tests buildtest-TESTS
+}
+
+do_install_ptest() {
+    install ${B}/tests/t-*[!\.o] ${D}${PTEST_PATH}
+    install ${B}/tests/Makefile ${D}${PTEST_PATH}
+}
+
 FILES:${PN}-dev += "${bindir}/gpg-error"
 FILES:${PN}-doc += "${datadir}/libgpg-error/errorref.txt"