-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild-clover.xml
More file actions
67 lines (57 loc) · 2.44 KB
/
build-clover.xml
File metadata and controls
67 lines (57 loc) · 2.44 KB
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
64
65
66
67
<?xml version="1.0" encoding="UTF-8"?>
<project name="boost-clover" default="ignore" basedir=".">
<import file="build-init.xml"/>
<import file="build-compile.xml"/>
<condition property="clover.on" value="true">
<equals arg1="${coverage.type}" arg2="clover"/>
</condition>
<target name="instrument_clover" if="clover.on">
<macro_instrument_clover code.type="core" test.type="atomic"/>
</target>
<target name="compile_clover" if="clover.on">
<macro_compile version="1.5" src.type="clover"/>
</target>
<target name="report_clover" if="clover.on">
<macro_report_clover code.type="core" test.type="atomic"/>
</target>
<target name="check_clover" if="clover.on">
<macro_check_clover code.type="core" test.type="atomic"/>
</target>
<taskdef resource="cloverlib.xml" classpathref="clover.classpath"/>
<macrodef name="macro_instrument_clover">
<attribute name="code.type"/>
<attribute name="test.type"/>
<sequential>
<clover-instr destdir="${clover.src.dir}" initstring="${clover.dir}/@{test.type}_coverage">
<fileset dir="${@{code.type}.src.dir}">
<include name="**/*.java"/>
<exclude name="**/*Old*"/>
<exclude name="**/nursery/**"/>
</fileset>
<fileset dir="${test.src.dir}">
<include name="**/*Test.java"/>
</fileset>
</clover-instr>
</sequential>
</macrodef>
<macrodef name="macro_report_clover">
<attribute name="code.type"/>
<attribute name="test.type"/>
<sequential>
<clover-html-report outdir="${clover.reports.dir}/@{code.type}/@{test.type}"
testresultsdir="${test.report.dir}/@{test.type}/xml"
title="Boost me Baby"
initstring="${clover.dir}/@{test.type}_coverage">
</clover-html-report>
</sequential>
</macrodef>
<macrodef name="macro_check_clover">
<attribute name="test.type"/>
<attribute name="code.type"/>
<sequential>
<clover-check target="${min.coverage}%" initstring="${clover.dir}/@{test.type}_coverage"
failureProperty="coverage.@{code.type}.failed"
haltOnFailure="true"/>
</sequential>
</macrodef>
</project>