diff -Nru libhx-3.15/debian/changelog libhx-3.15/debian/changelog --- libhx-3.15/debian/changelog 2013-03-11 13:38:17.000000000 +0530 +++ libhx-3.15/debian/changelog 2013-04-22 11:50:09.000000000 +0530 @@ -1,3 +1,10 @@ +libhx (3.15-2) unstable; urgency=low + + * NMU. + * Add simple autopkgtest to package. + + -- Vibhav Pant Mon, 22 Apr 2013 11:49:29 +0530 + libhx (3.15-1) unstable; urgency=low * New upstream release. diff -Nru libhx-3.15/debian/control libhx-3.15/debian/control --- libhx-3.15/debian/control 2013-02-12 20:16:28.000000000 +0530 +++ libhx-3.15/debian/control 2013-04-22 11:38:42.000000000 +0530 @@ -3,6 +3,7 @@ Maintainer: Bastian Kleineidam Build-Depends: debhelper (>= 9), hardening-wrapper Standards-Version: 3.9.4 +XS-Testsuite: autopkgtest Section: libs Homepage: http://libhx.sourceforge.net/ diff -Nru libhx-3.15/debian/tests/build libhx-3.15/debian/tests/build --- libhx-3.15/debian/tests/build 1970-01-01 05:30:00.000000000 +0530 +++ libhx-3.15/debian/tests/build 2013-04-22 11:46:16.000000000 +0530 @@ -0,0 +1,45 @@ +#!/bin/sh +# autopkgtest check: Build and run a program against libHX, to verify that the +# headers are installed correctly +# (C) 2013 Vibhav Pant +# Author: Vibhav Pant +set -e + +WORKDIR=$(mktemp -d) +trap "rm -rf $WORKDIR" 0 INT QUIT ABRT PIPE TERM +cd $WORKDIR +cat < libHX_test.c +#include +#include +#include +#include +#include + +int main(void) +{ + assert(HX_init() != 0); + struct HXdeque *list = HXdeque_init(); + struct HXdeque_node *node; + int *ptr1 = malloc(sizeof(int)), *ptr2 = malloc(sizeof(int)); + + *ptr1 = 1; + *ptr2 = 2; + assert(HXdeque_push(list, ptr1) != NULL + && HXdeque_push(list, ptr2) != NULL); + + node = list->first; + assert(*(int *)node->ptr == 1); + node = node->next; + assert(*(int *)node->ptr == 2); + HXdeque_genocide(list); + HX_exit(); + + return 0; +} +EOF + +gcc -o libHX_test libHX_test.c -lHX -Wall -Werror +echo "build: OK" +[ -x libHX_test ] +./libHX_test +echo "run: OK" diff -Nru libhx-3.15/debian/tests/control libhx-3.15/debian/tests/control --- libhx-3.15/debian/tests/control 1970-01-01 05:30:00.000000000 +0530 +++ libhx-3.15/debian/tests/control 2013-04-22 11:39:34.000000000 +0530 @@ -0,0 +1,2 @@ +Tests: build +Depends: libhx-dev, build-essential \ No newline at end of file