| 1742 |
wkiely |
1 |
<project name="clover-task">
|
|
|
2 |
|
|
|
3 |
<using name="clover" version="1.2.4_02.cots"/>
|
|
|
4 |
|
|
|
5 |
<taskdef resource="clovertasks">
|
|
|
6 |
<classpath>
|
|
|
7 |
<pathelement path="${using.clover.basedir}/jar/clover.jar"/>
|
|
|
8 |
</classpath>
|
|
|
9 |
</taskdef>
|
|
|
10 |
|
|
|
11 |
|
|
|
12 |
<macrodef name = "clover-on">
|
|
|
13 |
<attribute name="database" default="${user.home}/${ant.project.name}_coverage.db"/>
|
|
|
14 |
<sequential>
|
|
|
15 |
<clover-setup initString="${coverage.db}" flushpolicy="interval" flushinterval="5000"/>
|
|
|
16 |
</sequential>
|
|
|
17 |
</macrodef>
|
|
|
18 |
|
|
|
19 |
|
|
|
20 |
<macrodef name = "clover-off">
|
|
|
21 |
<attribute name="database" default="${user.home}/${ant.project.name}_coverage.db"/>
|
|
|
22 |
<sequential>
|
|
|
23 |
<clover-setup initString="${coverage.db}" enabled="false"/>
|
|
|
24 |
|
|
|
25 |
<!-- removes the class and jar files from the clover tests -->
|
|
|
26 |
<delete>
|
|
|
27 |
<fileset dir="${basedir}/build" includes="**/*.class"/>
|
|
|
28 |
<fileset dir="${basedir}/build" includes="**/*.jar"/>
|
|
|
29 |
</delete>
|
|
|
30 |
|
|
|
31 |
</sequential>
|
|
|
32 |
</macrodef>
|
|
|
33 |
|
|
|
34 |
|
|
|
35 |
<macrodef name = "clover.report.html">
|
|
|
36 |
<element name="clover-fileset" optional="yes" implicit="yes" description="Anything you can put in a fileset."/>
|
|
|
37 |
<sequential>
|
|
|
38 |
<mkdir dir="${basedir}/build/pkg/doc/coverage-tests"/>
|
|
|
39 |
|
|
|
40 |
<clover-report>
|
|
|
41 |
<current outfile="${basedir}/build/pkg/doc/coverage-tests" title="${ant.project.name}" summary="false">
|
|
|
42 |
<clover-fileset/>
|
|
|
43 |
<format type="html"/>
|
|
|
44 |
</current>
|
|
|
45 |
</clover-report>
|
|
|
46 |
</sequential>
|
|
|
47 |
</macrodef>
|
|
|
48 |
|
|
|
49 |
|
|
|
50 |
<target name = "with.clover"
|
|
|
51 |
description = "Prepares for coverage instrumentation.">
|
|
|
52 |
|
|
|
53 |
<clover-on/>
|
|
|
54 |
|
|
|
55 |
</target>
|
|
|
56 |
|
|
|
57 |
|
|
|
58 |
<target name = "without.clover"
|
|
|
59 |
description = "Deactivates coverage instrumentation.">
|
|
|
60 |
|
|
|
61 |
<clover-off/>
|
|
|
62 |
|
|
|
63 |
</target>
|
|
|
64 |
|
|
|
65 |
</project>
|