Author: markt Date: Mon Jun 15 14:48:44 2015 New Revision: 1685591 URL: http://svn.apache.org/r1685591 Log: Update the minimum Ant version 1.9.5 and enable parallel running of junit tests
Modified: tomcat/trunk/BUILDING.txt tomcat/trunk/build.properties.default tomcat/trunk/build.xml tomcat/trunk/webapps/docs/changelog.xml Modified: tomcat/trunk/BUILDING.txt URL: http://svn.apache.org/viewvc/tomcat/trunk/BUILDING.txt?rev=1685591&r1=1685590&r2=1685591&view=diff ============================================================================== --- tomcat/trunk/BUILDING.txt (original) +++ tomcat/trunk/BUILDING.txt Mon Jun 15 14:48:44 2015 @@ -64,12 +64,9 @@ source distribution, do the following: into which you installed the JDK release. -(2) Install Apache Ant version 1.9.3 or later on your computer. +(2) Install Apache Ant version 1.9.5 or later on your computer. - Note: Ant 1.9.4 has a regression and cannot be used for Tomcat's - release build (Ant bug 56641). - - 1. If Apache Ant version 1.9.3 or later is already installed on your + 1. If Apache Ant version 1.9.5 or later is already installed on your computer, skip to (3). 2. Download a binary distribution of Ant from: Modified: tomcat/trunk/build.properties.default URL: http://svn.apache.org/viewvc/tomcat/trunk/build.properties.default?rev=1685591&r1=1685590&r2=1685591&view=diff ============================================================================== --- tomcat/trunk/build.properties.default (original) +++ tomcat/trunk/build.properties.default Mon Jun 15 14:48:44 2015 @@ -41,6 +41,12 @@ test.haltonfailure=false # Activate AccessLog during testing test.accesslog=false +# Number of parallel threads to use for testing. The recommended value is one +# thread per core. +# Note: Cobertura code coverage currently requires this to be set to 1. Setting +# a value above one will disable code coverage if enabled. +test.threads=1 + # Note the Cobertura code coverage tool is GPLv2 licensed test.cobertura=false Modified: tomcat/trunk/build.xml URL: http://svn.apache.org/viewvc/tomcat/trunk/build.xml?rev=1685591&r1=1685590&r2=1685591&view=diff ============================================================================== --- tomcat/trunk/build.xml (original) +++ tomcat/trunk/build.xml Mon Jun 15 14:48:44 2015 @@ -1432,7 +1432,8 @@ <junit printsummary="yes" fork="yes" dir="." showoutput="yes" errorproperty="test.result.error" failureproperty="test.result.failure" - haltonfailure="${test.haltonfailure}" > + haltonfailure="${test.haltonfailure}" + threads="${test.threads}" > <jvmarg value="${test.jvmarg.egd}"/> <jvmarg value="-Djava.library.path=${test.apr.loc}"/> @@ -1482,15 +1483,39 @@ </sequential> </macrodef> - <target name="cobertura-disabled" unless="${test.cobertura}"> + <target name="cobertura-init"> + <condition property="cobertura.enabled" value="true"> + <and> + <istrue value="${test.cobertura}"/> + <equals arg1="1" arg2="${test.threads}"/> + </and> + </condition> + <condition property="cobertura.disabled" value="true"> + <and> + <istrue value="${test.cobertura}"/> + <not> + <equals arg1="1" arg2="${test.threads}"/> + </not> + </and> + </condition> + </target> + + <target name="cobertura-disabled" unless="${cobertura.enabled}" + depends="cobertura-init"> <!-- Define classpath used to run tests when Cobertura is turned off. --> <path id="tomcat.test.run.classpath"> <path refid="tomcat.test.classpath" /> </path> </target> - <target name="cobertura-instrument" depends="compile,download-cobertura,cobertura-disabled" - if="${test.cobertura}" + <target name="cobertura-disabled-log" if="${cobertura.disabled}" + depends="cobertura-init"> + <echo message="Code coverage disabled because test.threads is greater than 1"/> + </target> + + <target name="cobertura-instrument" + depends="compile,download-cobertura,cobertura-disabled,cobertura-disabled-log" + if="${cobertura.enabled}" description="Adds Cobertura instrumentation to the compiled bytecode"> <path id="cobertura.classpath"> @@ -1533,7 +1558,7 @@ </path> </target> - <target name="cobertura-report" if="${test.cobertura}" + <target name="cobertura-report" if="${cobertura.enabled}" depends="test-nio,test-nio2,test-apr" description="Creates report from gathered Cobertura results"> Modified: tomcat/trunk/webapps/docs/changelog.xml URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1685591&r1=1685590&r2=1685591&view=diff ============================================================================== --- tomcat/trunk/webapps/docs/changelog.xml (original) +++ tomcat/trunk/webapps/docs/changelog.xml Mon Jun 15 14:48:44 2015 @@ -91,6 +91,15 @@ </fix> </changelog> </subsection> + <subsecrtion name="Other"> + <changelog> + <add> + Support the use of the <code>threads</code> attribute on Ant's + junit task. Note that using this with a value of greater than one will + disbale Cobertura code coverage. (markt) + </add> + </changelog> + </subsecrtion> </section> </body> </document> --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org