-
Notifications
You must be signed in to change notification settings - Fork 18
/
build.testability-explorer.xml
83 lines (69 loc) · 3.21 KB
/
build.testability-explorer.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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
<project name="Testability Explorer" default="all" basedir=".">
<description>
Code metrics with Testability Explorer for Dependency Finder
</description>
<property environment="env"/>
<path id="testabilityexplorer.lib" >
<fileset dir="${env.TESTABILITYEXPLORER_HOME}">
<include name="**/*.jar"/>
</fileset>
</path>
<taskdef name="testability" classname="com.google.ant.TestabilityTask" classpathref="testabilityexplorer.lib"/>
<target name="init">
<!-- code metrics output directory: -->
<property name="reports.dir" value="reports"/>
<property name="testabilityexplorer.reports.dir" value="${reports.dir}/testability-explorer"/>
<path id="run.classpath">
<pathelement location="classes"/>
<fileset dir="lib">
<include name="**/*.jar"/>
</fileset>
<fileset dir="${env.JUNIT_HOME}">
<include name="**/*.jar"/>
</fileset>
<fileset dir="${env.ANT_HOME}">
<include name="**/*.jar"/>
</fileset>
<fileset dir="${env.JMOCK_HOME}">
<include name="**/*.jar"/>
</fileset>
<fileset dir="${env.CATALINA_HOME}">
<include name="bin/*.jar"/>
<include name="lib/*.jar"/>
</fileset>
<pathelement location="${env.FITLIBRARY_HOME}/fitlibraryRunner.jar"/>
<fileset dir="${env.HTTPUNIT_HOME}">
<include name="**/jars/*.jar"/>
<include name="**/lib/*.jar"/>
</fileset>
</path>
</target>
<target name="main.jar">
<ant antfile="build.xml" target="jar" inheritAll="false"/>
</target>
<target name="main.clean">
<ant antfile="build.xml" target="clean" inheritAll="false"/>
</target>
<target name="all" depends="clean, main.jar, report"
description="Makes a clean compile and runs code coverage analysis"/>
<target name="clean" depends="init, main.clean"
description="Removes all produced files">
<delete dir="${testabilityexplorer.reports.dir}"
includeEmptyDirs="true"
verbose="true"/>
</target>
<target name="report" depends="report.txt, report.html"
description="Produces the testability reports"/>
<target name="report.txt" depends="init">
<mkdir dir="${testabilityexplorer.reports.dir}"/>
<testability filter="com.jeantessier" print="summary" resultfile="${testabilityexplorer.reports.dir}/testability.result.txt" errorfile="${testabilityexplorer.reports.dir}/testability.err.txt" whitelist="java.*:org.apache.log4j.*">
<classpath refid="run.classpath"/>
</testability>
</target>
<target name="report.html" depends="init">
<mkdir dir="${testabilityexplorer.reports.dir}"/>
<testability filter="com.jeantessier" print="html" resultfile="${testabilityexplorer.reports.dir}/testability.result.html" errorfile="${testabilityexplorer.reports.dir}/testability.err.html" whitelist="java.*:org.apache.log4j.*">
<classpath refid="run.classpath"/>
</testability>
</target>
</project>