forked from I2P_Developers/i2p.i2p
Added clover targets to core build.xml as well, so either will work
Pass in the absolute location of clover.jar as the with.clover property to activate the clover targets.
This commit is contained in:
@@ -82,6 +82,11 @@
|
|||||||
<jar destfile="./build/i2ptest.jar" basedir="./build/obj" includes="**/*.class" />
|
<jar destfile="./build/i2ptest.jar" basedir="./build/obj" includes="**/*.class" />
|
||||||
</target>
|
</target>
|
||||||
<!-- preparation of code coverage tool of choice -->
|
<!-- preparation of code coverage tool of choice -->
|
||||||
|
<target name="prepareClover" depends="compileTest" if="with.clover">
|
||||||
|
<taskdef resource="clovertasks"/>
|
||||||
|
<mkdir dir="../../reports/core/clover" />
|
||||||
|
<clover-setup initString="../../reports/core/clover/coverage.db"/>
|
||||||
|
</target>
|
||||||
<target name="prepareCobertura" depends="compileTest" if="with.cobertura">
|
<target name="prepareCobertura" depends="compileTest" if="with.cobertura">
|
||||||
<taskdef classpath="${with.cobertura}" resource="tasks.properties" onerror="report" />
|
<taskdef classpath="${with.cobertura}" resource="tasks.properties" onerror="report" />
|
||||||
<mkdir dir="./build/obj_cobertura" />
|
<mkdir dir="./build/obj_cobertura" />
|
||||||
@@ -93,7 +98,7 @@
|
|||||||
</fileset>
|
</fileset>
|
||||||
</cobertura-instrument>
|
</cobertura-instrument>
|
||||||
</target>
|
</target>
|
||||||
<target name="prepareTest" depends="prepareCobertura" />
|
<target name="prepareTest" depends="prepareClover, prepareCobertura" />
|
||||||
<!-- end preparation of code coverage tool -->
|
<!-- end preparation of code coverage tool -->
|
||||||
<target name="test" depends="clean, compileTest, prepareTest">
|
<target name="test" depends="clean, compileTest, prepareTest">
|
||||||
<mkdir dir="../../reports/core/junit/" />
|
<mkdir dir="../../reports/core/junit/" />
|
||||||
@@ -109,6 +114,7 @@
|
|||||||
<pathelement location="./build/obj_cobertura" />
|
<pathelement location="./build/obj_cobertura" />
|
||||||
<pathelement location="./build/obj" />
|
<pathelement location="./build/obj" />
|
||||||
<pathelement location="../../build/jbigi.jar" />
|
<pathelement location="../../build/jbigi.jar" />
|
||||||
|
<pathelement location="${with.clover}" />
|
||||||
<pathelement location="${with.cobertura}" />
|
<pathelement location="${with.cobertura}" />
|
||||||
</classpath>
|
</classpath>
|
||||||
<batchtest todir="../../reports/core/junit/">
|
<batchtest todir="../../reports/core/junit/">
|
||||||
@@ -130,6 +136,13 @@
|
|||||||
<report format="frames" todir="../../reports/core/html/junit"/>
|
<report format="frames" todir="../../reports/core/html/junit"/>
|
||||||
</junitreport>
|
</junitreport>
|
||||||
</target>
|
</target>
|
||||||
|
<target name="clover.report" depends="test" if="with.clover">
|
||||||
|
<clover-report>
|
||||||
|
<current outfile="../../reports/core/html/clover">
|
||||||
|
<format type="html"/>
|
||||||
|
</current>
|
||||||
|
</clover-report>
|
||||||
|
</target>
|
||||||
<target name="cobertura.report" depends="test" if="with.cobertura">
|
<target name="cobertura.report" depends="test" if="with.cobertura">
|
||||||
<mkdir dir="../../reports/core/cobertura" />
|
<mkdir dir="../../reports/core/cobertura" />
|
||||||
<cobertura-report format="xml" srcdir="./src" destdir="../../reports/core/cobertura" />
|
<cobertura-report format="xml" srcdir="./src" destdir="../../reports/core/cobertura" />
|
||||||
@@ -137,7 +150,7 @@
|
|||||||
<cobertura-report format="html" srcdir="./src" destdir="../../reports/core/html/cobertura" />
|
<cobertura-report format="html" srcdir="./src" destdir="../../reports/core/html/cobertura" />
|
||||||
<delete file="./cobertura.ser" />
|
<delete file="./cobertura.ser" />
|
||||||
</target>
|
</target>
|
||||||
<target name="test.report" depends="junit.report, cobertura.report"/>
|
<target name="test.report" depends="junit.report, clover.report, cobertura.report"/>
|
||||||
<!-- end test reports -->
|
<!-- end test reports -->
|
||||||
<target name="fulltest" depends="test, junit.report" />
|
<target name="fulltest" depends="test, junit.report" />
|
||||||
<!-- end unit tests -->
|
<!-- end unit tests -->
|
||||||
|
Reference in New Issue
Block a user