-
Notifications
You must be signed in to change notification settings - Fork 17
/
build.xml
201 lines (159 loc) · 6.71 KB
/
build.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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
<project name="Mutation Test" default="" basedir=".">
<!-- Classpath declaration -->
<path id="project.classpath">
<fileset dir="target/javalanche-mutation-0.3.6-dist.dir/lib/">
<include name="**/*.jar" />
<include name="**/*.zip" />
</fileset>
<pathelement location="target/javalanche-mutation-0.3.6-dist.dir/lib/mysql-connector-java-5.0.3.jar" />
</path>
<path id="mutation.classpath">
<fileset dir="target/javalanche-mutation-0.3.6-dist.dir/lib/">
<include name="**/*.jar" />
<include name="**/*.zip" />
</fileset>
</path>
<property name="proj.shortname" value="jvl-mu"/>
<!-- Hibernate Tools import TODO -->
<taskdef name="hibernatetool" classname="org.hibernate.tool.ant.HibernateToolTask" classpathref="project.classpath" />
<!-- Export the database schema -->
<target name="schemaexport" depends="" description="Export a schema to the databas and file">
<hibernatetool destdir="${basedir}">
<classpath>
<pathelement path="target/classes/" />
<pathelement location="target/javalanche-mutation-0.3.6-dist.dir/lib/mysql-connector-java-5.1-nightly-20071110-bin.jar" />
<!--<path refid="mutation.classpath" />-->
<fileset dir="target/javalanche-mutation-0.3.6-dist.dir/lib">
<exclude name="**/commons-logging-1.1.jar" />
<include name="**/*.jar" />
</fileset>
</classpath>
<annotationconfiguration configurationfile="src/main/resources/hibernate.cfg.xml" />
<hbm2ddl drop="true" create="true" export="true" outputfilename="${proj.shortname}-ddl.sql" delimiter=";" format="true" />
</hibernatetool>
</target>
<!-- Export the database schema -->
<target name="schemaupdate" depends="" description="Exports a generated schema to DB and file">
<hibernatetool destdir="${basedir}">
<classpath>
<pathelement path="target/classes/" />
<pathelement location="target/javalanche-mutation-0.3.6-dist.dir/lib/mysql-connector-java-5.1-nightly-20071110-bin.jar" />
<!--<path refid="mutation.classpath" />-->
<fileset dir="target/javalanche-mutation-0.3.6-dist.dir/lib">
<exclude name="**/commons-logging-1.1.jar" />
<include name="**/*.jar" />
</fileset>
</classpath>
<annotationconfiguration configurationfile="src/main/resources/hibernate.cfg.xml" />
<hbm2ddl update="true" drop="false" create="true" export="true" outputfilename="${proj.shortname}-ddl.sql" delimiter=";" format="true" />
</hibernatetool>
</target>
<!-- /usr/bin/mysqldump -port=3308 -user=mutation -password=mu -h 127.0.0.1 -r mutation-test.dump mutation_test -->
<target name="dumpDb" description="dump the database">
<tstamp>
<format property="dump.tstamp" pattern="dd-MM-yyyy_hh-mm-aa" />
</tstamp>
<property name="dump.file" location="${basedir}/mutation-test_${dump.tstamp}.dump" />
<exec dir="." executable="/scratch/schuler/mysql/bin/mysqldump">
<arg line="--port=3308 --user=mutation --password=mu -h 127.0.0.1 -r ${dump.file} mutation_test " />
</exec>
<echo>
Dump written to: ${dump.file}
/</echo>
</target>
<target name="generateDDL" depends="">
<mkdir dir="${basedir}/target/generated-sources/schema" />
<hibernatetool destdir="${basedir}/target/generated-sources">
<classpath refid="maven.compile.classpath" />
<classpath refid="maven.plugin.classpath" />
<classpath path="target/classes/" />
<annotationconfiguration configurationfile="${basedir}/src/main/resources/hibernate.cfg.xml" />
<hbm2ddl drop="true" create="true" export="false" outputfilename="schema.ddl" delimiter=";" format="true" />
</hibernatetool>
<echo message="ddl build" />
</target>
<property name="classes.dest.dir" value="target/ant/classes"/>
<property name="test.reports.dir" value="target/ant/test-reports"/>
<property name="test.dest.dir" value="target/ant/test-classes"/>
<path id="build.classpath">
<fileset dir="target/javalanche-mutation-0.3.6-dist.dir/lib/">
<include name="**/*.jar"/>
</fileset>
<pathelement location="../adabu2-check-invariants/target/classes/"/>
</path>
<path id="test.classpath">
<path refid="build.classpath"/>
<pathelement location="${classes.dest.dir}"/>
<pathelement location="${test.dest.dir}"/>
<pathelement location="target/classes"/>
<pathelement location="target/test-classes"/>
</path>
<target name="clean">
<delete dir="target/ant"/>
</target>
<target name="compile">
<mkdir dir="${classes.dest.dir}"/>
<javac destdir="${classes.dest.dir}" debug="true" source="1.5" target="1.5">
<src>
<pathelement location="src/main/java"></pathelement>
</src>
<classpath refid="build.classpath"></classpath>
</javac>
</target>
<target name="compile-test" depends="compile">
<mkdir dir="${test.dest.dir}"></mkdir>
<javac destdir="${test.dest.dir}" debug="true" source="1.5" target="1.5">
<src>
<pathelement location="src/test/java"/>
</src>
<classpath>
<path refid="build.classpath"/>
<pathelement location="${classes.dest.dir}"/>
</classpath>
</javac>
</target>
<target name="test" depends="compile-test" description="- run the test suite">
<mkdir dir="${test.reports.dir}"/>
<junit dir="./" failureproperty="test.failure" haltonerror="true" haltonfailure="true" printsummary="true" fork="true" forkmode="perTest">
<jvmarg value="-javaagent:./target/javaagent.jar"/>
<jvmarg value="-Dmutation.run.mode=mutation-no-invariant"/>
<jvmarg value="-D=invariant.mode=off"/>
<!--formatter type="xml"/-->
<!--formatter type="plain" usefile="false"/-->
<classpath>
<path refid="test.classpath"/>
</classpath>
<batchtest todir="${test.reports.dir}">
<fileset dir="src/test/java">
<include name="**/Test*.java"/>
<include name="**/*Test.java"/>
<exclude name="**/JtopasClassTest.java"/>
</fileset>
</batchtest>
</junit>
</target>
<target name="testDBPerformance" description="test the databases performance">
<property name="db.perf.dir" value="target/db-performance" />
<mkdir dir="${db.perf.dir}"/>
<copy file="src/main/resources/log4j-silent.properties" tofile="${db.perf.dir}/log4j.properties"/>
<java classname="de.unisb.cs.st.javalanche.mutation.util.DBPerformanceTest" maxmemory="1024m" fork="true">
<classpath>
<pathelement path="${db.perf.dir}" />
<path refid="test.classpath" />
</classpath>
</java>
</target>
<target name="uberjar" depends="">
<taskdef name="jarjar" classname="com.tonicsystems.jarjar.JarJarTask"
classpath="jarjar-1.0.jar"/>
<jarjar jarfile="target/uber.jar">
<zipfileset>
<fileset dir="target/javalanche-mutation-0.3.6-dist.dir/lib/">
<include name="**/*.jar" />
<include name="**/*.zip" />
</fileset>
</zipfileset>
<rule pattern="com**" result="de.javalanche@1"/>
</jarjar>
</target>
</project>