[gif2png] added %check

ensc ensc at fedoraproject.org
Tue Dec 6 20:48:20 UTC 2011


commit eca2a98dec6859b3af9f66c613463c5071bd061e
Author: Enrico Scholz <enrico.scholz at informatik.tu-chemnitz.de>
Date:   Tue Dec 6 21:46:29 2011 +0100

    added %check

 gif2png.spec |   15 +++++++++++++++
 test-0.gif   |  Bin 0 -> 2802 bytes
 test-1.gif   |  Bin 0 -> 1671 bytes
 3 files changed, 15 insertions(+), 0 deletions(-)
---
diff --git a/gif2png.spec b/gif2png.spec
index fb3691c..e26ed28 100644
--- a/gif2png.spec
+++ b/gif2png.spec
@@ -10,6 +10,8 @@ License:	BSD
 Group:		Applications/Multimedia
 URL:		http://www.catb.org/~esr/gif2png/
 Source0:	http://www.catb.org/~esr/gif2png/%name-%version.tar.gz
+Source100:	test-0.gif
+Source101:	test-1.gif
 Patch0:		gif2png-overflow.patch
 Patch1:		libpng15.patch
 BuildRoot:	%_tmppath/%name-%version-%release-root
@@ -59,6 +61,18 @@ rm -rf $RPM_BUILD_ROOT
 %__make DESTDIR="$RPM_BUILD_ROOT" install
 
 
+%check
+P=./gif2png
+for i in %SOURCE100 %SOURCE101; do
+    rm -f _tmp.gif
+    install -p -m 0644 $i _tmp.gif
+
+    $P _tmp.gif
+    $P -f < "$i" > _tmp.png
+    $P -O -f < "$i" > _tmp.png
+done
+
+
 %clean
 rm -rf $RPM_BUILD_ROOT
 
@@ -79,6 +93,7 @@ rm -rf $RPM_BUILD_ROOT
 %changelog
 * Tue Dec  6 2011 Enrico Scholz <enrico.scholz at informatik.tu-chemnitz.de> - 2.5.4-1700
 - added patch for building with libpng15
+- added %%check
 
 * Tue Dec 06 2011 Adam Jackson <ajax at redhat.com> - 2.5.4-1502
 - Rebuild for new libpng
diff --git a/test-0.gif b/test-0.gif
new file mode 100644
index 0000000..aa591fc
Binary files /dev/null and b/test-0.gif differ
diff --git a/test-1.gif b/test-1.gif
new file mode 100644
index 0000000..921eb60
Binary files /dev/null and b/test-1.gif differ


More information about the scm-commits mailing list