Hi Gregor, thanks a lot for this hint.
On Fri, Sep 26, 2014 at 08:17:06PM +0200, gregor herrmann wrote: > On Fri, 26 Sep 2014 19:01:19 +0200, Andreas Tille wrote: > > > The same is valid for the missing Xserver even if there might be the > > chance to fake a running X server at build time. > > I haven't tried this package, but in general that's as easy as > > - adding xvfb, xauth to Build-Depends(-Indep) > - run the tests under xvfb-run, e.g. with a short dh(1) debian/rules > file like: > > #!/usr/bin/make -f > > %: > dh $@ > > override_dh_auto_test: > xvfb-run -a dh_auto_test > > > (Just as a hint for whoever wants to add back one more test after the > RC bug is fixed.) The attached patch tries to implement what you said and is (in contrast to the DEP3 description which I forgot to adapt) removing only the online test. However, as I just noticed now, the rules file is cdbs based and can not work this way. If anybody wants to translate this to cdbs syntax I'd be happy (alternatively it would be really cool if maven-helper would be translated to dh ;-)). Kind regards Andreas. -- http://fam-tille.de
>From c65575ca4f3d5251badc79a1948b5cb72a90a4a1 Mon Sep 17 00:00:00 2001 From: Andreas Tille <ti...@debian.org> Date: Sat, 27 Sep 2014 00:36:27 +0200 Subject: [PATCH 1/1] Try to fix test problem --- debian/changelog | 3 ++- debian/control | 4 +++- debian/patches/series | 1 + debian/patches/skip_tests.patch | 49 +++++++++++++++++++++++++++++++++++++++++ debian/rules | 8 +++++++ 5 files changed, 63 insertions(+), 2 deletions(-) create mode 100644 debian/patches/skip_tests.patch diff --git a/debian/changelog b/debian/changelog index b927d4e..74afabb 100644 --- a/debian/changelog +++ b/debian/changelog @@ -6,9 +6,10 @@ libitext5-java (5.5.3-1) UNRELEASED; urgency=medium * Moved the package to Git [ Andreas Tille ] + * Team upload * Latest upstream release - -- Andreas Tille <ti...@debian.org> Fri, 26 Sep 2014 09:33:15 +0200 + -- Andreas Tille <ti...@debian.org> Sat, 27 Sep 2014 00:06:38 +0200 libitext5-java (5.5.0-1) unstable; urgency=medium diff --git a/debian/control b/debian/control index b94ccdd..34ce7c0 100644 --- a/debian/control +++ b/debian/control @@ -13,7 +13,9 @@ Build-Depends-Indep: default-jdk-doc, libbcprov-java-doc, libmaven-bundle-plugin-java, libmaven-javadoc-plugin-java, - libxml-security-java (>= 1.5.4) + libxml-security-java (>= 1.5.4), + xvfb, + xauth Standards-Version: 3.9.5 Vcs-Git: git://anonscm.debian.org/pkg-java/libitext5-java.git Vcs-Browser: http://anonscm.debian.org/gitweb/?p=pkg-java/libitext5-java.git diff --git a/debian/patches/series b/debian/patches/series index 12a9653..d544de2 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,2 +1,3 @@ +skip_tests.patch utf8.patch remove-javadoc-page-tracking.patch diff --git a/debian/patches/skip_tests.patch b/debian/patches/skip_tests.patch new file mode 100644 index 0000000..7316b2c --- /dev/null +++ b/debian/patches/skip_tests.patch @@ -0,0 +1,49 @@ +Author: Andreas Tille <ti...@debian.org> +Last-Changed: Fri, 26 Sep 2014 09:33:15 +0200 +Bug-Debian: http://bugs.debian.org/761172 +Description: Skip tests by removing the according test files + RemoteGifImageTest: requires online connection + PdfCopyTest: Requires X server + +--- a/src/test/java/com/itextpdf/text/RemoteGifImageTest.java ++++ /dev/null +@@ -1,39 +0,0 @@ +-package com.itextpdf.text; +- +-import com.itextpdf.text.pdf.PdfWriter; +-import org.junit.Before; +-import org.junit.Test; +- +-import java.io.File; +-import java.io.FileOutputStream; +-import java.io.IOException; +- +-public class RemoteGifImageTest { +- +- private final String[] GIF_LOCATION = { +- "http://itextpdf.com/img/logo.gif", +- "http://itextsupport.com/files/testresources/img/remote_gif_test.gif", +- "./src/test/resources/com/itextpdf/text/Chunk/logo.gif" // non-remote gif +- }; +- +- private final String OUTPUTFOLDER = "./target/com/itextpdf/test/image/"; +- +- @Before +- public void before() { +- new File(OUTPUTFOLDER).mkdirs(); +- } +- +- @Test +- public void remoteGifTest() throws IOException, DocumentException { +- for (int i = 0; i < GIF_LOCATION.length; i++) { +- Document document = new Document(); +- PdfWriter.getInstance(document, new FileOutputStream(OUTPUTFOLDER + "gif_remote[" + i + "].pdf")); +- document.open(); +- +- Image img = Image.getInstance(GIF_LOCATION[i]); +- document.add(img); +- +- document.close(); +- } +- } +-} diff --git a/debian/rules b/debian/rules index 2ec9eb2..e6701ea 100755 --- a/debian/rules +++ b/debian/rules @@ -8,5 +8,13 @@ JAVA_HOME := /usr/lib/jvm/default-java DEB_MAVEN_ARGS = -DgsExec=/usr/bin/gs +override_dh_auto_build: + echo "Now building the package" + xvfb-run -a dh_auto_build + +override_dh_auto_test: + echo "Now running the test" + xvfb-run -a dh_auto_test + get-orig-source: uscan --force-download --download-version $(DEB_UPSTREAM_VERSION) -- 2.1.0