You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by se...@apache.org on 2011/02/21 15:12:59 UTC

svn commit: r1072972 - /commons/proper/math/branches/MATH_2_X/build.xml

Author: sebb
Date: Mon Feb 21 14:12:58 2011
New Revision: 1072972

URL: http://svn.apache.org/viewvc?rev=1072972&view=rev
Log:
Update to JUnit 4.8.2
Avoid warnings about includeAntRuntime
Generate text output for unit tests

Modified:
    commons/proper/math/branches/MATH_2_X/build.xml

Modified: commons/proper/math/branches/MATH_2_X/build.xml
URL: http://svn.apache.org/viewvc/commons/proper/math/branches/MATH_2_X/build.xml?rev=1072972&r1=1072971&r2=1072972&view=diff
==============================================================================
--- commons/proper/math/branches/MATH_2_X/build.xml (original)
+++ commons/proper/math/branches/MATH_2_X/build.xml Mon Feb 21 14:12:58 2011
@@ -34,7 +34,7 @@
 
 
   <!-- Junit -->
-  <property name="junit.version"           value="4.4"/>
+  <property name="junit.version"           value="4.8.2"/>
   <property name="junit.home"              value="/usr/share/junit"/>
   <property name="junit.jar"               value="${junit.home}/junit-${junit.version}.jar"/>
 
@@ -72,6 +72,9 @@
   <!-- The base directory for distribution targets -->
   <property name="dist.home"               value="${build.home}/dist"/>
 
+    <!-- The base directory for test reports -->
+    <property name="test.reports"               value="${build.home}/test-reports"/>
+
   <!-- Base file name for dist files -->
   <property name="final.name"        value="${component.name}-${component.version}"/>
 
@@ -155,6 +158,7 @@
              target="${compile.target}"
              debug="${compile.debug}"
        deprecation="${compile.deprecation}"
+ includeantruntime="false"
           optimize="${compile.optimize}">
       <classpath refid="compile.classpath"/>
     </javac>
@@ -169,6 +173,7 @@
              destdir="${build.home}/test-classes"
              debug="${compile.debug}"
              deprecation="${compile.deprecation}"
+             includeantruntime="false"
              optimize="${compile.optimize}">
           <classpath refid="test.classpath"/>
       </javac>
@@ -184,19 +189,20 @@
 
   <target name="test"  depends="compile.tests"
                        description="Run unit tests">
+      <mkdir dir="${test.reports}"/>
       <junit printsummary="true"
                errorProperty="test.failed"
                failureProperty="test.failed"
                fork="true"
                showOutput="true">
-               <formatter usefile="false" type="plain"/>
+               <formatter type="brief"/>
                <classpath refid="test.classpath"/>
                <!-- If test.entry is defined, run a single test, otherwise run all valid tests -->
                <!-- N.B. test.entry must be the full path to the test class, for example:
                ant test -Dtest.entry=org.apache.commons.math.util.FastMathTestPerformance
                -->
-               <test name="${test.entry}" if="test.entry"/>
-               <batchtest unless="test.entry">
+               <test name="${test.entry}" todir="${test.reports}" if="test.entry"/>
+               <batchtest todir="${test.reports}" unless="test.entry">
                    <fileset dir="${test.home}">
                       <include name="**/*Test.java"/> 
                       <include name="**/*TestBinary.java"/>