From 7ac47c90cc9191abaa70abd9245c3e67248ac74d Mon Sep 17 00:00:00 2001 From: Nikhil R Date: Mon, 10 Jul 2023 16:49:47 +0530 Subject: libpng: Add ptest for libpng 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. (From OE-Core rev: 843803bcc248b18cdefb29d610a1371e32e815ce) Signed-off-by: Nikhil R Signed-off-by: Steve Sakoman --- meta/recipes-multimedia/libpng/files/run-ptest | 29 ++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 meta/recipes-multimedia/libpng/files/run-ptest (limited to 'meta/recipes-multimedia/libpng/files') diff --git a/meta/recipes-multimedia/libpng/files/run-ptest b/meta/recipes-multimedia/libpng/files/run-ptest new file mode 100644 index 0000000000..9ab5d0c1f4 --- /dev/null +++ b/meta/recipes-multimedia/libpng/files/run-ptest @@ -0,0 +1,29 @@ +#!/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 -- cgit v1.2.3-54-g00ecf