[jitsi-dev] [ice4j] r379 committed - Removes test classes from output jar file.


#1

Just noticed that this breaks all the run-xxx test targets so I am
adding the new test dir to the run classpath.

···

On Tue, Feb 11, 2014 at 11:38 AM, <ice4j@googlecode.com> wrote:

Revision: 379
Author: paweldomas@gmail.com
Date: Tue Feb 11 10:38:23 2014 UTC
Log: Removes test classes from output jar file.
http://code.google.com/p/ice4j/source/detail?r=379

Modified:
/trunk/build.xml

=======================================
--- /trunk/build.xml Thu Nov 21 18:55:20 2013 UTC
+++ /trunk/build.xml Tue Feb 11 10:38:23 2014 UTC
@@ -2,6 +2,7 @@

<project name="ice4j" basedir="." default="rebuild">
     <property name="dest" value="classes"/>
+ <property name="dest-test" value="classes-test"/>
     <property name="lib" value="lib"/>
     <property name="JUnit.home" value="${lib}"/>
     <property name="src" value="src"/>
@@ -14,10 +15,14 @@

     <path id="project.class.path">
         <pathelement location="\{dest\}&quot;/&gt; \- &lt;pathelement location=&quot;{JUnit.home}/junit.jar"/>
         <pathelement location="\{lib\}/jain\-sdp\.jar&quot;/&gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;pathelement location=&quot;{lib}/weupnp-0.1.2-SNAPSHOT.jar"/>
     </path>
+ <path id="test.class.path">
+ <path refid="project.class.path" />
+ <pathelement location="\{dest\-test\}&quot;/&gt; \+ &lt;pathelement location=&quot;{JUnit.home}/junit.jar"/>
+ </path>

     <!--Patternset to exclude files from the output directory:-->
     <patternset id="dest.exclude">
@@ -38,6 +43,18 @@
                target="1.5"
                source="1.5">
             <src path="\{src\}&quot;/&gt; \+ &lt;compilerarg value=&quot;\-Xlint&quot;/&gt; \+ &lt;/javac&gt; \+ &lt;/target&gt; \+ &lt;target name=&quot;compile\-test&quot; depends=&quot;init&quot;&gt; \+ &lt;javac classpathref=&quot;test\.class\.path&quot; \+ debug=&quot;true&quot; \+ deprecation=&quot;true&quot; \+ destdir=&quot;{dest-test}"
+ nowarn="false"
+ optimize="true"
+ target="1.5"
+ source="1.5">
             <src path="\{src2\}&quot;/&gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;compilerarg value=&quot;\-Xlint&quot;/&gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/javac&gt; @@ \-88,6 \+105,7 @@ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;target name=&quot;clean&quot;&gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;delete failonerror=&quot;false&quot; includeemptydirs=&quot;true&quot;&gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;fileset dir=&quot;{dest}"/>
+ <fileset dir="\{dest\-test\}&quot;/&gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;fileset dir=&quot;{junit.reports}"/>
             <fileset dir="doc" />
         </delete>
@@ -106,6 +124,7 @@
     <!-- create needed subdirs-->
     <target name="init">
         <mkdir dir="\{dest\}&quot;/&gt; \+ &lt;mkdir dir=&quot;{dest-test}"/>
         <mkdir dir="\{junit\.reports\}&quot;/&gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;mkdir dir=&quot;{junit.html.reports}"/>
     </target>
@@ -134,13 +153,13 @@
     </target>

     <!-- Run the tests-->
- <target name="test">
+ <target name="test" depends="compile-test">
         <junit haltonfailure="true" fork="true" forkmode="once">
             <formatter type="xml"/>
             <formatter type="brief" usefile="false"/>
             <test name="org.ice4j.StunTestSuite" todir="\{junit\.reports\}&quot;/&gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;test name=&quot;org\.ice4j\.PseudoTcpTestSuite&quot; todir=&quot;{junit.reports}"/>
- <classpath refid="project.class.path"/>
+ <classpath refid="test.class.path"/>
         </junit>

         <!-- Generate the html report.

--
Emil Ivov, Ph.D. 67000 Strasbourg,
Project Lead France
Jitsi
emcho@jitsi.org PHONE: +33.1.77.62.43.30
https://jitsi.org FAX: +33.1.77.62.47.31


#2

Hi Emil,

···

On Wed, Feb 12, 2014 at 10:40 PM, Emil Ivov <emcho@jitsi.org> wrote:

Just noticed that this breaks all the run-xxx test targets so I am
adding the new test dir to the run classpath.

Sorry I must have missed it. It should be ok now.

Regards,
Pawel