Permalink
Browse files

Perform cleanup of the previous Cobertura artifacs before performing a

new coverage test run. This solves some occasional issues when the
HTML coverage Reports are out-of-sync with the actual code. It also
seems to make the process faster.
  • Loading branch information...
rolfl committed Sep 10, 2011
1 parent cf52903 commit edeb9e4a03ae1fd4581b7dac54bd3301cdffbcf6
Showing with 2 additions and 0 deletions.
  1. +2 −0 build.xml
View
@@ -329,6 +329,7 @@ For instructions on how to build JDOM, please view the README.txt file.
<target name="coverage.setup" description="Set up code-coverage metrics" depends="compile.core">
<taskdef classpathref="junit.class.path" resource="tasks.properties"/>
+ <deltree dir="${junit.instrumented}"/>
<mkdir dir="${junit.instrumented}" />
<property name="cobertura.datafile" value="${junit.instrumented}/cobertura.ser"/>
<cobertura-instrument todir="${junit.instrumented}" datafile="${cobertura.datafile}">
@@ -353,6 +354,7 @@ For instructions on how to build JDOM, please view the README.txt file.
<target name="coverage" depends="coverage.setup, junit"
description="Run the code coverage tool.">
+ <deltree dir="${coverage.out}"/>
<mkdir dir="${coverage.out}" />
<cobertura-report srcdir="${core.build}" destdir="${coverage.out}" datafile="${cobertura.datafile}"/>
<echo message="See ${coverage.out}/index.html for results." />

0 comments on commit edeb9e4

Please sign in to comment.