diff options
author | Poonam Jadhav <ppjadhav456@gmail.com> | 2025-06-16 10:16:04 +0530 |
---|---|---|
committer | Steve Sakoman <steve@sakoman.com> | 2025-06-20 08:38:12 -0700 |
commit | 39f1520cd7bc5cb01f47faa5cc3af50621418cda (patch) | |
tree | 05da5da7abefd7e4e65a868ce848fad91fa6dcdc | |
parent | 6e7a9ff2e1cb7c475b2bd475f823c93f8afec9c7 (diff) | |
download | poky-39f1520cd7bc5cb01f47faa5cc3af50621418cda.tar.gz |
libpng: Add ptest
Install libpng test-suite to run it as a ptest.
As the test-suite takes more than 30 seconds to run,
add libpng-ptest to PTESTS_SLOW in ptest-packagelists.inc
(From OE-Core rev: 1b52b7ebe5f8fb490088622181cdb95e6b7f5a29)
Signed-off-by: Poonam Jadhav <poonam.jadhav@kpit.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
-rw-r--r-- | meta/conf/distro/include/ptest-packagelists.inc | 1 | ||||
-rw-r--r-- | meta/recipes-multimedia/libpng/files/run-ptest | 7 | ||||
-rw-r--r-- | meta/recipes-multimedia/libpng/libpng_1.6.42.bb | 42 |
3 files changed, 48 insertions, 2 deletions
diff --git a/meta/conf/distro/include/ptest-packagelists.inc b/meta/conf/distro/include/ptest-packagelists.inc index 3387e19191..9950e46776 100644 --- a/meta/conf/distro/include/ptest-packagelists.inc +++ b/meta/conf/distro/include/ptest-packagelists.inc | |||
@@ -102,6 +102,7 @@ PTESTS_SLOW = "\ | |||
102 | libevent \ | 102 | libevent \ |
103 | libgcrypt \ | 103 | libgcrypt \ |
104 | libmodule-build-perl \ | 104 | libmodule-build-perl \ |
105 | libpng \ | ||
105 | lttng-tools \ | 106 | lttng-tools \ |
106 | openssh \ | 107 | openssh \ |
107 | openssl \ | 108 | openssl \ |
diff --git a/meta/recipes-multimedia/libpng/files/run-ptest b/meta/recipes-multimedia/libpng/files/run-ptest new file mode 100644 index 0000000000..85051a59f5 --- /dev/null +++ b/meta/recipes-multimedia/libpng/files/run-ptest | |||
@@ -0,0 +1,7 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | set -eux | ||
4 | |||
5 | cd src | ||
6 | |||
7 | make check-TESTS | ||
diff --git a/meta/recipes-multimedia/libpng/libpng_1.6.42.bb b/meta/recipes-multimedia/libpng/libpng_1.6.42.bb index 673133bb4a..4c21e8d597 100644 --- a/meta/recipes-multimedia/libpng/libpng_1.6.42.bb +++ b/meta/recipes-multimedia/libpng/libpng_1.6.42.bb | |||
@@ -10,7 +10,10 @@ DEPENDS = "zlib" | |||
10 | 10 | ||
11 | LIBV = "16" | 11 | LIBV = "16" |
12 | 12 | ||
13 | SRC_URI = "${SOURCEFORGE_MIRROR}/project/${BPN}/${BPN}${LIBV}/${PV}/${BP}.tar.xz" | 13 | SRC_URI = "${SOURCEFORGE_MIRROR}/project/${BPN}/${BPN}${LIBV}/${PV}/${BP}.tar.xz \ |
14 | file://run-ptest \ | ||
15 | " | ||
16 | |||
14 | SRC_URI[sha256sum] = "c919dbc11f4c03b05aba3f8884d8eb7adfe3572ad228af972bb60057bdb48450" | 17 | SRC_URI[sha256sum] = "c919dbc11f4c03b05aba3f8884d8eb7adfe3572ad228af972bb60057bdb48450" |
15 | 18 | ||
16 | MIRRORS += "${SOURCEFORGE_MIRROR}/project/${BPN}/${BPN}${LIBV}/ ${SOURCEFORGE_MIRROR}/project/${BPN}/${BPN}${LIBV}/older-releases/" | 19 | MIRRORS += "${SOURCEFORGE_MIRROR}/project/${BPN}/${BPN}${LIBV}/ ${SOURCEFORGE_MIRROR}/project/${BPN}/${BPN}${LIBV}/older-releases/" |
@@ -19,7 +22,7 @@ UPSTREAM_CHECK_URI = "http://libpng.org/pub/png/libpng.html" | |||
19 | 22 | ||
20 | BINCONFIG = "${bindir}/libpng-config ${bindir}/libpng16-config" | 23 | BINCONFIG = "${bindir}/libpng-config ${bindir}/libpng16-config" |
21 | 24 | ||
22 | inherit autotools binconfig-disabled pkgconfig | 25 | inherit autotools binconfig-disabled pkgconfig ptest |
23 | 26 | ||
24 | # Work around missing symbols | 27 | # Work around missing symbols |
25 | ARMNEON = "${@bb.utils.contains("TUNE_FEATURES", "neon", "--enable-arm-neon=on", "--enable-arm-neon=off", d)}" | 28 | ARMNEON = "${@bb.utils.contains("TUNE_FEATURES", "neon", "--enable-arm-neon=on", "--enable-arm-neon=off", d)}" |
@@ -30,4 +33,39 @@ PACKAGES =+ "${PN}-tools" | |||
30 | 33 | ||
31 | FILES:${PN}-tools = "${bindir}/png-fix-itxt ${bindir}/pngfix ${bindir}/pngcp" | 34 | FILES:${PN}-tools = "${bindir}/png-fix-itxt ${bindir}/pngfix ${bindir}/pngcp" |
32 | 35 | ||
36 | RDEPENDS:${PN}-ptest += "make bash gawk" | ||
37 | |||
38 | do_install_ptest() { | ||
39 | # Install test scripts to ptest path | ||
40 | install -d ${D}${PTEST_PATH}/src/tests | ||
41 | install -m 755 ${S}/tests/* ${D}${PTEST_PATH}/src/tests | ||
42 | install -m 755 ${S}/test-driver ${D}${PTEST_PATH}/src | ||
43 | install -d ${D}${PTEST_PATH}/src/tests/scripts | ||
44 | install -m 755 ${S}/scripts/*.awk ${D}${PTEST_PATH}/src/tests/scripts | ||
45 | install -m 644 ${S}/scripts/pnglib* ${S}/scripts/*.c ${S}/scripts/*.def ${S}/scripts/macro.lst ${D}${PTEST_PATH}/src/tests/scripts | ||
46 | install -m 644 ${S}/scripts/pnglibconf.h.prebuilt ${D}${PTEST_PATH}/src/tests/scripts/pnglibconf.h | ||
47 | install -d ${D}${PTEST_PATH}/src/contrib/tools | ||
48 | install -m 755 ${S}/contrib/tools/*.sh ${D}${PTEST_PATH}/src/contrib/tools | ||
49 | install -m 644 ${S}/contrib/tools/*.c ${S}/contrib/tools/*.h ${D}${PTEST_PATH}/src/contrib/tools | ||
50 | |||
51 | # Install .libs directory binaries to ptest path | ||
52 | install -m 755 ${B}/.libs/pngtest ${B}/.libs/pngstest ${B}/.libs/pngimage ${B}/.libs/pngunknown ${B}/.libs/pngvalid ${D}${PTEST_PATH}/src | ||
53 | |||
54 | # Copy png files to ptest path | ||
55 | cd ${S} && find contrib -name '*.png' | cpio -pd ${D}${PTEST_PATH}/src | ||
56 | |||
57 | # Install Makefile and png files | ||
58 | install -m 644 ${S}/pngtest.png ${D}${PTEST_PATH}/src | ||
59 | install -m 644 ${S}/*.png ${S}/*.h ${S}/*.c ${S}/*.dfa ${B}/pnglibconf.out ${S}/Makefile.am ${S}/Makefile.in ${D}${PTEST_PATH}/src/tests | ||
60 | |||
61 | sed -e 's/^abs_srcdir = ..*/abs_srcdir = \.\./' \ | ||
62 | -e 's/^top_srcdir = ..*/top_srcdir = \.\./' \ | ||
63 | -e 's/^srcdir = ..*/srcdir = \./' \ | ||
64 | -e 's/^Makefile: ..*/Makefile: /' \ | ||
65 | -e 's/check-TESTS: $(check_PROGRAMS)/check-TESTS:/g' \ | ||
66 | ${B}/Makefile > ${D}${PTEST_PATH}/src/Makefile | ||
67 | |||
68 | sed -e 's|#!/bin/awk|#!/usr/bin/awk|g' -i ${D}${PTEST_PATH}/src/tests/scripts/*.awk | ||
69 | } | ||
70 | |||
33 | BBCLASSEXTEND = "native nativesdk" | 71 | BBCLASSEXTEND = "native nativesdk" |