-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.xml
More file actions
96 lines (82 loc) · 3.42 KB
/
build.xml
File metadata and controls
96 lines (82 loc) · 3.42 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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<project basedir="." default="build" name="Subject">
<property name="debuglevel" value="source,lines,vars"/>
<property name="target" value="1.8"/>
<property name="source" value="1.8"/>
<property name="src.dir" location="./src/main/java"/>
<property name="tests.dir" location="./src/test/java"/>
<property name="result.dir" location="./target"/>
<property name="result.classes.dir" location="${result.dir}/classes"/>
<property name="result.tests.dir" location="${result.dir}/test-classes"/>
<property name="result.autotests.dir" location="${result.dir}/randoop/bin"/>
<property environment="env"/>
<path id="class.path">
<fileset dir="${result.dir}/dependency">
<include name="**/*.jar" />
</fileset>
</path>
<target name="clean">
<delete dir="${result.tests.dir}"/>
<delete dir="${result.classes.dir}"/>
</target>
<target depends="clean,compile,compile-test" name="build"/>
<target name="compile">
<mkdir dir="${result.classes.dir}"/>
<javac debug="true" debuglevel="${debuglevel}" includeantruntime="false" source="${source}" target="${target}" destdir="${result.classes.dir}">
<src path="${src.dir}"/>
<classpath refid="class.path"/>
</javac>
</target>
<target name="compile-test">
<mkdir dir="${result.tests.dir}"/>
<javac debug="true" debuglevel="${debuglevel}" includeantruntime="false" source="${source}" target="${target}" destdir="${result.tests.dir}">
<src path="${tests.dir}"/>
<classpath>
<path refid="class.path" />
<pathelement location="${result.classes.dir}"/>
</classpath>
</javac>
</target>
<!-- Run JUnit -->
<target name="junit" depends="compile">
<mkdir dir="./results"/>
<junit printsummary="yes" haltonfailure="no">
<classpath refid="class.path" />
<classpath location="${result.classes.dir}" />
<classpath location="${result.tests.dir}" />
<formatter type="xml" />
<batchtest fork="yes" todir="./results">
<fileset dir="${tests.dir}">
<include name="**/*Test*.java" />
</fileset>
</batchtest>
</junit>
</target>
<path id="pit.path">
<fileset dir="${env.PIT_JARS}">
<include name="**/*.jar" />
</fileset>
</path>
<taskdef name="pitest" classname="org.pitest.ant.PitestTask" classpathref="pit.path" />
<property name="classPathStr" refid="class.path"/>
<target depends="build" name="mutationCoverage">
<pitest
pitClasspath="pit.path"
classPath="${classPathStr}:${result.classes.dir}:${result.tests.dir}"
targetClasses="${env.SUBJ_PACKAGE}"
targetTests="*"
reportDir="./target/pit/orig"
outputFormats="XML"
sourceDir="${src.dir}"/>
</target>
<target depends="build" name="mutationCoverageAuto">
<pitest
pitClasspath="pit.path"
classPath="${classPathStr}:${result.classes.dir}:${result.autotests.dir}"
targetClasses="${env.SUBJ_PACKAGE}"
targetTests="*"
reportDir="./target/pit/auto"
outputFormats="XML"
sourceDir="${src.dir}"/>
</target>
</project>