/[pkg-gnome]/desktop/unstable/gdk-pixbuf/debian/tests/build
ViewVC logotype

Contents of /desktop/unstable/gdk-pixbuf/debian/tests/build

Parent Directory Parent Directory | Revision Log Revision Log


Revision 36260 - (show annotations) (download)
Mon Nov 12 12:30:12 2012 UTC (5 years, 2 months ago) by mpitt
File size: 647 byte(s)
Add debian/tests: Simple compile/link/run autopkgtest. Thanks Rafał
Cieślak! (LP: #1073528)
1 #!/bin/sh
2 # autopkgtest check: Builds a small application against libgdk-pixbuf2.0, checking
3 # if it compiles, links and runs successfully.
4 # Author: Rafał Cieślak <rafalcieslak256@ubuntu.com>
5
6 set -e
7
8 WORKDIR=$(mktemp -d)
9 trap "rm -rf $WORKDIR" 0 INT QUIT ABRT PIPE TERM
10 cd $WORKDIR
11 cat <<EOF > build_test.c
12
13 #include <gdk-pixbuf/gdk-pixbuf.h>
14 int main(){
15 GdkPixbuf *pixbuf = NULL;
16 g_type_init();
17 pixbuf = gdk_pixbuf_new (GDK_COLORSPACE_RGB, TRUE, 8, 50, 180);
18 if(!pixbuf) return 1;
19 return 0;
20 }
21 EOF
22
23 gcc -o build_test build_test.c `pkg-config --cflags --libs gdk-pixbuf-2.0`
24 echo "build: OK"
25 [ -x build_test ]
26 ./build_test
27 echo "run: OK"

  ViewVC Help
Powered by ViewVC 1.1.5