diff options
author | Julien Stephan <jstephan@baylibre.com> | 2023-08-03 15:29:08 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2023-08-10 09:18:54 +0100 |
commit | c610b8dcd9d55ef952e6daf4441e0ca47180dc70 (patch) | |
tree | 2214ac491e89ccf5c45d3667945e73fcfdb8a364 /meta/recipes-support/libexif | |
parent | 524a49f5de9670caa1e5a161bb2163877c75a042 (diff) | |
download | poky-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')
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 @@ | |||
1 | From 1ee7217c8ae724d793f9a9876c3608057a2ccbf8 Mon Sep 17 00:00:00 2001 | ||
2 | From: Julien Stephan <jstephan@baylibre.com> | ||
3 | Date: Tue, 11 Jul 2023 16:07:54 +0200 | ||
4 | Subject: [PATCH] Add serial-tests config needed by ptest | ||
5 | |||
6 | Add serial-tests support, ptest needs it. | ||
7 | |||
8 | Upstream-Status: Inappropriate [oe specific] | ||
9 | |||
10 | Signed-off-by: Julien Stephan <jstephan@baylibre.com> | ||
11 | --- | ||
12 | configure.ac | 1 + | ||
13 | 1 file changed, 1 insertion(+) | ||
14 | |||
15 | diff --git a/configure.ac b/configure.ac | ||
16 | index 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 | |||
3 | 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 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 | ||
13 | SRC_URI = "${GITHUB_BASE_URI}/download/v${PV}/libexif-${PV}.tar.bz2 \ | 13 | SRC_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 | ||
16 | SRC_URI[sha256sum] = "d47564c433b733d83b6704c70477e0a4067811d184ec565258ac563d8223f6ae" | 18 | SRC_URI[sha256sum] = "d47564c433b733d83b6704c70477e0a4067811d184ec565258ac563d8223f6ae" |
17 | 19 | ||
18 | inherit autotools gettext github-releases | 20 | inherit autotools gettext github-releases ptest |
19 | 21 | ||
20 | EXTRA_OECONF += "--disable-docs" | 22 | EXTRA_OECONF += "--disable-docs" |
21 | 23 | ||
24 | do_compile_ptest() { | ||
25 | oe_runmake -C test buildtest-TESTS | ||
26 | } | ||
27 | |||
28 | do_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 | |||
48 | RDEPENDS:${PN}-ptest += "make bash" | ||
49 | |||
22 | BBCLASSEXTEND = "native nativesdk" | 50 | BBCLASSEXTEND = "native nativesdk" |