Author: mbenson Date: Thu Jan 29 17:51:26 2009 New Revision: 738939 URL: http://svn.apache.org/viewvc?rev=738939&view=rev Log: formatting; fix junitreport by enabling XML formatter; parameterize junit forking
Modified: commons/proper/collections/branches/collections_jdk5_branch/build.xml Modified: commons/proper/collections/branches/collections_jdk5_branch/build.xml URL: http://svn.apache.org/viewvc/commons/proper/collections/branches/collections_jdk5_branch/build.xml?rev=738939&r1=738938&r2=738939&view=diff ============================================================================== --- commons/proper/collections/branches/collections_jdk5_branch/build.xml (original) +++ commons/proper/collections/branches/collections_jdk5_branch/build.xml Thu Jan 29 17:51:26 2009 @@ -112,6 +112,7 @@ <!-- JUnit --> <property name="test.failonerror" value="true"/> + <property name="test.fork" value="true"/> <!-- Maven --> <property name="maven.repo" value="${user.home}/.maven/repository" /> @@ -307,19 +308,20 @@ description="Run unit tests" /> <path id="build.path"> - <pathelement location="${build.classes}" /> - </path> - <target name="instrument" - depends="compile.tests" - description="Instruments the compiled classes and moves them to the instrumentation directory"> - <emma> - <instr instrpathref="build.path" - destdir="${build.instrumented}" - metadatafile="${build.reports.coverage}/coverage.emma" - merge="true"> - </instr> - </emma> - </target> + <pathelement location="${build.classes}" /> + </path> + + <target name="instrument" + depends="compile.tests" + description="Instruments the compiled classes and moves them to the instrumentation directory"> + <emma> + <instr instrpathref="build.path" + destdir="${build.instrumented}" + metadatafile="${build.reports.coverage}/coverage.emma" + merge="true"> + </instr> + </emma> + </target> <!-- Runs all tests --> <target name="-test-all" depends="instrument" unless="testcase"> @@ -337,8 +339,9 @@ <jvmarg value="-Demma.coverage.out.merge=true" /> <jvmarg value="-Demma.verbosity.level=quiet" /> + <formatter type="xml" /> <formatter type="plain" /> - <batchtest fork="yes" todir="${build.reports.test}"> + <batchtest fork="${test.fork}" todir="${build.reports.test}"> <fileset dir="${source.test}"> <include name="**/Test*.java"/> <exclude name="**/TestAll*.java"/> @@ -348,15 +351,17 @@ <exclude name="**/TestHashMap.java"/> <exclude name="**/TestTreeMap.java"/> <exclude name="**/TestTypedCollection.java"/> + <exclude name="**/TestAnyAllOnePredicate.java"/> + <exclude name="**/TestCompositePredicate.java"/> </fileset> </batchtest> </junit> - <junitreport todir="${build.reports.test}"> - <fileset dir="${build.reports.test}"> - <include name="TEST-*.xml" /> - </fileset> - <report format="frames" todir="${build.reports.test}/html" /> - </junitreport> + <junitreport todir="${build.reports.test}"> + <fileset dir="${build.reports.test}"> + <include name="TEST-*.xml" /> + </fileset> + <report format="frames" todir="${build.reports.test}/html" /> + </junitreport> </target> <!-- Runs a single test --> @@ -369,25 +374,24 @@ <path refid="test.support.path"/> </classpath> - <test name="${testcase}" fork="yes"> + <test name="${testcase}" fork="${test.fork}"> <formatter type="brief" usefile="false" /> </test> </junit> </target> - <target name="coverage.report" - depends="test" - description="Generates the coverage report for the code that has been run"> - <emma> - <report sourcepath="${source.java}"> - <fileset dir="${build.reports.coverage}"> - <include name="*" /> - </fileset> - <html outfile="${build.reports.coverage}/coverage.html" /> - </report> - </emma> - </target> - + <target name="coverage.report" + depends="test" + description="Generates the coverage report for the code that has been run"> + <emma> + <report sourcepath="${source.java}"> + <fileset dir="${build.reports.coverage}"> + <include name="*" /> + </fileset> + <html outfile="${build.reports.coverage}/coverage.html" /> + </report> + </emma> + </target> <!-- ====================================================================== --> @@ -401,7 +405,7 @@ <path refid="test.support.path"/> </classpath> - <batchtest fork="yes"> + <batchtest fork="${test.fork}"> <fileset dir="${source.test}"> <include name="**/TestAllPackages.java"/> </fileset> @@ -420,17 +424,17 @@ <delete dir="${build.docs}"/> <mkdir dir="${build.docs}"/> <javadoc sourcepath="${source.java}" - destdir="${build.docs}" - packagenames="${component.package}.*" - access="${javadoc.access}" - author="true" - version="true" - use="true" - link="${javadoc.links}" - overview="${source.java}/org/apache/commons/collections/overview.html" - doctitle="${component.title} ${component.version} API;" - windowtitle="${component.title} ${component.version} API" - bottom="Copyright &copy; 2001-${year} Apache Software Foundation. All Rights Reserved."> + destdir="${build.docs}" + packagenames="${component.package}.*" + access="${javadoc.access}" + author="true" + version="true" + use="true" + link="${javadoc.links}" + overview="${source.java}/org/apache/commons/collections/overview.html" + doctitle="${component.title} ${component.version} API;" + windowtitle="${component.title} ${component.version} API" + bottom="Copyright &copy; 2001-${year} Apache Software Foundation. All Rights Reserved."> </javadoc> </target> @@ -475,10 +479,10 @@ <delete dir="${tf.build.tf}"/> <mkdir dir="${tf.build.tf}"/> <javac srcdir="${source.test}" - destdir="${tf.build.tf}" - debug="true" - deprecation="false" - optimize="false"> + destdir="${tf.build.tf}" + debug="true" + deprecation="false" + optimize="false"> <patternset refid="tf.patternset.validate" /> <classpath> <path refid="test.support.path"/> @@ -565,8 +569,7 @@ </copy> </target> - <target name="dist.create" depends="jar,testjar,tf.validate,tf.jar,dist.bin,dist.src"> - </target> + <target name="dist.create" depends="jar,testjar,tf.validate,tf.jar,dist.bin,dist.src" /> <target name="dist.bin"> <copy todir="${build.src}">