diff options
| author | Poonam Jadhav <ppjadhav456@gmail.com> | 2025-06-16 10:06:57 +0530 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2025-06-19 21:54:43 +0100 |
| commit | eb9b83d6c9efec3b6aa70861fedb6ad531963945 (patch) | |
| tree | a2268f2550f98c04345fefb99f23b7551a9b5c2c | |
| parent | 5dff1c40dbde96c77098e7405ada98bb40fe0350 (diff) | |
| download | poky-eb9b83d6c9efec3b6aa70861fedb6ad531963945.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: 8dca5305c950e6a06b3f344ffdbbb7386d802095)
Signed-off-by: Poonam Jadhav <poonam.jadhav@kpit.com>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
| -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.48.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 9cd7928154..e06731ece7 100644 --- a/meta/conf/distro/include/ptest-packagelists.inc +++ b/meta/conf/distro/include/ptest-packagelists.inc | |||
| @@ -108,6 +108,7 @@ PTESTS_SLOW = "\ | |||
| 108 | libevent \ | 108 | libevent \ |
| 109 | libgcrypt \ | 109 | libgcrypt \ |
| 110 | libmodule-build-perl \ | 110 | libmodule-build-perl \ |
| 111 | libpng \ | ||
| 111 | libseccomp \ | 112 | libseccomp \ |
| 112 | lttng-tools \ | 113 | lttng-tools \ |
| 113 | lz4 \ | 114 | lz4 \ |
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.48.bb b/meta/recipes-multimedia/libpng/libpng_1.6.48.bb index 338891c683..e603df1edd 100644 --- a/meta/recipes-multimedia/libpng/libpng_1.6.48.bb +++ b/meta/recipes-multimedia/libpng/libpng_1.6.48.bb | |||
| @@ -10,7 +10,10 @@ DEPENDS = "zlib" | |||
| 10 | 10 | ||
| 11 | LIBV = "16" | 11 | LIBV = "16" |
| 12 | 12 | ||
| 13 | SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${BPN}${LIBV}/${BP}.tar.xz" | 13 | SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${BPN}${LIBV}/${BP}.tar.xz \ |
| 14 | file://run-ptest \ | ||
| 15 | " | ||
| 16 | |||
| 14 | SRC_URI[sha256sum] = "46fd06ff37db1db64c0dc288d78a3f5efd23ad9ac41561193f983e20937ece03" | 17 | SRC_URI[sha256sum] = "46fd06ff37db1db64c0dc288d78a3f5efd23ad9ac41561193f983e20937ece03" |
| 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} | ||
| 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" |
