summaryrefslogtreecommitdiffstats
path: root/meta/recipes-support/libexif
diff options
context:
space:
mode:
authorJulien Stephan <jstephan@baylibre.com>2023-08-03 15:29:08 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2023-08-10 09:18:54 +0100
commitc610b8dcd9d55ef952e6daf4441e0ca47180dc70 (patch)
tree2214ac491e89ccf5c45d3667945e73fcfdb8a364 /meta/recipes-support/libexif
parent524a49f5de9670caa1e5a161bb2163877c75a042 (diff)
downloadpoky-c610b8dcd9d55ef952e6daf4441e0ca47180dc70.tar.gz
libexif: add ptest support
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 (From OE-Core rev: 4e2340dfecdfbe22b07161e89de4e25d466820bb) Signed-off-by: Julien Stephan <jstephan@baylibre.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-support/libexif')
-rw-r--r--meta/recipes-support/libexif/libexif/0001-Add-serial-tests-config-needed-by-ptest.patch26
-rw-r--r--meta/recipes-support/libexif/libexif/run-ptest3
-rw-r--r--meta/recipes-support/libexif/libexif_0.6.24.bb30
3 files changed, 58 insertions, 1 deletions
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 0000000000..505aa07330
--- /dev/null
+++ b/meta/recipes-support/libexif/libexif/0001-Add-serial-tests-config-needed-by-ptest.patch
@@ -0,0 +1,26 @@
1From 1ee7217c8ae724d793f9a9876c3608057a2ccbf8 Mon Sep 17 00:00:00 2001
2From: Julien Stephan <jstephan@baylibre.com>
3Date: Tue, 11 Jul 2023 16:07:54 +0200
4Subject: [PATCH] Add serial-tests config needed by ptest
5
6Add serial-tests support, ptest needs it.
7
8Upstream-Status: Inappropriate [oe specific]
9
10Signed-off-by: Julien Stephan <jstephan@baylibre.com>
11---
12 configure.ac | 1 +
13 1 file changed, 1 insertion(+)
14
15diff --git a/configure.ac b/configure.ac
16index cd48047..5413907 100644
17--- a/configure.ac
18+++ b/configure.ac
19@@ -16,6 +16,7 @@ AM_INIT_AUTOMAKE([
20 dist-zip
21 check-news
22 subdir-objects
23+ serial-tests
24 ])
25 AM_MAINTAINER_MODE
26
diff --git a/meta/recipes-support/libexif/libexif/run-ptest b/meta/recipes-support/libexif/libexif/run-ptest
new file mode 100644
index 0000000000..2d23159eb0
--- /dev/null
+++ b/meta/recipes-support/libexif/libexif/run-ptest
@@ -0,0 +1,3 @@
1#!/bin/sh
2
3make -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 367f012f8c..27e369a89a 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):
11 return "_".join(v.split(".")) 11 return "_".join(v.split("."))
12 12
13SRC_URI = "${GITHUB_BASE_URI}/download/v${PV}/libexif-${PV}.tar.bz2 \ 13SRC_URI = "${GITHUB_BASE_URI}/download/v${PV}/libexif-${PV}.tar.bz2 \
14 file://0001-Add-serial-tests-config-needed-by-ptest.patch \
15 file://run-ptest \
14 " 16 "
15 17
16SRC_URI[sha256sum] = "d47564c433b733d83b6704c70477e0a4067811d184ec565258ac563d8223f6ae" 18SRC_URI[sha256sum] = "d47564c433b733d83b6704c70477e0a4067811d184ec565258ac563d8223f6ae"
17 19
18inherit autotools gettext github-releases 20inherit autotools gettext github-releases ptest
19 21
20EXTRA_OECONF += "--disable-docs" 22EXTRA_OECONF += "--disable-docs"
21 23
24do_compile_ptest() {
25 oe_runmake -C test buildtest-TESTS
26}
27
28do_install_ptest() {
29 install ${B}/test/test*[!\.o] ${D}${PTEST_PATH}
30 for f in ${D}${PTEST_PATH}/test*; do
31 sed -i "s/\(LD_LIBRARY_PATH=\).*\(:\$LD_LIBRARY_PATH\)\"/\1.\2/" $f
32 done
33
34 install ${B}/test/Makefile ${D}${PTEST_PATH}
35 sed -i -e "/^srcdir/c srcdir = \$\{PWD\}" ${D}${PTEST_PATH}/Makefile
36
37 install -d ${D}${PTEST_PATH}/nls
38 install ${B}/test/nls/*[!\.o] ${D}${PTEST_PATH}/nls
39 install -d ${D}${PTEST_PATH}/.libs
40 install ${B}/test/.libs/* ${D}${PTEST_PATH}/.libs
41
42 install ${S}/test/*.sh ${D}${PTEST_PATH}
43
44 install -d ${D}${PTEST_PATH}/testdata
45 install ${S}/test/testdata/* ${D}${PTEST_PATH}/testdata
46}
47
48RDEPENDS:${PN}-ptest += "make bash"
49
22BBCLASSEXTEND = "native nativesdk" 50BBCLASSEXTEND = "native nativesdk"