Added property that can be used to turn on the junit test XML formatter, so you can actually create junit test HTMLs with the results

git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@4847 51baf565-9d33-0410-a72c-fc3788e3496d
This commit is contained in:
Wouter Zelle
2006-11-30 21:05:40 +00:00
parent 130d959688
commit d423cce0f4

View File

@ -9,6 +9,9 @@
<property name="dir.regress" value="regress\" /> <property name="dir.regress" value="regress\" />
<property name="version" value="3.8" /> <property name="version" value="3.8" />
<property name="keystore" value="${keystore.path}" /> <property name="keystore" value="${keystore.path}" />
<!--Settings-->
<property name="outputTestResultsToFile" value="false" />
<path id="dependencies.path"> <path id="dependencies.path">
<pathelement location="${dir.build}" /> <pathelement location="${dir.build}" />
@ -91,7 +94,11 @@
</target> </target>
<target name="test" depends="requires-junit,compile,copy" description="Runs the unit tests"> <target name="test" depends="requires-junit,compile,copy" description="Runs the unit tests">
<junit printsummary="yes" haltonfailure="no" forkmode="perBatch"> <condition property="testResultsToFile">
<istrue value="${outputTestResultsToFile}"/>
</condition>
<junit printsummary="yes" haltonfailure="no" forkmode="perBatch">
<classpath> <classpath>
<path refid="dependencies.path" /> <path refid="dependencies.path" />
</classpath> </classpath>
@ -100,6 +107,8 @@
<include name="test/**/*Test.java" /> <include name="test/**/*Test.java" />
</fileset> </fileset>
</batchtest> </batchtest>
<formatter type="xml" if="testResultsToFile"/>
</junit> </junit>
<junitreport todir="${dir.build}"> <junitreport todir="${dir.build}">
<fileset dir="${dir.build}"> <fileset dir="${dir.build}">