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

Proposed by Vibhav Pant
Status: Merged
Merged at revision: 8
Proposed branch: lp:~vibhavp/ubuntu/raring/ebook-tools/add-autopkgtest
Merge into: lp:ubuntu/raring/ebook-tools
Diff against target: 77 lines (+44/-0)
4 files modified
debian/changelog (+8/-0)
debian/control (+1/-0)
debian/tests/build (+33/-0)
debian/tests/control (+2/-0)
To merge this branch: bzr merge lp:~vibhavp/ubuntu/raring/ebook-tools/add-autopkgtest
Reviewer Review Type Date Requested Status
Martin Pitt Approve
Review via email: mp+148140@code.launchpad.net
To post a comment you must log in.
9. By Vibhav Pant

* Add simple autopkgtest for package.
   - The epub used here is a basic recast of T.S. Eliot's "The Waste Land"

10. By Vibhav Pant

This epub was obatined from the epub-samples project on Google Code.

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

Note, this comes from http://code.google.com/p/epub-samples/wiki/SamplesListing; on merging this should be added as a comment to debian/tests/build

This still fails with

libepub_test: libepub_test.c:9: main: Assertion `e != ((void *)0)' failed.

investigating...

Revision history for this message
Martin Pitt (pitti) wrote :
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 2012-03-19 21:43:55 +0000
3+++ debian/changelog 2013-02-13 11:27:24 +0000
4@@ -1,3 +1,11 @@
5+ebook-tools (0.2.1-2ubuntu1) raring; urgency=low
6+
7+ * Add simple autopkgtest for package.
8+ - The epub used here is a basic recast of T.S. Eliot's "The Waste Land"
9+ - This epub was obatined from the epub-samples project on Google Code.
10+
11+ -- Vibhav Pant <vibhav@ubuntu.com> Wed, 13 Feb 2013 16:27:59 +0530
12+
13 ebook-tools (0.2.1-2build1) precise; urgency=low
14
15 * No change rebuild for libzip transition
16
17=== modified file 'debian/control'
18--- debian/control 2010-09-15 22:14:33 +0000
19+++ debian/control 2013-02-13 11:27:24 +0000
20@@ -2,6 +2,7 @@
21 Priority: optional
22 Maintainer: Pino Toscano <pino@kde.org>
23 Build-Depends: debhelper (>= 7.0.50~), cmake (>= 2.4.0), libxml2-dev, libzip-dev
24+XS-Testsuite: autopkgtest
25 Standards-Version: 3.9.1
26 Section: libs
27 Homepage: http://sourceforge.net/projects/ebook-tools
28
29=== added directory 'debian/tests'
30=== added file 'debian/tests/build'
31--- debian/tests/build 1970-01-01 00:00:00 +0000
32+++ debian/tests/build 2013-02-13 11:27:24 +0000
33@@ -0,0 +1,33 @@
34+#!/bin/sh
35+# autopkgtest check: Build and run a program against libepub, to verify that
36+# the headers and pkg-config file are installed correctly
37+# (C) 2013 Vibhav Pant
38+# Author: Vibhav Pant <vibhavp@ubuntu.com>
39+
40+set -e
41+
42+WORKDIR=$(mktemp -d)
43+trap "rm -rf $WORKDIR" 0 INT QUIT ABRT PIPE TERM
44+cd $WORKDIR
45+cat <<EOF > libepub_test.c
46+#include <epub.h>
47+#include <stdio.h>
48+#include <assert.h>
49+
50+int main(void)
51+{
52+ struct epub *e;
53+ e = epub_open("debian/tests/sample.epub", 0);
54+ assert(e != NULL);
55+ epub_set_debug(e,1);;
56+ epub_close(e);
57+ epub_cleanup();
58+ return 0;
59+}
60+EOF
61+
62+gcc -o libepub_test libepub_test.c -lepub -Wall -Werror
63+echo "build: OK"
64+[ -x libepub_test ]
65+./libepub_test
66+echo "run: OK"
67
68=== added file 'debian/tests/control'
69--- debian/tests/control 1970-01-01 00:00:00 +0000
70+++ debian/tests/control 2013-02-13 11:27:24 +0000
71@@ -0,0 +1,2 @@
72+Tests: build
73+Depends: libepub-dev, build-essential
74\ No newline at end of file
75
76=== added file 'debian/tests/sample.epub'
77Binary files debian/tests/sample.epub 1970-01-01 00:00:00 +0000 and debian/tests/sample.epub 2013-02-13 11:27:24 +0000 differ

Subscribers

People subscribed via source and target branches

to all changes: