Bug#646090: libcommons-compress-java: Enablement of JUnit test suite
James Page
james.page at ubuntu.com
Fri Oct 21 08:32:00 UTC 2011
Package: libcommons-compress-java
Version: 1.2-1
Severity: normal
Tags: patch
User: ubuntu-devel at lists.ubuntu.com
Usertags: origin-ubuntu precise ubuntu-patch
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
In Ubuntu, the attached patch was applied to achieve the following:
* Updates to support Ubuntu MIR (LP: #876413):
- d/build.xml: Provide targets to compile and execute test suite.
- d/control: Add B-D's on junit and ant-optional to support testing.
- d/rules: Add ant-junit and junit to DEB_JARS for testing.
* d/control: Bumped Standards-Version: 3.9.2, no changes.
* d/copyright: Updated for revised field names.
Thanks for considering the patch.
- -- System Information:
Debian Release: wheezy/sid
APT prefers oneiric-updates
APT policy: (500, 'oneiric-updates'), (500, 'oneiric-security'), (500, 'oneiric-proposed'), (500, 'oneiric')
Architecture: amd64 (x86_64)
Kernel: Linux 3.0.0-12-generic (SMP w/8 CPU cores)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
iQIcBAEBCAAGBQJOoS3/AAoJEL/srsug59jDRGYP/2nQRXW2RJ6/Uhrh+NF3lJ6p
aLEHeZp4ZAVuC1GM/vmBhorZMmKGJhA0Oq0GGpOObBRXYV1dqkHpqKPQ9MvYgpUN
80Bt79nwpkzMiZGavuO9GkII0Z97/oMjrqM3+1rBD40FBY1u7vhgLfbiimBAhKCY
oWHN0srxGlN0dKP2yOqzI6x9OF9Upwdnx5onfuSUAtgF6Xm6tD3m12cl870TKJLO
ViOsFHRwB8hPrshXO1iJYYjqn5nZ0n05mdQs7Kgct4xqTiploLXtYk5P/ubtQspV
3emWKSTwSAHb1+suAWtLyBxfGuSKjjrfnKOy7fo/YxSjUolkFqO1nLkHxHelrRCI
0aWF4ScWCaMUl/7zYnEH49rO5OsOyjFyMwYjRqyDUGgHfZ2S6XDwsQr5pdOZemda
BAMmi+83EN/iiye/6ww1luPeXVcpEwxCRSB4RMybwwrOzuuyWvD3f4YT+QEhlT9a
76ysrVJ+1rKLdpJHIqWofb5Z1awennpA+kp9VtTaIENiBXLjzAzH41EAx8lZNl9z
0OIxTntOqW9mqchZhZo5zpU+KscQ5IGTqU3NNfMeApdIDmraXDuPhtnXNz0N+tFl
3WBk5FnG0cjE7j/ka/NCPFwwEf1IUFa0XUx0t9w822WJQg1bNPho4TgaMl6gn8N/
b70ldG76LREVTReBY/iY
=aT1N
-----END PGP SIGNATURE-----
-------------- next part --------------
=== modified file 'debian/ant.properties'
--- debian/ant.properties 2009-09-20 11:16:42 +0000
+++ debian/ant.properties 2011-10-21 08:30:20 +0000
@@ -2,3 +2,8 @@
class.dir=build
source.dir=src/main/java
jar=commons-compress.jar
+test.dir=test
+test.class.dir=${test.dir}/build
+test.source.dir=src/test/java
+test.res.dir=src/test/resources
+test.results.dir=${test.dir}/results
=== modified file 'debian/build.xml'
--- debian/build.xml 2007-12-17 15:17:09 +0000
+++ debian/build.xml 2011-10-21 08:30:20 +0000
@@ -1,9 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
-<project default="jar" name="${project.name}" basedir="..">
+<project default="package" name="${project.name}" basedir="..">
<target name="clean">
<delete dir="${class.dir}" quiet="true"/>
+ <delete dir="${test.dir}" quiet="true"/>
</target>
<target name="compile" description="o Compile the source files">
@@ -12,6 +13,42 @@
debug="true" source="1.5"/>
</target>
+ <target name="test-compile" description="o Compile the test source files" depends="compile">
+ <mkdir dir="${test.class.dir}"/>
+ <javac srcdir="${test.source.dir}" destdir="${test.class.dir}"
+ debug="true" source="1.5" encoding="ISO-8859-1">
+ <classpath>
+ <pathelement location="${class.dir}"/>
+ <pathelement path="${java.class.path}"/>
+ </classpath>
+ </javac>
+ <copy todir="${test.class.dir}">
+ <fileset dir="${test.res.dir}">
+ <exclude name="**/*.java"/>
+ </fileset>
+ </copy>
+ </target>
+
+ <target name="test" depends="test-compile">
+ <mkdir dir="${test.results.dir}"/>
+ <junit printsummary="yes" haltonfailure="yes">
+ <classpath>
+ <pathelement location="${class.dir}"/>
+ <pathelement location="${test.class.dir}"/>
+ <pathelement path="${java.class.path}"/>
+ </classpath>
+ <formatter type="plain"/>
+ <batchtest todir="${test.results.dir}">
+ <fileset dir="${test.source.dir}">
+ <include name="**/*TestCase.java"/>
+ <include name="**/*Test.java"/>
+ <exclude name="**/*$*"/>
+ <exclude name="**/Abstract*"/>
+ </fileset>
+ </batchtest>
+ </junit>
+ </target>
+
<target name="jar" description="o Create the jar" depends="compile">
<jar jarfile="${jar}">
<fileset dir="${class.dir}">
@@ -20,4 +57,6 @@
</jar>
</target>
+ <target name="package" depends="test,jar"/>
+
</project>
=== modified file 'debian/changelog'
=== modified file 'debian/control'
--- debian/control 2011-08-07 01:56:15 +0000
+++ debian/control 2011-10-21 08:30:35 +0000
@@ -3,8 +3,14 @@
Priority: optional
Maintainer: Debian Java Maintainers <pkg-java-maintainers at lists.alioth.debian.org>
Uploaders: Torsten Werner <twerner at debian.org>
-Build-Depends: ant, cdbs, debhelper (>= 5), default-jdk, maven-repo-helper
-Standards-Version: 3.8.3
+Build-Depends: ant,
+ ant-optional,
+ cdbs,
+ debhelper (>= 5),
+ default-jdk,
+ junit,
+ maven-repo-helper
+Standards-Version: 3.9.2
Homepage: http://commons.apache.org/compress/
Vcs-Browser: http://svn.debian.org/wsvn/pkg-java/trunk/libcommons-compress-java/
Vcs-Svn: svn://svn.debian.org/pkg-java/trunk/libcommons-compress-java
=== modified file 'debian/copyright'
--- debian/copyright 2009-09-20 11:16:42 +0000
+++ debian/copyright 2011-10-21 08:30:20 +0000
@@ -1,8 +1,9 @@
-Format-Specification: http://dep.debian.net/deps/dep5/
-Name: Apache Commons Compress
-Maintainer: The Apache Software Foundation.
+Format: http://dep.debian.net/deps/dep5/
+Upstream-Name: Apache Commons Compress
+Upstream-Contact: The Apache Software Foundation.
Source: http://commons.apache.org/compress/
+Files: *
Copyright: 2001-2009, The Apache Software Foundation.
License: Apache-2.0
@@ -13,4 +14,3 @@
License: Apache-2.0
On Debian GNU/Linux system you can find the complete text of the
license in '/usr/share/common-licenses/Apache-2.0'
-
=== modified file 'debian/rules'
--- debian/rules 2009-09-20 11:16:42 +0000
+++ debian/rules 2011-10-21 08:30:20 +0000
@@ -5,6 +5,7 @@
JAVA_HOME := /usr/lib/jvm/default-java
DEB_ANT_BUILDFILE := debian/build.xml
+DEB_JARS := ant-junit junit
PACKAGE := commons-compress
install/lib$(PACKAGE)-java::
More information about the pkg-java-maintainers
mailing list