Package: libpng Version: 1.2.49-1 Tags: patch User: ubuntu-de...@lists.ubuntu.com Usertags: origin-ubuntu ubuntu-patch raring
Hello, in Ubuntu Rafał Cieślak contributed an autopkgtest [1] test to libpng to run a simple compile/link/run test. This ensures that the -dev package installs a working pkg-config file, header files into the correct place, pulls in the right dependencies, etc. autopkgtest/DEP-8 have been a Debian standard for quite some time, but now folks are discussing to actually deploy the tests on Debian as well [2] so that they eventually get run on Debian's Jenkins [3]. So please consider adding the tests to Debian as well. These are mission-critical infrastructure in Ubuntu now, so we'll ensure that they keep working (and sending patches as appropriate). Thanks for considering, Martin [1] http://dep.debian.net/deps/dep8/ [2] http://lists.alioth.debian.org/pipermail/autopkgtest-devel/2012-November/000256.html [3] http://jenkins.debian.net/ -- Martin Pitt | http://www.piware.de Ubuntu Developer (www.ubuntu.com) | Debian Developer (www.debian.org)
diff -Nru libpng-1.2.49/debian/changelog libpng-1.2.49/debian/changelog --- libpng-1.2.49/debian/changelog 2012-05-24 16:14:45.000000000 +0200 +++ libpng-1.2.49/debian/changelog 2012-11-12 14:00:19.000000000 +0100 @@ -1,3 +1,9 @@ +libpng (1.2.49-1ubuntu2) raring; urgency=low + + * Add debian/tests: Simple compile/link/run autopkgtest. (LP: #1073538) + + -- Rafał Cieślak <rafalcieslak...@ubuntu.com> Wed, 31 Oct 2012 16:43:53 +0100 + libpng (1.2.49-1ubuntu1) quantal; urgency=low * Merge from Debian unstable. Remaining changes: diff -Nru libpng-1.2.49/debian/control libpng-1.2.49/debian/control --- libpng-1.2.49/debian/control 2012-05-24 16:15:36.000000000 +0200 +++ libpng-1.2.49/debian/control 2012-11-12 13:59:50.000000000 +0100 @@ -30,6 +30,7 @@ Conflicts: libpng2-dev, libpng-dev, libpng12-0-dev, libpng2 (<< 1.0.12-3) Provides: libpng-dev, libpng12-0-dev, libpng3-dev Replaces: libpng3-dev (<= 1.2.5), libpng12-0-dev +XS-Testsuite: autopkgtest Description: PNG library - development libpng is a library implementing an interface for reading and writing PNG (Portable Network Graphics) format files. diff -Nru libpng-1.2.49/debian/tests/build libpng-1.2.49/debian/tests/build --- libpng-1.2.49/debian/tests/build 1970-01-01 01:00:00.000000000 +0100 +++ libpng-1.2.49/debian/tests/build 2012-11-12 13:59:50.000000000 +0100 @@ -0,0 +1,25 @@ +#!/bin/sh +# autopkgtest check: Builds a small application against libpng, checking +# if it compiles, links and runs successfully. +# Author: Rafał Cieślak <rafalcieslak...@ubuntu.com> + +set -e + +WORKDIR=$(mktemp -d) +trap "rm -rf $WORKDIR" 0 INT QUIT ABRT PIPE TERM +cd $WORKDIR +cat <<EOF > build_test.c +#include <png.h> +int main(int argc, char** argv) { + png_structp png_ptr = NULL; + //Just creating a simple wrie struct. + png_ptr = png_create_write_struct (PNG_LIBPNG_VER_STRING, NULL, NULL, NULL); + if(!png_ptr) return 1; + return 0; +} +EOF +gcc -o build_test build_test.c -lpng +echo "build: OK" +[ -x build_test ] +./build_test +echo "run: OK" diff -Nru libpng-1.2.49/debian/tests/control libpng-1.2.49/debian/tests/control --- libpng-1.2.49/debian/tests/control 1970-01-01 01:00:00.000000000 +0100 +++ libpng-1.2.49/debian/tests/control 2012-11-12 13:59:50.000000000 +0100 @@ -0,0 +1,2 @@ +Tests: build +Depends: build-essential, libpng12-dev