Add Clover instrumentation.

This commit is contained in:
Ben Alex 2004-03-23 02:07:59 +00:00
parent ac45efedac
commit 4cef58a290
2 changed files with 83 additions and 0 deletions

View File

@ -48,6 +48,7 @@
<delete dir="${target.junit.reports.dir}"/>
<delete dir="${target.otherclasses.dir}"/>
<delete dir="${target.release.dir}"/>
<delete dir="${target.clover.dir}"/>
<delete dir="${target.testclasses.dir}"/>
</target>
@ -350,6 +351,81 @@
</target>
<target name="clover.build" description="Compile main source tree java files WITH CLOVER into class files">
<!-- switch on Clover by specifying it as the compiler to use -->
<property name="build.compiler" value="org.apache.tools.ant.taskdefs.CloverCompilerAdapter"/>
<mkdir dir="${target.clover.dir}"/>
<javac destdir="${target.clover.dir}" target="1.3" debug="${debug}"
deprecation="false" optimize="false" failonerror="true">
<src path="${src.dir}"/>
<classpath refid="qa-portalpath"/>
</javac>
<copy todir="${target.clover.dir}" preservelastmodified="true">
<fileset dir="${src.dir}">
<include name="**/*.xml"/>
<include name="**/*.dtd"/>
</fileset>
</copy>
</target>
<target name="clover.tests" depends="buildtests,clover.build" description="Run Clover tests">
<junit printsummary="yes" haltonfailure="yes">
<!-- Must go first to ensure the jndi.properties takes precedence -->
<classpath location="${target.testclasses.dir}"/>
<classpath location="${target.clover.dir}"/>
<!-- Need files loaded as resources -->
<classpath location="${test.dir}"/>
<classpath refid="qa-portalpath"/>
<batchtest fork="yes">
<fileset dir="${target.testclasses.dir}" includes="${test.includes}" excludes="${test.excludes}"/>
</batchtest>
</junit>
</target>
<!--
Run test suite under Clover coverage analysis, and bring up
Clover's Swing browser to display the results.
-->
<target name="clover.swing" depends="clover.tests" description="Run Clover tests and bring up Swing coverage viewer">
<echo>Launching coverage viewer</echo>
<java classname="com.cortexeb.tools.clover.reporters.jfc.Viewer" fork="yes">
<arg value="${clover.initstring}"/>
<classpath refid="qa-portalpath"/>
</java>
</target>
<!--
Run test suite under Clover coverage analysis, and use Clover
to generate Javadoc/style HTML results that may be browsed later.
-->
<target name="clover.html" depends="clover.tests" description="Generate Clover HTML coverage reports from an existing Clover database">
<java classname="com.cortexeb.tools.clover.reporters.html.HtmlReporter" fork="yes">
<arg line="-o '${target.clover.html.dir}' -i '${clover.initstring}' -t 'Acegi Security System for Spring'"/>
<classpath refid="qa-portalpath"/>
</java>
</target>
<target name="docclean" description="Delete temporary and distribution directories for docs">
<delete quiet="true" dir="${basedir}/${dist.ref.dir}/pdf"/>

7
lib/clover/license.txt Normal file
View File

@ -0,0 +1,7 @@
Cortex has supported the Acegi Security System for Spring project with a free
Team Edition license of Clover.
We thank Cortext for their support.
$Id$