Skip to content

Commit

Permalink
Revert "Add Ant tasks to measure the code coverage of the unit tests …
Browse files Browse the repository at this point in the history
…using the Cobertura"

Reverting it since it pollutes the junit output
This reverts commit c6a9034.
  • Loading branch information
rsumbaly committed Mar 29, 2011
1 parent b9d885f commit 4ec9f6c
Show file tree
Hide file tree
Showing 7 changed files with 0 additions and 91 deletions.
6 changes: 0 additions & 6 deletions build.properties
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,6 @@ testclasses.dir=dist/testclasses
testreport.dir=dist/junit-reports
testhtml.dir=dist/junit-reports/html

## Measuring unit test coverage with Cobertura
coverage.instrumented.dir=dist/coverage/instrumented
coverage.xml.dir=dist/coverage/xml
coverage.html.dir=dist/coverage/html
coverage.datafile=dist/coverage/cobertura.ser

## Contrib
contrib.root.dir=contrib
contrib.classes.dir=dist/contrib-classes
Expand Down
32 changes: 0 additions & 32 deletions build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -387,38 +387,6 @@
</junitreport>
</target>

<taskdef name="cobertura-instrument" classname="net.sourceforge.cobertura.ant.InstrumentTask" classpathref="main-classpath" />
<taskdef name="cobertura-report" classname="net.sourceforge.cobertura.ant.ReportTask" classpathref="main-classpath" />

<target name="coverage-instrumentation" depends="build" description="Instrument the code to measure code coverage.">
<cobertura-instrument todir="${coverage.instrumented.dir}" datafile="${coverage.datafile}">
<fileset dir="${classes.dir}">
<include name="**/*.class" />
<exclude name="**/*Test.class" />
</fileset>
</cobertura-instrument>
</target>

<target name="coverage" depends="coverage-instrumentation, buildtest" description="Measure code coverage of unit tests.">
<replace-dir dir="${testreport.dir}" />
<junit fork="yes" printsummary="yes" showoutput="true" maxmemory="1024m">
<jvmarg value="-Dnet.sourceforge.cobertura.datafile=${coverage.datafile}"/>
<classpath>
<pathelement location="${coverage.instrumented.dir}" />
<path refid="test-classpath" />
</classpath>
<formatter type="xml" />
<batchtest todir="${testreport.dir}">
<fileset dir="${unittestsrc.dir}">
<include name="**/*Test.java" />
<exclude name="**/Abstract*.java" />
</fileset>
</batchtest>
</junit>
<cobertura-report format="html" destdir="${coverage.html.dir}" srcdir="${java.dir}" datafile="${coverage.datafile}" />
<cobertura-report format="xml" destdir="${coverage.xml.dir}" srcdir="${java.dir}" datafile="${coverage.datafile}" />
</target>

<target name="junit-all" depends="junit, contrib-junit" description="Run All junit tests including contrib.">
</target>

Expand Down
Binary file removed lib/asm-3.0.jar
Binary file not shown.
Binary file removed lib/asm-tree-3.0.jar
Binary file not shown.
Binary file removed lib/cobertura-1.9.4.1.jar
Binary file not shown.
Binary file removed lib/jakarta-oro-2.0.8.jar
Binary file not shown.
53 changes: 0 additions & 53 deletions lib/jakarta-oro-license.txt

This file was deleted.

0 comments on commit 4ec9f6c

Please sign in to comment.