Package: libcaca
Version: 0.99.beta18-1.1
Followup-For: Bug #701682
User: [email protected]
Usertags: origin-ubuntu utopic ubuntu-patch

Hi Sam,

Please find attached an updated version of this patch, with the addition of
XS-Testsuite to debian/control (and this time, attached to the bug report
instead of just given as a link).

Thanks,
-- 
Steve Langasek                   Give me a lever long enough and a Free OS
Debian Developer                   to set it on, and I can move the world.
Ubuntu Developer                                    http://www.debian.org/
[email protected]                                     [email protected]
=== modified file 'debian/control'
--- debian/control	2014-02-05 15:03:35 +0000
+++ debian/control	2014-05-05 19:08:18 +0000
@@ -7,6 +7,7 @@
 Vcs-Svn: svn://svn.debian.org/sam-hocevar/pkg-misc/unstable/libcaca
 Vcs-Browser: http://svn.debian.org/wsvn/sam-hocevar/pkg-misc/unstable/libcaca/
 Homepage: http://caca.zoy.org/wiki/libcaca
+XS-Testsuite: autopkgtest
 
 Package: libcaca-dev
 Section: libdevel

=== added directory 'debian/tests'
=== added file 'debian/tests/build'
--- debian/tests/build	1970-01-01 00:00:00 +0000
+++ debian/tests/build	2014-02-08 22:10:07 +0000
@@ -0,0 +1,36 @@
+#!/bin/sh
+# autopkgtest check: Build and run a program against libcaca, to verify that 
+# the headers and pkg-config file are installed correctly
+# (C) 2013 Canonical Ltd.
+# Author: Vibhav Pant <[email protected]>
+
+set -e
+
+WORKDIR=$(mktemp -d)
+trap "rm -rf $WORKDIR" 0 INT QUIT ABRT PIPE TERM
+cd $WORKDIR
+cat <<EOF > caca_test.c
+#include <caca.h>
+#include <stdio.h>
+#include <assert.h>
+
+int main(void) 
+{
+	caca_canvas_t *c;
+	printf("Testing libcaca version %s \n", caca_get_version());
+
+	c = caca_create_canvas(20,30);
+	assert(c != NULL);
+
+	assert(caca_free_canvas(c) != -1);
+
+	return 0;
+}
+EOF
+
+gcc -o caca_test caca_test.c `pkg-config --cflags --libs caca` -Wall -Werror
+echo "build: OK"
+[ -x caca_test ]
+export TERM=linux
+./caca_test
+echo "run: OK"

=== added file 'debian/tests/control'
--- debian/tests/control	1970-01-01 00:00:00 +0000
+++ debian/tests/control	2014-02-08 22:10:07 +0000
@@ -0,0 +1,2 @@
+Tests: build
+Depends: libcaca-dev, build-essential, pkg-config
\ No newline at end of file

Reply via email to