mirror of https://github.com/FreeCol/freecol.git
Add cobertura task.
This commit is contained in:
parent
a0822ee8f1
commit
cc6c52c084
38
build.xml
38
build.xml
|
@ -736,4 +736,42 @@
|
|||
</java>
|
||||
</target>
|
||||
|
||||
<target name="cobertura" depends="build">
|
||||
<property name="cobertura.dir" value="cobertura" />
|
||||
|
||||
<path id="cobertura.classpath">
|
||||
<fileset dir="${cobertura.dir}">
|
||||
<include name="cobertura.jar" />
|
||||
<include name="lib/**/*.jar" />
|
||||
</fileset>
|
||||
</path>
|
||||
|
||||
<taskdef classpathref="cobertura.classpath" resource="tasks.properties" />
|
||||
|
||||
<cobertura-instrument todir="build/instrumented-classes">
|
||||
<fileset dir="build/net">
|
||||
<include name="**/*.class"/>
|
||||
</fileset>
|
||||
</cobertura-instrument>
|
||||
|
||||
<delete dir="${freecol.build.dir}/report" />
|
||||
<mkdir dir="${freecol.build.dir}/report"/>
|
||||
<mkdir dir="${freecol.build.dir}/report/xml"/>
|
||||
|
||||
<echo message="if the next task fails then please read the build script" />
|
||||
<junit printsummary="on" errorproperty="error.junit" fork="yes" maxmemory="48m">
|
||||
<classpath location="build/instrumented-classes"/>
|
||||
<classpath location="build/net"/>
|
||||
<classpath refid="cobertura.classpath"/>
|
||||
<classpath refid="test.run.classpath"/>
|
||||
<formatter type="xml" />
|
||||
|
||||
<test todir="${freecol.build.dir}/report/xml" name="net.sf.freecol.AllTests" fork="yes"/>
|
||||
<sysproperty key="java.awt.headless" value="true" />
|
||||
</junit>
|
||||
|
||||
<cobertura-report srcdir="${freecol.src.dir}" destdir="cobertura/report"/>
|
||||
</target>
|
||||
|
||||
|
||||
</project>
|
||||
|
|
Loading…
Reference in New Issue