* [OE-core][PATCH v1] libassuan: add ptest support
@ 2026-02-06 12:17 Pratik Farkase
2026-02-10 19:50 ` [OE-core][PATCH v2] " Pratik Farkase
0 siblings, 1 reply; 2+ messages in thread
From: Pratik Farkase @ 2026-02-06 12:17 UTC (permalink / raw)
To: openembedded-core; +Cc: pratik.farkase, Pratik Farkase
Add ptest support to enable automated testing of libassuan
using ptest-runner.
The implementation installs test programs (version, pipeconnect,
fdpassing) and the shell script test (fdpassing-socket.sh).
All 4 tests pass on qemux86-64:
START: ptest-runner
BEGIN: /usr/lib/libassuan/ptest
PASS: version
Received data `Your lucky number is 3552664958674928. Watch for it everywhere.'
PASS: pipeconnect
PASS: fdpassing
PASS: fdpassing-socket.sh
END: /usr/lib/libassuan/ptest
STOP: ptest-runner
TOTAL: 1 FAIL: 0
Change-Id: I922e1639babf6b949286c769cd1d221168d7318d
Signed-off-by: Pratik Farkase <pratik.farkase@est.tech>
---
.../distro/include/ptest-packagelists.inc | 1 +
.../libassuan/libassuan/run-ptest | 14 +++++++++++
.../libassuan/libassuan_3.0.2.bb | 25 ++++++++++++++++++-
3 files changed, 39 insertions(+), 1 deletion(-)
create mode 100755 meta/recipes-support/libassuan/libassuan/run-ptest
diff --git a/meta/conf/distro/include/ptest-packagelists.inc b/meta/conf/distro/include/ptest-packagelists.inc
index b9616e9bf4..ba4f99c04d 100644
--- a/meta/conf/distro/include/ptest-packagelists.inc
+++ b/meta/conf/distro/include/ptest-packagelists.inc
@@ -28,6 +28,7 @@ PTESTS_FAST = "\
icu \
json-c \
json-glib \
+ libassuan \
libcheck \
libconvert-asn1-perl \
libexif \
diff --git a/meta/recipes-support/libassuan/libassuan/run-ptest b/meta/recipes-support/libassuan/libassuan/run-ptest
new file mode 100755
index 0000000000..ce6f975408
--- /dev/null
+++ b/meta/recipes-support/libassuan/libassuan/run-ptest
@@ -0,0 +1,14 @@
+#!/bin/sh
+
+cd tests
+
+for t in version pipeconnect fdpassing fdpassing-socket.sh; do
+ if [ -x ./$t ]; then
+ ./$t
+ if [ $? -eq 0 ]; then
+ echo "PASS: $t"
+ else
+ echo "FAIL: $t"
+ fi
+ fi
+done
diff --git a/meta/recipes-support/libassuan/libassuan_3.0.2.bb b/meta/recipes-support/libassuan/libassuan_3.0.2.bb
index 0d2ccce989..9333ba1aa2 100644
--- a/meta/recipes-support/libassuan/libassuan_3.0.2.bb
+++ b/meta/recipes-support/libassuan/libassuan_3.0.2.bb
@@ -18,13 +18,14 @@ DEPENDS = "libgpg-error"
UPSTREAM_CHECK_URI = "https://gnupg.org/download/index.html"
SRC_URI = "${GNUPG_MIRROR}/libassuan/libassuan-${PV}.tar.bz2 \
file://libassuan-add-pkgconfig-support.patch \
+ file://run-ptest \
"
SRC_URI[sha256sum] = "d2931cdad266e633510f9970e1a2f346055e351bb19f9b78912475b8074c36f6"
BINCONFIG = "${bindir}/libassuan-config"
-inherit autotools texinfo binconfig-disabled pkgconfig multilib_header
+inherit autotools texinfo binconfig-disabled pkgconfig multilib_header ptest
require recipes-support/gnupg/drop-unknown-suffix.inc
@@ -37,4 +38,26 @@ do_install:append () {
oe_multilib_header assuan.h
}
+do_compile_ptest() {
+ oe_runmake -C tests check TESTS=
+}
+
+do_install_ptest() {
+ install -d ${D}${PTEST_PATH}/tests
+
+ for test in version pipeconnect fdpassing; do
+ if [ -f ${B}/tests/$test ]; then
+ ${B}/libtool --mode=install install -m 0755 ${B}/tests/$test ${D}${PTEST_PATH}/tests/
+ fi
+ done
+
+ if [ -f ${S}/tests/fdpassing-socket.sh ]; then
+ install -m 0755 ${S}/tests/fdpassing-socket.sh ${D}${PTEST_PATH}/tests/
+ fi
+
+ if [ -f ${S}/tests/motd ]; then
+ install -m 0644 ${S}/tests/motd ${D}${PTEST_PATH}/tests/
+ fi
+}
+
BBCLASSEXTEND = "native nativesdk"
--
2.43.0
^ permalink raw reply related [flat|nested] 2+ messages in thread* [OE-core][PATCH v2] libassuan: add ptest support
2026-02-06 12:17 [OE-core][PATCH v1] libassuan: add ptest support Pratik Farkase
@ 2026-02-10 19:50 ` Pratik Farkase
0 siblings, 0 replies; 2+ messages in thread
From: Pratik Farkase @ 2026-02-10 19:50 UTC (permalink / raw)
To: openembedded-core; +Cc: pratik.farkase, Pratik Farkase
Add ptest support to enable automated testing of libassuan
using ptest-runner.
The implementation installs test programs (version, pipeconnect,
fdpassing) and the shell script test (fdpassing-socket.sh).
All 4 tests pass on qemux86-64:
START: ptest-runner
BEGIN: /usr/lib/libassuan/ptest
PASS: version
Received data `Your lucky number is 3552664958674928. Watch for it everywhere.'
PASS: pipeconnect
PASS: fdpassing
PASS: fdpassing-socket.sh
END: /usr/lib/libassuan/ptest
STOP: ptest-runner
TOTAL: 1 FAIL: 0
Signed-off-by: Pratik Farkase <pratik.farkase@est.tech>
---
Changes in v2:
- Remove conditional checks from do_install_ptest()
to avoid hiding test installation failures
- Remove existence checks from run-ptest
---
.../conf/distro/include/ptest-packagelists.inc | 1 +
.../libassuan/libassuan/run-ptest | 12 ++++++++++++
.../libassuan/libassuan_3.0.2.bb | 18 +++++++++++++++++-
3 files changed, 30 insertions(+), 1 deletion(-)
create mode 100755 meta/recipes-support/libassuan/libassuan/run-ptest
diff --git a/meta/conf/distro/include/ptest-packagelists.inc b/meta/conf/distro/include/ptest-packagelists.inc
index b9616e9bf4..ba4f99c04d 100644
--- a/meta/conf/distro/include/ptest-packagelists.inc
+++ b/meta/conf/distro/include/ptest-packagelists.inc
@@ -28,6 +28,7 @@ PTESTS_FAST = "\
icu \
json-c \
json-glib \
+ libassuan \
libcheck \
libconvert-asn1-perl \
libexif \
diff --git a/meta/recipes-support/libassuan/libassuan/run-ptest b/meta/recipes-support/libassuan/libassuan/run-ptest
new file mode 100755
index 0000000000..cbf971e12e
--- /dev/null
+++ b/meta/recipes-support/libassuan/libassuan/run-ptest
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+cd tests
+
+for t in version pipeconnect fdpassing fdpassing-socket.sh; do
+ ./$t
+ if [ $? -eq 0 ]; then
+ echo "PASS: $t"
+ else
+ echo "FAIL: $t"
+ fi
+done
diff --git a/meta/recipes-support/libassuan/libassuan_3.0.2.bb b/meta/recipes-support/libassuan/libassuan_3.0.2.bb
index 0d2ccce989..2ae2fa77cb 100644
--- a/meta/recipes-support/libassuan/libassuan_3.0.2.bb
+++ b/meta/recipes-support/libassuan/libassuan_3.0.2.bb
@@ -18,13 +18,14 @@ DEPENDS = "libgpg-error"
UPSTREAM_CHECK_URI = "https://gnupg.org/download/index.html"
SRC_URI = "${GNUPG_MIRROR}/libassuan/libassuan-${PV}.tar.bz2 \
file://libassuan-add-pkgconfig-support.patch \
+ file://run-ptest \
"
SRC_URI[sha256sum] = "d2931cdad266e633510f9970e1a2f346055e351bb19f9b78912475b8074c36f6"
BINCONFIG = "${bindir}/libassuan-config"
-inherit autotools texinfo binconfig-disabled pkgconfig multilib_header
+inherit autotools texinfo binconfig-disabled pkgconfig multilib_header ptest
require recipes-support/gnupg/drop-unknown-suffix.inc
@@ -37,4 +38,19 @@ do_install:append () {
oe_multilib_header assuan.h
}
+do_compile_ptest() {
+ oe_runmake -C tests check TESTS=
+}
+
+do_install_ptest() {
+ install -d ${D}${PTEST_PATH}/tests
+
+ for test in version pipeconnect fdpassing; do
+ ${B}/libtool --mode=install install -m 0755 ${B}/tests/$test ${D}${PTEST_PATH}/tests/
+ done
+
+ install -m 0755 ${S}/tests/fdpassing-socket.sh ${D}${PTEST_PATH}/tests/
+ install -m 0644 ${S}/tests/motd ${D}${PTEST_PATH}/tests/
+}
+
BBCLASSEXTEND = "native nativesdk"
--
2.43.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-02-10 19:51 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-06 12:17 [OE-core][PATCH v1] libassuan: add ptest support Pratik Farkase
2026-02-10 19:50 ` [OE-core][PATCH v2] " Pratik Farkase
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox