Merge lp:~vibhavp/ubuntu/raring/firestring/add-autopkgtest into lp:ubuntu/raring/firestring

Proposed by Vibhav Pant
Status: Merged
Merged at revision: 6
Proposed branch: lp:~vibhavp/ubuntu/raring/firestring/add-autopkgtest
Merge into: lp:ubuntu/raring/firestring
Diff against target: 82 lines (+50/-1)
4 files modified
debian/changelog (+6/-0)
debian/control (+3/-1)
debian/tests/build (+39/-0)
debian/tests/control (+2/-0)
To merge this branch: bzr merge lp:~vibhavp/ubuntu/raring/firestring/add-autopkgtest
Reviewer Review Type Date Requested Status
Martin Pitt Approve
Review via email: mp+147685@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Martin Pitt (pitti) wrote :

This fails with

$ cat ubtree0t-build-stderr
firestring_test: firestring_test.c:10: test_baselib: Assertion `firestring_estr_base64_encode(&dest, &source) == 0' failed.
Aborted (core dumped)

Any idea? some missing dependency?

review: Needs Fixing
8. By Vibhav Pant

Fix firestring_estr_base64_encode as the estring had no data to be encoded. Print data into the estring by firestring_estr_sprintf.
Fix copyright year

Revision history for this message
Martin Pitt (pitti) wrote :

Merging with fixing dest vs. source hiccup in the test, thanks!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/changelog'
2--- debian/changelog 2007-04-15 15:42:21 +0000
3+++ debian/changelog 2013-02-12 15:25:25 +0000
4@@ -1,3 +1,9 @@
5+firestring (0.9.12-8ubuntu1) raring; urgency=low
6+
7+ * Add simple autopkgtest for package.
8+
9+ -- Vibhav Pant <vibhav@ubuntu.com> Mon, 11 Feb 2013 20:01:21 +0530
10+
11 firestring (0.9.12-8) unstable; urgency=low
12
13 * New maintainer (Closes #407546).
14
15=== modified file 'debian/control'
16--- debian/control 2007-04-15 15:42:21 +0000
17+++ debian/control 2013-02-12 15:25:25 +0000
18@@ -1,8 +1,10 @@
19 Source: firestring
20 Section: libs
21 Priority: optional
22-Maintainer: Herve Rousseau <herve@moulticast.net>
23+Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
24+XSBC-Original-Maintainer: Herve Rousseau <herve@moulticast.net>
25 Build-Depends: debhelper (>= 5), dpatch
26+XS-Testsuite: autopkgtest
27 Standards-Version: 3.7.2
28
29 Package: libfirestring0.9
30
31=== added directory 'debian/tests'
32=== added file 'debian/tests/build'
33--- debian/tests/build 1970-01-01 00:00:00 +0000
34+++ debian/tests/build 2013-02-12 15:25:25 +0000
35@@ -0,0 +1,39 @@
36+#!/bin/sh
37+# autopkgtest check: Build and run a program against firestring, to verify that
38+# the headers and pkg-config file are installed correctly
39+# (C) 2013 Canonical Ltd.
40+# Author: Vibhav Pant <vibhavp@ubuntu.com>
41+
42+set -e
43+
44+WORKDIR=$(mktemp -d)
45+trap "rm -rf $WORKDIR" 0 INT QUIT ABRT PIPE TERM
46+cd $WORKDIR
47+cat <<EOF > firestring_test.c
48+#include <firestring.h>
49+#include <assert.h>
50+#include <stdlib.h>
51+
52+void test_baselib()
53+{
54+ struct firestring_estr_t dest, source;
55+ firestring_estr_alloc(&dest, sizeof(dest));
56+ firestring_estr_alloc(&dest, sizeof(source));
57+ firestring_estr_sprintf(&dest, "autopkgtest");
58+ assert(firestring_estr_base64_encode(&dest, &source) == 0);
59+ void *p = firestring_malloc(sizeof(double));
60+ free(p);
61+}
62+
63+int main(void)
64+{
65+ test_baselib();
66+ return 0;
67+}
68+EOF
69+
70+gcc -o firestring_test firestring_test.c -lfirestring -Werror -Wall
71+echo "build: OK"
72+[ -x firestring_test ]
73+./firestring_test
74+echo "run: OK"
75
76=== added file 'debian/tests/control'
77--- debian/tests/control 1970-01-01 00:00:00 +0000
78+++ debian/tests/control 2013-02-12 15:25:25 +0000
79@@ -0,0 +1,2 @@
80+Tests: build
81+Depends: libfirestring-dev, build-essential
82\ No newline at end of file

Subscribers

People subscribed via source and target branches

to all changes: