[libparanamer-java] 01/02: Enabled the unit tests

Emmanuel Bourg ebourg-guest at moszumanska.debian.org
Mon May 18 23:55:33 UTC 2015


This is an automated email from the git hooks/post-receive script.

ebourg-guest pushed a commit to branch master
in repository libparanamer-java.

commit 412eff098906c91d6d2a2c470616ade3310dbffe
Author: Emmanuel Bourg <ebourg at apache.org>
Date:   Tue May 19 01:43:54 2015 +0200

    Enabled the unit tests
---
 debian/changelog                                   |  1 +
 debian/control                                     |  2 ++
 debian/maven.ignoreRules                           |  2 --
 debian/maven.properties                            |  2 +-
 debian/maven.rules                                 |  1 +
 debian/patches/01-ignore-javadoc-tests.patch       | 38 ++++++++++++++++++++++
 .../patches/02-ignore-bootstrap-classes-test.patch | 17 ++++++++++
 debian/patches/series                              |  2 ++
 8 files changed, 62 insertions(+), 3 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 5a159d5..a9e37f5 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -6,6 +6,7 @@ libparanamer-java (2.7+repack-1) unstable; urgency=medium
   * Build the paranamer-maven-plugin and package it
     as libparanamer-maven-plugin-java (Closes: #776586)
   * Do not reference the parent POM in the paranamer's POM (Closes: #776583)
+  * Enabled the unit tests (except JavadocParanamerTest)
   * debian/copyright: Credited Timothy Cleaver and Stefan Fleiter
   * Use XZ compression for the upstream tarball
 
diff --git a/debian/control b/debian/control
index 713831a..b1787ec 100644
--- a/debian/control
+++ b/debian/control
@@ -11,6 +11,7 @@ Build-Depends:
 Build-Depends-Indep:
  default-jdk,
  default-jdk-doc,
+ junit4,
  libasm3-java,
  libatinject-jsr330-api-java,
  libmaven-bundle-plugin-java,
@@ -19,6 +20,7 @@ Build-Depends-Indep:
  libmaven-javadoc-plugin-java,
  libmaven-plugin-tools-java,
  libmaven2-core-java,
+ libmockito-java,
  libqdox-java,
  maven
 Standards-Version: 3.9.6
diff --git a/debian/maven.ignoreRules b/debian/maven.ignoreRules
index c646341..be252fb 100644
--- a/debian/maven.ignoreRules
+++ b/debian/maven.ignoreRules
@@ -1,6 +1,5 @@
 
 com.thoughtworks.paranamer paranamer * * javadoc *
-junit junit * * * *
 net.sourceforge.f2j arpack_combined_all * * * *
 org.apache.maven.plugins maven-source-plugin * * * *
 org.apache.maven.plugins maven-surefire-plugin * * * *
@@ -8,4 +7,3 @@ org.apache.maven.plugins maven-surefire-report-plugin * * * *
 org.apache.maven.wagon wagon-webdav * * * *
 org.codehaus.mojo cobertura-maven-plugin * * * *
 org.eclipse.m2e lifecycle-mapping * * * *
-org.mockito mockito-all * * * *
diff --git a/debian/maven.properties b/debian/maven.properties
index e593715..4e30f34 100644
--- a/debian/maven.properties
+++ b/debian/maven.properties
@@ -2,4 +2,4 @@
 # For example:
 # maven.test.skip=true
 
-maven.test.skip=true
+maven.test.skip=false
diff --git a/debian/maven.rules b/debian/maven.rules
index 9ccfb93..be8fc9c 100644
--- a/debian/maven.rules
+++ b/debian/maven.rules
@@ -2,3 +2,4 @@
 junit junit jar s/3\..*/3.x/ * *
 junit junit jar s/4\..*/4.x/ * *
 asm asm * s/3\..*/3.x/ * *
+org.mockito s/mockito-all/mockito-core/ * s/.*/debian/ * *
diff --git a/debian/patches/01-ignore-javadoc-tests.patch b/debian/patches/01-ignore-javadoc-tests.patch
new file mode 100644
index 0000000..0472799
--- /dev/null
+++ b/debian/patches/01-ignore-javadoc-tests.patch
@@ -0,0 +1,38 @@
+Description: Disables JavadocParanamerTest since it requires network connectivity and some resources not available in Debian.
+Author: Emmanuel Bourg <ebourg at pache.org>
+Forwarded: not-needed
+--- a/paranamer/src/test/com/thoughtworks/paranamer/JavadocParanamerTest.java
++++ b/paranamer/src/test/com/thoughtworks/paranamer/JavadocParanamerTest.java
+@@ -33,8 +33,6 @@
+ import org.junit.Before;
+ import org.junit.Ignore;
+ import org.junit.Test;
+-import org.netlib.blas.Dasum;
+-import org.netlib.blas.Dgbmv;
+ 
+ import java.io.File;
+ import java.io.FileFilter;
+@@ -50,6 +48,7 @@
+ /**
+  * @author Samuel Halliday
+  */
++ at Ignore
+ public class JavadocParanamerTest extends AbstractParanamerTestCase {
+ 
+     private static final String JAVADOCS_3 = "http://docs.oracle.com/javase/1.3/docs/api/";
+@@ -157,6 +156,7 @@
+     }
+ 
+     public void f2J(Paranamer p) throws Exception {
++/*
+         testAccessible(p, Dasum.class.getMethod("dasum",
+                 Integer.TYPE, double[].class, Integer.TYPE, Integer.TYPE),
+                 "n", "dx", "_dx_offset", "incx");
+@@ -168,6 +168,7 @@
+                 Integer.TYPE),
+                 "trans", "m", "n", "kl", "ku", "alpha", "a", "_a_offset", "lda",
+                 "x", "_x_offset", "incx", "beta", "y", "_y_offset", "incy");
++*/
+     }
+ 
+     private void testJavaIoFile(String fileOrDirectory) throws Exception {
diff --git a/debian/patches/02-ignore-bootstrap-classes-test.patch b/debian/patches/02-ignore-bootstrap-classes-test.patch
new file mode 100644
index 0000000..129cb2b
--- /dev/null
+++ b/debian/patches/02-ignore-bootstrap-classes-test.patch
@@ -0,0 +1,17 @@
+Description: Ignore the test checking the parameter name of the java.lang.Integer(int)
+ constructor. Unlike Oracle Java 7, OpenJDK 7 as packaged in Debian has LocalVariableTable
+ attributes for the Integer class and causes testRetrievesParameterNamesFromBootstrapClassLoader
+ to fail. The OpenJDK 8 package isn't affected by this issue, so this patch could be
+ removed once openjdk-8-jdk is the default JDK.
+Author: Emmanuel Bourg <ebourg at pache.org>
+Forwarded: not-needed
+--- a/paranamer/src/test/com/thoughtworks/paranamer/BytecodeReadingParanamerTestCase.java
++++ b/paranamer/src/test/com/thoughtworks/paranamer/BytecodeReadingParanamerTestCase.java
+@@ -236,6 +236,7 @@
+     }
+ 
+     @Test
++    @org.junit.Ignore("The java.lang.Integer(int) constructor in openjdk-7 has a parameter name and causes this test to fail.")
+     public void testRetrievesParameterNamesFromBootstrapClassLoader() throws SecurityException, NoSuchMethodException {
+         BytecodeReadingParanamer asm = new BytecodeReadingParanamer();
+         Constructor<?> ctor = Integer.class.getConstructor(int.class);
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..bb8a505
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1,2 @@
+01-ignore-javadoc-tests.patch
+02-ignore-bootstrap-classes-test.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-java/libparanamer-java.git



More information about the pkg-java-commits mailing list