-
Notifications
You must be signed in to change notification settings - Fork 0
/
cobertura.xml
63 lines (57 loc) · 2.06 KB
/
cobertura.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
<?xml version="1.0" encoding="UTF-8"?>
<project>
<import file="util.xml"/>
<property file="${user.home}/.ant.properties"/>
<macrodef name="do-define-cobertura">
<sequential>
<do-assert-var-set var="cobertura.libdir"/>
<path id="cobertura.classpath">
<fileset dir="${cobertura.libdir}">
<include name="cobertura-?.?.?.jar" />
<include name="lib/**/*.jar" />
</fileset>
</path>
<if>
<available classpathref="cobertura.classpath"
resource="tasks.properties"/>
<then></then>
<else>
<fail message="Cannot find cobertura in ${cobertura.libdir}"/>
</else>
</if>
<taskdef classpathref="cobertura.classpath" resource="tasks.properties" />
</sequential>
</macrodef>
<macrodef name="do-cobertura-instrument">
<attribute name="auxClasspathRef" default="cobertura.emptycp"/>
<sequential>
<path id="cobertura.emptycp"/>
<delete dir="build/cobertura"/>
<property name="cobertura.data" value="build/cobertura.ser"/>
<delete file="build/cobertura.ser"/>
<cobertura-instrument todir="build/cobertura/classes"
datafile="build/cobertura.ser">
<fileset dir="build/classes"
includes="**/*.class" />
<auxClasspath refid="@{auxClasspathRef}"/>
</cobertura-instrument>
</sequential>
</macrodef>
<macrodef name="do-cobertura-report">
<sequential>
<mkdir dir="build/sitecontent/test-coverage"/>
<property name="cobertura.report.dir"
value="build/sitecontent/test-coverage"/>
<echo>===================
Bogus instrumentation warnings for interfaces are expected, see
https://github.com/cobertura/cobertura/issues/232
===================</echo>
<cobertura-report datafile="build/cobertura.ser"
destdir="${cobertura.report.dir}"
srcdir="src"
/>
<echo>
!!! cobertura report in ${cobertura.report.dir}</echo>
</sequential>
</macrodef>
</project>