gnutls: add ptest support
PATCH v2 1/1 gnutls: add ptest support
Add gnutls unit-tests into ptest. Only self-contained tests (no external file system dependencies) are included.
Some tests have been put in a disallow list in the run-ptest; these tests either require additional files (certificates) or environment setup prior to being run, via wrapper shell script. As autotools packages are built out-of-tree, it is cumbersome to add additional files. With regards to tests requiring wrapper scripts, it is possible to add logic to run these tests under run-ptests but that will require more effort to maintain, hence skipped.
Verified via:
$ runqemu qemux86-64 kvm nographic serial qemuparams='-m 4096 -smp 32' root@qemux86-64:~# ptest-runner gnutls START: ptest-runner BEGIN: /usr/lib64/gnutls/ptest PASS: aead-cipher-vec PASS: alerts PASS: anti_replay ... gnutls test summary: -------------------- total: 375 pass : 364 fail : 0 skip : 11
DURATION: 184
END: /usr/lib64/gnutls/ptest
2023-02-01T13:55
STOP: ptest-runner
TOTAL: 1 FAIL: 0
--- .../distro/include/ptest-packagelists.inc | 1 + .../gnutls/gnutls/Add-ptest-support.patch | 60 +++++++++++++ meta/recipes-support/gnutls/gnutls/run-ptest | 90 +++++++++++++++++++ meta/recipes-support/gnutls/gnutls_3.7.8.bb | 8 +- 4 files changed, 158 insertions(+), 1 deletion(-) create mode 100644 meta/recipes-support/gnutls/gnutls/Add-ptest-support.patch create mode 100644 meta/recipes-support/gnutls/gnutls/run-ptest
meta/conf/distro/include/ptest-packagelists.inc +1 -0
@@ -88,6 +88,7 @@ PTESTS_SLOW = "\ elfutils-ptest \ gettext-ptest \ glib-2.0-ptest \ + gnutls-ptest \ gstreamer1.0-ptest \ libevent-ptest \ libgcrypt-ptest \
meta/recipes-support/gnutls/gnutls/Add-ptest-support.patch new file +60 -0
60 lines not on this page · raw message
meta/recipes-support/gnutls/gnutls/run-ptest new file +90 -0
90 lines not on this page · raw message
meta/recipes-support/gnutls/gnutls_3.7.8.bb +7 -1
@@ -22,11 +22,13 @@ SHRT_VER = "${@d.getVar('PV').split('.')[0]}.${@d.getVar('PV').split('.')[1]}" SRC_URI = "https://www.gnupg.org/ftp/gcrypt/gnutls/v${SHRT_VER}/gnutls-${PV}.tar.xz \ file://arm_eabi.patch \ file://0001-Creating-.hmac-file-should-be-excuted-in-target-envi.patch \ + file://run-ptest \ + file://Add-ptest-support.patch \ " SRC_URI[sha256sum] = "c58ad39af0670efe6a8aee5e3a8b2331a1200418b64b7c51977fb396d4617114" -inherit autotools texinfo pkgconfig gettext lib_package gtk-doc +inherit autotools texinfo pkgconfig gettext lib_package gtk-doc ptest PACKAGECONFIG ??= "libidn ${@bb.utils.filter('DISTRO_FEATURES', 'seccomp', d)}"
@@ -68,6 +70,10 @@ do_install:append:class-target() { fi } +do_compile:append() { + oe_runmake ${PARALLEL_MAKE} -C tests buildtest-TESTS +} + PACKAGES =+ "${PN}-openssl ${PN}-xx ${PN}-fips" FILES:${PN}-dev += "${bindir}/gnutls-cli-debug"
Signature · 1 line
2.39.0