Package: netty
Version: 1:3.2.6.Final-1
Severity: normal
Tags: patch
User: [email protected]
Usertags: origin-ubuntu precise ubuntu-patch
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
Dear Maintainer,
In Ubuntu, the attached patch was applied to achieve the following:
* Enable test suite to support Ubuntu MIR (LP: #913878):
- d/build.xml: Add extra targets to compile and execute unit tests.
- d/rules: Add testing dependencies to build classpath.
- d/control: Added junit4 and libeasymock-java to BDI's and ant-optional
to BD's.
* d/orig-tar.sh; Dropped - not used.
It would be grea to get the test suite running in Debian as well.
Thanks for considering the patch.
- -- System Information:
Debian Release: wheezy/sid
APT prefers precise-updates
APT policy: (500, 'precise-updates'), (500, 'precise-security'), (500,
'precise'), (100, 'precise-backports')
Architecture: amd64 (x86_64)
Kernel: Linux 3.2.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)
iQIcBAEBCAAGBQJPKTnfAAoJEL/srsug59jDQBUQAMbLfJFeXA7dOJDAZvybPPtU
qtV1U0hruaiyd+jNcr3UsZmQ2m5sSOPOO4rc60ibOB17+N6X4l/YLjh5kEm2Nj5e
wOdQIcBn5G/IDFa3lNnd8vLJqLYv2OnW6p3yiaTGYb30KT3SBhBJfICFDYiOVHSU
r9Lz+eVbtsunLoyc0h9/E+/EBqylyKYrUhtlaPKZ1bBb9MCWA8OSRzxbSBgmCdpY
MdnhknTdPAUDET8C1x/Od665xNEBjrDjSZc2qanq3BVY9czlX5fYL+hKGi1irac5
GPKttiSg2Pm/v1IYUdXcdZnUVdDmZbJRGZGWGADJnGO2Ey1ZHy5lcyLc7ivAhbYs
unifHKaUQkJhfDBKLQLvTr0P1sjnOf+3Uf2Y2I9n1fLNhQ5MvkwL/AqzbMTpuUtX
dgcLyuM+kyf2XCDZzXDQRHqWuiqNrv4JBPBbqEoe5JzR7kLDeqKt2B3SyW6vsXIq
m64LkBH9bYNdPGkh3YmdddV5aAttaAfmf9tftcYnOft6Z6NMYB2KTMyuv0ehLWVY
IwQT0TXFEymvf88ECuIs78Hxy5n6HU+s1T9DF1/ytzUPkmouvEpW4ttxFjbSFQhE
8ln6LD0GcAoOTOx3+5IMmP5m+GopHuuiy4aKqQzBV/YQdw9GeQ7LkHFLmAIVgJO3
AMaPQGfBN0RiidGyZXLo
=9yW5
-----END PGP SIGNATURE-----
=== modified file 'debian/README.source'
--- debian/README.source 2009-12-17 03:12:31 +0000
+++ debian/README.source 2012-02-01 13:08:08 +0000
@@ -13,3 +13,11 @@
[1] http://www.jboss.org/netty/downloads.html
-- Thierry Carrez <[email protected]> Wed, 26 Aug 2009 15:13:13 +0200
+
+Test Suite Execution
+--------------------
+
+The unit test suite has been enabled based on a) the features built from this
+source package and b) the version of easymock currently avaliable in the archive.
+
+ -- James Page <[email protected]> Tue, 24 Jan 2012 09:02:56 +0000
=== modified file 'debian/build.xml'
--- debian/build.xml 2011-11-23 21:14:19 +0000
+++ debian/build.xml 2012-02-01 13:08:08 +0000
@@ -2,8 +2,12 @@
<project name="pkg-java" default="package" basedir="..">
<property name="build.sourceDirectory" value="src/main/java"/>
+ <property name="build.testSourceDirectory" value="src/test/java"/>
<property name="build.directory" value="build"/>
<property name="build.outputDirectory" value="${build.directory}/classes"/>
+ <property name="build.testOutputDirectory" value="${build.directory}/test-classes"/>
+ <property name="classpath.full.test" value="${build.testOutputDirectory}:${build.outputDirectory}"/>
+ <property name="build.javaVersion" value="1.5"/>
<target name="clean">
<delete dir="${build.directory}"/>
@@ -14,7 +18,7 @@
<javac
destdir="${build.outputDirectory}"
nowarn="true"
- target="1.5"
+ source="${build.javaVersion}" target="${build.javaVersion}"
deprecation="false"
debug="on">
<src path="${build.sourceDirectory}"/>
@@ -26,7 +30,50 @@
</javac>
</target>
- <target name="package" depends="compile">
+ <patternset id="test.sources.exclude">
+ <exclude name="**/ChannelBuffersTest.java"/>
+ <exclude name="**/JdkLoggerTest.java"/>
+ <exclude name="**/InternalLoggerFactoryTest.java"/>
+ <exclude name="**/Log4JLoggerTest.java"/>
+ <exclude name="org/jboss/netty/logging/JBoss*.java"/>
+ <exclude name="org/jboss/netty/handler/codec/protobuf/**"/>
+ <exclude name="**/StackTraceSimplifierTest.java"/>
+ <exclude name="org/jboss/netty/handler/ssl/**"/>
+ <exclude name="**/SwitchableInputStreamTest.java"/>
+ </patternset>
+
+ <target name="test-compile">
+ <mkdir dir="${build.testOutputDirectory}"/>
+ <javac
+ destdir="${build.testOutputDirectory}"
+ classpath="${classpath.full.test}"
+ nowarn="true"
+ source="${build.javaVersion}" target="${build.javaVersion}"
+ debug="on">
+ <src path="${build.testSourceDirectory}"/>
+ <patternset refid="test.sources.exclude"/>
+ </javac>
+ </target>
+
+ <target name="test" depends="test-compile">
+ <mkdir dir="${build.directory}/test-output"/>
+ <junit printsummary="yes" haltonfailure="yes">
+ <sysproperty key="basedir" value="${basedir}"/>
+ <classpath>
+ <pathelement path="${classpath.full.test}"/>
+ </classpath>
+ <formatter type="plain"/>
+ <batchtest todir="${build.directory}/test-output">
+ <fileset dir="${build.testSourceDirectory}">
+ <include name="**/*Test.java"/>
+ <exclude name="**/Abstract*"/>
+ <patternset refid="test.sources.exclude"/>
+ </fileset>
+ </batchtest>
+ </junit>
+ </target>
+
+ <target name="package" depends="compile,test">
<jar jarfile="${build.directory}/${artifactId}-${artifactVersion}.jar"
basedir="${build.outputDirectory}"/>
</target>
=== modified file 'debian/changelog'
=== modified file 'debian/control'
--- debian/control 2011-11-23 21:14:19 +0000
+++ debian/control 2012-02-01 13:09:21 +0000
@@ -7,12 +7,14 @@
Kyo Lee <[email protected]>,
Damien Raude-Morvan <[email protected]>
Build-Depends-Indep: default-jdk,
+ junit4,
libcommons-logging-java,
+ libeasymock-java,
liblog4j1.2-java,
libservlet2.5-java,
libslf4j-java,
maven-repo-helper
-Build-Depends: ant, cdbs (>= 0.4.5.3), debhelper (>= 7)
+Build-Depends: ant, ant-optional, cdbs (>= 0.4.5.3), debhelper (>= 7)
Standards-Version: 3.9.2
Homepage: http://www.jboss.org/netty
Vcs-Svn: svn://svn.debian.org/svn/pkg-eucalyptus/netty/trunk/
=== removed file 'debian/orig-tar.sh'
--- debian/orig-tar.sh 2011-11-23 21:14:19 +0000
+++ debian/orig-tar.sh 1970-01-01 00:00:00 +0000
@@ -1,18 +0,0 @@
-#!/bin/sh -e
-
-# $1 = version
-TAR=../netty_$2.orig.tar.gz
-DIR=libnetty-java-$2.orig
-
-# clean up the upstream tarball
-svn export http://anonsvn.jboss.org/repos/netty/tags/netty-$2/ $DIR
-GZIP=--best tar -c -z -f $TAR $DIR
-rm -rf $DIR
-rm ../netty-$2
-
-# move to directory 'tarballs'
-if [ -r .svn/deb-layout ]; then
- . .svn/deb-layout
- mv $TAR $origDir
- echo "moved $TAR to $origDir"
-fi
=== modified file 'debian/rules'
--- debian/rules 2011-11-23 21:14:19 +0000
+++ debian/rules 2012-02-01 13:08:08 +0000
@@ -8,7 +8,7 @@
DEB_ANT_ARGS := -DartifactVersion=$(DEB_UPSTREAM_VERSION) \
-DartifactId=$(DEB_SOURCE_PACKAGE)
DEB_JARS := commons-logging log4j-1.2 servlet-api-2.5 \
- slf4j-api slf4j-log4j12
+ slf4j-api slf4j-log4j12 junit4 easymock ant-junit4 ant-junit
binary-post-install/lib$(DEB_SOURCE_PACKAGE)-java::
mh_installpoms -plib$(DEB_SOURCE_PACKAGE)-java