From: Julien Stephan <jstephan@baylibre.com>
To: openembedded-core@lists.openembedded.org
Cc: Julien Stephan <jstephan@baylibre.com>
Subject: [RESEND 1/1] libexif: add ptest support
Date: Thu, 3 Aug 2023 15:29:08 +0200 [thread overview]
Message-ID: <20230803132908.4134002-2-jstephan@baylibre.com> (raw)
In-Reply-To: <20230803132908.4134002-1-jstephan@baylibre.com>
adds ptest support for libexif
Ptest was executed on a core-image-minimal:
root@qemux86-64:~# ptest-runner libexif
START: ptest-runner
2023-07-12T15:45
BEGIN: /usr/lib/libexif/ptest
[...]
i====================
All 13 tests passed
(1 test was not run)
====================
[...]
DURATION: 35
END: /usr/lib/libexif/ptest
2023-07-12T15:45
STOP: ptest-runner
TOTAL: 1 FAIL: 0
Signed-off-by: Julien Stephan <jstephan@baylibre.com>
---
.../distro/include/ptest-packagelists.inc | 1 +
...-serial-tests-config-needed-by-ptest.patch | 26 ++++++++++++++++
.../recipes-support/libexif/libexif/run-ptest | 3 ++
.../recipes-support/libexif/libexif_0.6.24.bb | 30 ++++++++++++++++++-
4 files changed, 59 insertions(+), 1 deletion(-)
create mode 100644 meta/recipes-support/libexif/libexif/0001-Add-serial-tests-config-needed-by-ptest.patch
create mode 100644 meta/recipes-support/libexif/libexif/run-ptest
diff --git a/meta/conf/distro/include/ptest-packagelists.inc b/meta/conf/distro/include/ptest-packagelists.inc
index 6250cf081e0..bbbef5b0431 100644
--- a/meta/conf/distro/include/ptest-packagelists.inc
+++ b/meta/conf/distro/include/ptest-packagelists.inc
@@ -75,6 +75,7 @@ PTESTS_FAST = "\
slang \
wayland \
zlib \
+ libexif \
"
PTESTS_FAST:append:libc-glibc = " glibc-tests"
PTESTS_PROBLEMS:remove:libc-glibc = "glibc-tests"
diff --git a/meta/recipes-support/libexif/libexif/0001-Add-serial-tests-config-needed-by-ptest.patch b/meta/recipes-support/libexif/libexif/0001-Add-serial-tests-config-needed-by-ptest.patch
new file mode 100644
index 00000000000..505aa073309
--- /dev/null
+++ b/meta/recipes-support/libexif/libexif/0001-Add-serial-tests-config-needed-by-ptest.patch
@@ -0,0 +1,26 @@
+From 1ee7217c8ae724d793f9a9876c3608057a2ccbf8 Mon Sep 17 00:00:00 2001
+From: Julien Stephan <jstephan@baylibre.com>
+Date: Tue, 11 Jul 2023 16:07:54 +0200
+Subject: [PATCH] Add serial-tests config needed by ptest
+
+Add serial-tests support, ptest needs it.
+
+Upstream-Status: Inappropriate [oe specific]
+
+Signed-off-by: Julien Stephan <jstephan@baylibre.com>
+---
+ configure.ac | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/configure.ac b/configure.ac
+index cd48047..5413907 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -16,6 +16,7 @@ AM_INIT_AUTOMAKE([
+ dist-zip
+ check-news
+ subdir-objects
++ serial-tests
+ ])
+ AM_MAINTAINER_MODE
+
diff --git a/meta/recipes-support/libexif/libexif/run-ptest b/meta/recipes-support/libexif/libexif/run-ptest
new file mode 100644
index 00000000000..2d23159eb03
--- /dev/null
+++ b/meta/recipes-support/libexif/libexif/run-ptest
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+make -o Makefile runtest-TESTS
diff --git a/meta/recipes-support/libexif/libexif_0.6.24.bb b/meta/recipes-support/libexif/libexif_0.6.24.bb
index 367f012f8cf..27e369a89a5 100644
--- a/meta/recipes-support/libexif/libexif_0.6.24.bb
+++ b/meta/recipes-support/libexif/libexif_0.6.24.bb
@@ -11,12 +11,40 @@ def version_underscore(v):
return "_".join(v.split("."))
SRC_URI = "${GITHUB_BASE_URI}/download/v${PV}/libexif-${PV}.tar.bz2 \
+ file://0001-Add-serial-tests-config-needed-by-ptest.patch \
+ file://run-ptest \
"
SRC_URI[sha256sum] = "d47564c433b733d83b6704c70477e0a4067811d184ec565258ac563d8223f6ae"
-inherit autotools gettext github-releases
+inherit autotools gettext github-releases ptest
EXTRA_OECONF += "--disable-docs"
+do_compile_ptest() {
+ oe_runmake -C test buildtest-TESTS
+}
+
+do_install_ptest() {
+ install ${B}/test/test*[!\.o] ${D}${PTEST_PATH}
+ for f in ${D}${PTEST_PATH}/test*; do
+ sed -i "s/\(LD_LIBRARY_PATH=\).*\(:\$LD_LIBRARY_PATH\)\"/\1.\2/" $f
+ done
+
+ install ${B}/test/Makefile ${D}${PTEST_PATH}
+ sed -i -e "/^srcdir/c srcdir = \$\{PWD\}" ${D}${PTEST_PATH}/Makefile
+
+ install -d ${D}${PTEST_PATH}/nls
+ install ${B}/test/nls/*[!\.o] ${D}${PTEST_PATH}/nls
+ install -d ${D}${PTEST_PATH}/.libs
+ install ${B}/test/.libs/* ${D}${PTEST_PATH}/.libs
+
+ install ${S}/test/*.sh ${D}${PTEST_PATH}
+
+ install -d ${D}${PTEST_PATH}/testdata
+ install ${S}/test/testdata/* ${D}${PTEST_PATH}/testdata
+}
+
+RDEPENDS:${PN}-ptest += "make bash"
+
BBCLASSEXTEND = "native nativesdk"
--
2.41.0
next prev parent reply other threads:[~2023-08-03 13:29 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-03 13:29 [RESEND 0/1] Add ptest support for libexif Julien Stephan
2023-08-03 13:29 ` Julien Stephan [this message]
2023-08-03 13:50 ` [OE-core] [RESEND 1/1] libexif: add ptest support Alexander Kanavin
2023-08-07 13:33 ` Julien Stephan
2023-08-07 13:39 ` Richard Purdie
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230803132908.4134002-2-jstephan@baylibre.com \
--to=jstephan@baylibre.com \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox