diff options
| author | Poonam Jadhav <ppjadhav456@gmail.com> | 2025-06-16 10:22:36 +0530 |
|---|---|---|
| committer | Steve Sakoman <steve@sakoman.com> | 2025-06-20 08:06:30 -0700 |
| commit | 0101023c28ec35db9b73ef4e8fb29a96cf2e17db (patch) | |
| tree | 06ed7c88ef101034583249300f0c478ec4c760b6 | |
| parent | 91d538d055f0847e8e7fcfe3f47d64b2c4e73e6d (diff) | |
| download | poky-0101023c28ec35db9b73ef4e8fb29a96cf2e17db.tar.gz | |
libpng: Improve 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: 5835b803acc255c227213670588dd01c5168c266)
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 | 2 | ||||
| -rw-r--r-- | meta/recipes-multimedia/libpng/files/run-ptest | 26 | ||||
| -rw-r--r-- | meta/recipes-multimedia/libpng/libpng_1.6.39.bb | 43 |
3 files changed, 38 insertions, 33 deletions
diff --git a/meta/conf/distro/include/ptest-packagelists.inc b/meta/conf/distro/include/ptest-packagelists.inc index 5c6a30635f..53c023bb81 100644 --- a/meta/conf/distro/include/ptest-packagelists.inc +++ b/meta/conf/distro/include/ptest-packagelists.inc | |||
| @@ -29,7 +29,6 @@ PTESTS_FAST = "\ | |||
| 29 | libnl-ptest \ | 29 | libnl-ptest \ |
| 30 | libmodule-build-perl-ptest \ | 30 | libmodule-build-perl-ptest \ |
| 31 | libpcre-ptest \ | 31 | libpcre-ptest \ |
| 32 | libpng-ptest \ | ||
| 33 | libssh2-ptest \ | 32 | libssh2-ptest \ |
| 34 | libtimedate-perl-ptest \ | 33 | libtimedate-perl-ptest \ |
| 35 | libtest-needs-perl-ptest \ | 34 | libtest-needs-perl-ptest \ |
| @@ -88,6 +87,7 @@ PTESTS_SLOW = "\ | |||
| 88 | glib-2.0-ptest \ | 87 | glib-2.0-ptest \ |
| 89 | gstreamer1.0-ptest \ | 88 | gstreamer1.0-ptest \ |
| 90 | libevent-ptest \ | 89 | libevent-ptest \ |
| 90 | libpng-ptest \ | ||
| 91 | lttng-tools-ptest \ | 91 | lttng-tools-ptest \ |
| 92 | openssh-ptest \ | 92 | openssh-ptest \ |
| 93 | openssl-ptest \ | 93 | openssl-ptest \ |
diff --git a/meta/recipes-multimedia/libpng/files/run-ptest b/meta/recipes-multimedia/libpng/files/run-ptest index 9ab5d0c1f4..85051a59f5 100644 --- a/meta/recipes-multimedia/libpng/files/run-ptest +++ b/meta/recipes-multimedia/libpng/files/run-ptest | |||
| @@ -2,28 +2,6 @@ | |||
| 2 | 2 | ||
| 3 | set -eux | 3 | set -eux |
| 4 | 4 | ||
| 5 | ./pngfix pngtest.png &> log.txt 2>&1 | 5 | cd src |
| 6 | 6 | ||
| 7 | if grep -i "OK" log.txt 2>&1 ; then | 7 | make check-TESTS |
| 8 | echo "PASS: pngfix passed" | ||
| 9 | else | ||
| 10 | echo "FAIL: pngfix failed" | ||
| 11 | fi | ||
| 12 | rm -f log.txt | ||
| 13 | |||
| 14 | ./pngtest pngtest.png &> log.txt 2>&1 | ||
| 15 | |||
| 16 | if grep -i "PASS" log.txt 2>&1 ; then | ||
| 17 | echo "PASS: pngtest passed" | ||
| 18 | else | ||
| 19 | echo "FAIL: pngtest failed" | ||
| 20 | fi | ||
| 21 | rm -f log.txt | ||
| 22 | |||
| 23 | for i in pngstest timepng; do | ||
| 24 | if "./${i}" pngtest.png 2>&1; then | ||
| 25 | echo "PASS: $i" | ||
| 26 | else | ||
| 27 | echo "FAIL: $i" | ||
| 28 | fi | ||
| 29 | done | ||
diff --git a/meta/recipes-multimedia/libpng/libpng_1.6.39.bb b/meta/recipes-multimedia/libpng/libpng_1.6.39.bb index 94db1d3f6b..011eec94a2 100644 --- a/meta/recipes-multimedia/libpng/libpng_1.6.39.bb +++ b/meta/recipes-multimedia/libpng/libpng_1.6.39.bb | |||
| @@ -13,7 +13,7 @@ LIBV = "16" | |||
| 13 | SRC_URI = "\ | 13 | SRC_URI = "\ |
| 14 | ${SOURCEFORGE_MIRROR}/${BPN}/${BPN}${LIBV}/${BP}.tar.xz \ | 14 | ${SOURCEFORGE_MIRROR}/${BPN}/${BPN}${LIBV}/${BP}.tar.xz \ |
| 15 | file://run-ptest \ | 15 | file://run-ptest \ |
| 16 | " | 16 | " |
| 17 | 17 | ||
| 18 | SRC_URI[sha256sum] = "1f4696ce70b4ee5f85f1e1623dc1229b210029fa4b7aee573df3e2ba7b036937" | 18 | SRC_URI[sha256sum] = "1f4696ce70b4ee5f85f1e1623dc1229b210029fa4b7aee573df3e2ba7b036937" |
| 19 | 19 | ||
| @@ -32,15 +32,42 @@ PACKAGES =+ "${PN}-tools" | |||
| 32 | 32 | ||
| 33 | FILES:${PN}-tools = "${bindir}/png-fix-itxt ${bindir}/pngfix ${bindir}/pngcp" | 33 | FILES:${PN}-tools = "${bindir}/png-fix-itxt ${bindir}/pngfix ${bindir}/pngcp" |
| 34 | 34 | ||
| 35 | BBCLASSEXTEND = "native nativesdk" | ||
| 36 | |||
| 37 | # CVE-2019-17371 is actually a memory leak in gif2png 2.x | 35 | # CVE-2019-17371 is actually a memory leak in gif2png 2.x |
| 38 | CVE_CHECK_IGNORE += "CVE-2019-17371" | 36 | CVE_CHECK_IGNORE += "CVE-2019-17371" |
| 39 | 37 | ||
| 38 | RDEPENDS:${PN}-ptest += "make bash gawk" | ||
| 39 | |||
| 40 | do_install_ptest() { | 40 | do_install_ptest() { |
| 41 | install -m644 "${S}/pngtest.png" "${D}${PTEST_PATH}" | 41 | # Install test scripts to ptest path |
| 42 | install -m755 "${B}/.libs/pngfix" "${D}${PTEST_PATH}" | 42 | install -d ${D}${PTEST_PATH}/src/tests |
| 43 | install -m755 "${B}/.libs/pngtest" "${D}${PTEST_PATH}" | 43 | install -m 755 ${S}/tests/* ${D}${PTEST_PATH}/src/tests |
| 44 | install -m755 "${B}/.libs/pngstest" "${D}${PTEST_PATH}" | 44 | install -m 755 ${S}/test-driver ${D}${PTEST_PATH}/src |
| 45 | install -m755 "${B}/.libs/timepng" "${D}${PTEST_PATH}" | 45 | install -d ${D}${PTEST_PATH}/src/tests/scripts |
| 46 | install -m 755 ${S}/scripts/*.awk ${D}${PTEST_PATH}/src/tests/scripts | ||
| 47 | install -m 644 ${S}/scripts/pnglib* ${S}/scripts/*.c ${S}/scripts/*.def ${S}/scripts/macro.lst ${D}${PTEST_PATH}/src/tests/scripts | ||
| 48 | install -m 644 ${S}/scripts/pnglibconf.h.prebuilt ${D}${PTEST_PATH}/src/tests/scripts/pnglibconf.h | ||
| 49 | install -d ${D}${PTEST_PATH}/src/contrib/tools | ||
| 50 | install -m 755 ${S}/contrib/tools/*.sh ${D}${PTEST_PATH}/src/contrib/tools | ||
| 51 | install -m 644 ${S}/contrib/tools/*.c ${S}/contrib/tools/*.h ${D}${PTEST_PATH}/src/contrib/tools | ||
| 52 | |||
| 53 | # Install .libs directory binaries to ptest path | ||
| 54 | install -m 755 ${B}/.libs/pngtest ${B}/.libs/pngstest ${B}/.libs/pngimage ${B}/.libs/pngunknown ${B}/.libs/pngvalid ${D}${PTEST_PATH}/src | ||
| 55 | |||
| 56 | # Copy png files to ptest path | ||
| 57 | cd ${S} && find contrib -name '*.png' | cpio -pd ${D}${PTEST_PATH}/src | ||
| 58 | |||
| 59 | # Install Makefile and png files | ||
| 60 | install -m 644 ${S}/pngtest.png ${D}${PTEST_PATH}/src | ||
| 61 | 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 | ||
| 62 | |||
| 63 | sed -e 's/^abs_srcdir = ..*/abs_srcdir = \.\./' \ | ||
| 64 | -e 's/^top_srcdir = ..*/top_srcdir = \.\./' \ | ||
| 65 | -e 's/^srcdir = ..*/srcdir = \./' \ | ||
| 66 | -e 's/^Makefile: ..*/Makefile: /' \ | ||
| 67 | -e 's/check-TESTS: $(check_PROGRAMS)/check-TESTS:/g' \ | ||
| 68 | ${B}/Makefile > ${D}${PTEST_PATH}/src/Makefile | ||
| 69 | |||
| 70 | sed -e 's|#!/bin/awk|#!/usr/bin/awk|g' -i ${D}${PTEST_PATH}/src/tests/scripts/*.awk | ||
| 46 | } | 71 | } |
| 72 | |||
| 73 | BBCLASSEXTEND = "native nativesdk" | ||
