Edited router build.xml to match core build.xml (inc. clover, cobertura stuff)

This commit is contained in:
str4d
2012-02-25 01:43:15 +00:00
parent c955adf7f6
commit 6a26c0b621

View File

@@ -100,6 +100,25 @@
<target name="jarTest" depends="compileTest">
<jar destfile="./build/routertest.jar" basedir="./build/obj" includes="**/*.class" />
</target>
<!-- preparation of code coverage tool of choice -->
<target name="prepareClover" depends="compileTest" if="with.clover">
<taskdef resource="clovertasks"/>
<mkdir dir="../../reports/router/clover" />
<clover-setup initString="../../reports/router/clover/coverage.db"/>
</target>
<target name="prepareCobertura" depends="compileTest" if="with.cobertura">
<taskdef classpath="${with.cobertura}" resource="tasks.properties" onerror="report" />
<mkdir dir="./build/obj_cobertura" />
<delete file="./cobertura.ser" />
<cobertura-instrument todir="./build/obj_cobertura">
<fileset dir="./build/obj">
<include name="**/*.class"/>
<exclude name="**/*Test.class" />
</fileset>
</cobertura-instrument>
</target>
<target name="prepareTest" depends="prepareClover, prepareCobertura" />
<!-- end preparation of code coverage tool -->
<target name="test" depends="compileTest">
<mkdir dir="../../reports/router/junit/" />
<delete>
@@ -108,12 +127,15 @@
</fileset>
</delete>
<junit printsummary="on" fork="yes">
<sysproperty key="net.sourceforge.cobertura.datafile" file="./cobertura.ser" />
<classpath>
<pathelement path="${classpath}" />
<pathelement location="./build/obj_cobertura" />
<pathelement location="./build/obj" />
<pathelement location="../../core/java/build/i2ptest.jar" />
<pathelement location="../../build/jbigi.jar" />
<pathelement path="${ant.home}/lib/clover.jar"/>
<pathelement location="${with.clover}" />
<pathelement location="${with.cobertura}" />
</classpath>
<batchtest todir="../../reports/router/junit/">
<fileset dir="./test/">
@@ -123,6 +145,7 @@
<formatter type="xml"/>
</junit>
</target>
<!-- test reports -->
<target name="junit.report">
<junitreport todir="../../reports/router/junit">
<fileset dir="../../reports/router/junit">
@@ -131,28 +154,23 @@
<report format="frames" todir="../../reports/router/html/junit"/>
</junitreport>
</target>
<target name="clover.report">
<taskdef resource="clovertasks"/>
<mkdir dir="../../reports/" />
<mkdir dir="../../reports/router" />
<mkdir dir="../../reports/router/clover" />
<clover-setup initString="../../reports/router/clover/coverage.db"/>
<target name="clover.report" depends="test" if="with.clover">
<clover-report>
<current outfile="../../reports/router/html/clover">
<format type="html"/>
</current>
</clover-report>
</target>
<target name="test.report" depends="junit.report, clover.report"/>
<target name="useclover">
<taskdef resource="clovertasks"/>
<mkdir dir="../../reports/" />
<mkdir dir="../../reports/router/" />
<mkdir dir="../../reports/router/clover" />
<clover-setup initString="../../reports/router/clover/coverage.db"/>
<target name="cobertura.report" depends="test" if="with.cobertura">
<mkdir dir="../../reports/router/cobertura" />
<cobertura-report format="xml" srcdir="./src" destdir="../../reports/router/cobertura" />
<mkdir dir="../../reports/router/html/cobertura" />
<cobertura-report format="html" srcdir="./src" destdir="../../reports/router/html/cobertura" />
<delete file="./cobertura.ser" />
</target>
<target name="test.report" depends="junit.report, clover.report, cobertura.report"/>
<!-- end test reports -->
<target name="fulltest" depends="cleandep, builddeptest, jarTest, test, junit.report" />
<target name="fullclovertest" depends="cleandep, builddeptest, useclover, jarTest, test, test.report" />
<!-- end unit tests -->
<target name="clean">