On Fri, 3 Jan 2025 at 11:49, Sana Kazi via lists.openembedded.org <sanakazi720=gmail....@lists.openembedded.org> wrote:
> libpng is a platform-independent library which > supports all PNG features. > This ptest executes the below binaries, parses > the png image and prints the image features. > > 1. pngfix - provides information about PNG image > copyrights details. > > 2. pngtest - tests, optimizes and optionally fixes > the zlib header in PNG files. > > 3. pngstest - verifies the integrity of PNG image by > dumping chunk level information. > > 4. timepng - provides details about PNG image chunks. Thanks for working in this. There are more tests provided by libpng, why only these four are picked? E.g. in Makefile.am: if ENABLE_TESTS check_PROGRAMS= pngtest pngunknown pngstest pngvalid pngimage pngcp if HAVE_CLOCK_GETTIME check_PROGRAMS += timepng > +#!/bin/sh > + > +set -eux > + > +./pngfix pngtest.png &> log.txt 2>&1 > + > +if grep -i "OK" log.txt 2>&1 ; then > + echo "PASS: pngfix passed" > +else > + echo "FAIL: pngfix failed" > +fi > +rm -f log.txt > + > +./pngtest pngtest.png &> log.txt 2>&1 > + > +if grep -i "PASS" log.txt 2>&1 ; then > + echo "PASS: pngtest passed" > +else > + echo "FAIL: pngtest failed" > +fi > +rm -f log.txt > + > +for i in pngstest timepng; do > + if "./${i}" pngtest.png 2>&1; then > + echo "PASS: $i" > + else > + echo "FAIL: $i" > + fi > +done There are several problems here: - hardcoding the list of test executables is prone to getting out of date as libpng is updated to newer versions. As pointed above, it is already incomplete. - checking the logs for things like 'OK' is prone to incorrect test results if the test prints OK somewhere unrelated. The correct thing to do is to check the return code. - removing the logs makes investigating failures more difficult All of the above issues can be addressed by installing Makefile from ${B} and running 'make check' from run-ptest. We do this in several other ptests. Alex
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#209345): https://lists.openembedded.org/g/openembedded-core/message/209345 Mute This Topic: https://lists.openembedded.org/mt/110404226/21656 Group Owner: openembedded-core+ow...@lists.openembedded.org Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-