You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ant.apache.org by jg...@apache.org on 2010/05/14 20:34:51 UTC

svn commit: r944377 - /ant/core/trunk/build.xml

Author: jglick
Date: Fri May 14 18:34:51 2010
New Revision: 944377

URL: http://svn.apache.org/viewvc?rev=944377&view=rev
Log:
Fork JUnit tests by default.
Otherwise two major problems prevent plain old 'ant test' from working:
1. You get NCDFEs, mostly from JUnit framework classes, for most tests.
2. The version tested is `which ant` rather than what is in the source tree,
   resulting in weird failures such as in ConcatTest:
     The <concat> type doesn't support the "overwrite" attribute.

Modified:
    ant/core/trunk/build.xml

Modified: ant/core/trunk/build.xml
URL: http://svn.apache.org/viewvc/ant/core/trunk/build.xml?rev=944377&r1=944376&r2=944377&view=diff
==============================================================================
--- ant/core/trunk/build.xml (original)
+++ ant/core/trunk/build.xml Fri May 14 18:34:51 2010
@@ -104,10 +104,10 @@
   <property name="optimize" value="true"/>
   <property name="javac.target" value="1.4"/>
   <property name="javac.source" value="1.4"/>
-  <property name="junit.fork" value="false"/>
   <property name="junit.filtertrace" value="off"/>
   <property name="junit.summary" value="no"/>
   <property name="test.haltonfailure" value="false"/>
+  <property name="junit.fork" value="true"/>
   <property name="junit.forkmode" value="once"/>
   <property name="expandproperty.files"
             value="**/version.txt,**/defaultManifest.mf"/>
@@ -136,6 +136,8 @@
      -->
     <pathelement location="${src.junit}"/>
     <pathelement location="${tests.etc.dir}"/>
+    <!-- Otherwise many tests fail with "com.sun.tools.javac.Main is not on the classpath.": -->
+    <pathelement location="${java.home}/../lib/tools.jar"/>
   </path>
 
   <!--
@@ -1529,6 +1531,7 @@ see ${build.junit.reports} / ${antunit.r
         <property name="test.junit.vmargs" value=""/>
         <property name="ant.junit.failureCollector"
                   value="${junit.collector.dir}/${junit.collector.class}"/>
+        <!-- XXX includeantruntime="false" does not solve "multiple versions of ant detected in path for junit" warning -->
         <junit printsummary="${junit.summary}"
                haltonfailure="${test.haltonfailure}"
                fork="${junit.fork}"