summaryrefslogtreecommitdiffstats
path: root/meta/recipes-multimedia/libpng/files
diff options
context:
space:
mode:
authorNikhil R <nikhilar2410@gmail.com>2023-07-10 16:49:47 +0530
committerSteve Sakoman <steve@sakoman.com>2023-07-22 16:24:17 -1000
commit7ac47c90cc9191abaa70abd9245c3e67248ac74d (patch)
treedeb9e0b97e1aa3ee5ae4409c29bdf910d8c64e31 /meta/recipes-multimedia/libpng/files
parent5de95d9c29ecd7cc634f173efa2b4e8a79bcca6d (diff)
downloadpoky-7ac47c90cc9191abaa70abd9245c3e67248ac74d.tar.gz
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 <nikhil.r@kpit.com> Signed-off-by: Steve Sakoman <steve@sakoman.com>
Diffstat (limited to 'meta/recipes-multimedia/libpng/files')
-rw-r--r--meta/recipes-multimedia/libpng/files/run-ptest29
1 files changed, 29 insertions, 0 deletions
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 @@
1#!/bin/sh
2
3set -eux
4
5./pngfix pngtest.png &> log.txt 2>&1
6
7if grep -i "OK" log.txt 2>&1 ; then
8 echo "PASS: pngfix passed"
9else
10 echo "FAIL: pngfix failed"
11fi
12rm -f log.txt
13
14./pngtest pngtest.png &> log.txt 2>&1
15
16if grep -i "PASS" log.txt 2>&1 ; then
17 echo "PASS: pngtest passed"
18else
19 echo "FAIL: pngtest failed"
20fi
21rm -f log.txt
22
23for 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
29done