[r16068]: rvmroot / branches / RVM-127-JMX / test.xml  Maximize  Restore  History

Download this file

348 lines (304 with data), 18.0 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
 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
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
<!--
~ This file is part of the Jikes RVM project (http://jikesrvm.org).
~
~ This file is licensed to You under the Common Public License (CPL);
~ You may not use this file except in compliance with the License. You
~ may obtain a copy of the License at
~
~ http://www.opensource.org/licenses/cpl1.0.php
~
~ See the COPYRIGHT.txt file distributed with this work for information
~ regarding copyright ownership.
-->
<project name="TestDriver" default="report" basedir=".">
<property name="jikesrvm.dir" location="."/>
<import file="${jikesrvm.dir}/build/base.xml"/>
<import file="${jikesrvm.dir}/build/tasks.xml"/>
<property name="test-run.name" value="pre-commit"/>
<property name="test-run.variant" value="${test-run.name}"/>
<property name="test-run.file" value="${jikesrvm.dir}/build/test-runs/${test-run.name}.properties"/>
<property file="${test-run.file}"/>
<property name="test.tests" value=""/>
<property name="test.mode" value=""/>
<property name="driver.scratch.dir" location="${build.dir}/test-driver"/>
<property name="build.results.dir" location="${driver.scratch.dir}/results"/>
<property name="test.results.dir" value="${results.dir}/tests/${test-run.name}"/>
<property name="test.build.dir" value="${build.dir}/tests/${test-run.name}"/>
<property name="build.results.file" value="${test.results.dir}/BuildResults.xml"/>
<property name="test.scripts.dir" value="${jikesrvm.dir}/testing/tests"/>
<property name="results.archive" location="${results.dir}/archive"/>
<!-- properties defining where to upload -->
<property name="cattrack.upload.account" value="regression@jikesrvm.anu.edu.au"/>
<property name="cattrack.upload.incoming.dir" value="/home/regression/incoming"/>
<!-- **************************************************************************** -->
<!-- * * -->
<!-- * Macro for setup test properties * -->
<!-- * * -->
<!-- **************************************************************************** -->
<macrodef name="testRunPropertyInit">
<attribute name="tag"/>
<sequential>
<property name="test.config.@{tag}.configuration" value="@{tag}"/>
<setBuildName property="test.config.@{tag}.build.name" config="${test.config.@{tag}.configuration}"/>
<property name="test.config.@{tag}.rvm.dir" location="${dist.dir}/${test.config.@{tag}.build.name}"/>
<property name="test.config.@{tag}.tests" value="${test.tests}"/>
<property name="test.config.@{tag}.name" value=""/>
<property name="test.config.@{tag}.mode" value="${test.mode}"/>
</sequential>
</macrodef>
<!-- **************************************************************************** -->
<!-- * * -->
<!-- * Macro for setup test properties * -->
<!-- * * -->
<!-- **************************************************************************** -->
<presetdef name="bres">
<echo file="${build.results.file}" append="true"/>
</presetdef>
<!-- **************************************************************************** -->
<!-- * * -->
<!-- * Setup test-run start time * -->
<!-- * * -->
<!-- **************************************************************************** -->
<target name="init" depends="prepare-ant-tasks">
<tstamp prefix="test-run.start">
<format property="time" pattern="EEE MMM dd HH:mm:ss z yyyy" timezone="UTC"/>
<format property="time-stamp" pattern="yyyyMMddHHmmss" timezone="UTC"/>
</tstamp>
<hostname property="local.hostname"/>
</target>
<!-- **************************************************************************** -->
<!-- * * -->
<!-- * Task to actually run tests * -->
<!-- * * -->
<!-- **************************************************************************** -->
<target name="test" depends="init">
<delete dir="${driver.scratch.dir}"/>
<delete dir="${test.build.dir}"/>
<delete dir="${test.results.dir}"/>
<mkdir dir="${driver.scratch.dir}"/>
<mkdir dir="${test.results.dir}"/>
<bres append="false"><![CDATA[<builds>]]></bres>
<forEach list="${test.configs}" property="tag">
<sequential>
<testRunPropertyInit tag="@{tag}"/>
<propertycopy name="test.config.@{tag}.build.done" from="${test.config.@{tag}.configuration}.built"/>
<if>
<conditions>
<not>
<or>
<equals arg1="${test.config.@{tag}.build.done}" arg2="true"/>
<isset property="skip.build"/>
</or>
</not>
</conditions>
<sequential>
<echo message="Building ${test.config.@{tag}.configuration}"/>
<delete dir="${test.config.@{tag}.rvm.dir}"/>
<timer property="${test.config.@{tag}.configuration}.build.time"/>
<erant antfile="${jikesrvm.dir}/build.xml"
failonerror="false"
failonerrorProperty="${test.config.@{tag}.configuration}.build.error"
output="${driver.scratch.dir}/Build-${test.config.@{tag}.configuration}.txt">
<property name="config.name" value="${test.config.@{tag}.configuration}"/>
</erant>
<timer property="${test.config.@{tag}.configuration}.build.time" stop="true"/>
<property name="${test.config.@{tag}.configuration}.built" value="true"/>
<propertycopy name="test.config.@{tag}.build.time" from="${test.config.@{tag}.configuration}.build.time.duration"/>
<propertycopy name="test.config.@{tag}.build.error" from="${test.config.@{tag}.configuration}.build.error"/>
<condition property="test.config.@{tag}.build.status" value="FAILURE" else="SUCCESS">
<equals arg1="${test.config.@{tag}.build.error}" arg2="true"/>
</condition>
<bres><![CDATA[<build><configuration>${test.config.@{tag}.configuration}</configuration><time>${test.config.@{tag}.build.time}</time><result>${test.config.@{tag}.build.status}</result><output><![CDATA[]]></bres>
<concat destfile="${build.results.file}" append="true">
<path path="${driver.scratch.dir}/Build-${test.config.@{tag}.configuration}.txt"/>
</concat>
<bres>]<![CDATA[]></output><parameters>]]></bres>
<property prefix="@{tag}" file="${test.config.@{tag}.rvm.dir}/constants.properties"/>
<property name="properties.config"
value="config.name config.runtime.compiler config.bootimage.compiler config.mmtk.plan config.include.aos config.include.gcspy config.include.gcspy-client config.include.all-classes config.assertions config.default-heapsize.initial config.default-heapsize.maximum config.bootimage.compiler.args config.stress-gc-interval"/>
<forEach list="${properties.config}" property="property">
<sequential>
<bres><![CDATA[<parameter key="@{property}" value="${@{tag}.@{property}}"/>]]></bres>
</sequential>
</forEach>
<bres><![CDATA[</parameters></build>]]></bres>
</sequential>
</if>
<propertycopy name="test.config.@{tag}.build.error" from="${test.config.@{tag}.configuration}.build.error"/>
<if>
<conditions>
<not>
<equals arg1="${test.config.@{tag}.build.error}" arg2="true"/>
</not>
</conditions>
<sequential>
<echo message="Testing Run @{tag}"/>
<echo message=" rvm.dir: ${test.config.@{tag}.rvm.dir}"/>
<echo message=" Configuration: ${test.config.@{tag}.configuration}"/>
<echo message=" Tests: ${test.config.@{tag}.tests}"/>
<echo message=" Run Name: ${test.config.@{tag}.name}"/>
<echo message=" Mode: ${test.config.@{tag}.mode}"/>
<forEach list="${test.config.@{tag}.tests}" property="test">
<sequential>
<subant target="test" failonerror="false" output="${driver.scratch.dir}/Test-@{tag}-@{test}.txt">
<filelist dir="${test.scripts.dir}" files="@{test}/build.xml"/>
<property name="config.name" value="${test.config.@{tag}.configuration}"/>
<property name="test-run.file" value="${test-run.file}"/>
<property name="test.results.dir" value="${test.results.dir}/@{tag}"/>
<property name="test.build.dir" value="${test.build.dir}/@{tag}"/>
<property name="test.rvm.dir" location="${test.config.@{tag}.rvm.dir}"/>
<property name="test.mode" value="${test.config.@{tag}.mode}"/>
<property name="test.group.name" value="@{test}"/>
<propertyset>
<propertyref prefix="exclude."/>
</propertyset>
</subant>
</sequential>
</forEach>
</sequential>
</if>
</sequential>
</forEach>
<bres><![CDATA[</builds>]]></bres>
</target>
<!-- **************************************************************************** -->
<!-- * * -->
<!-- * Targets for aggregating results * -->
<!-- * * -->
<!-- **************************************************************************** -->
<target name="aggregate" depends="init,get-svn-version">
<mkdir dir="${build.results.dir}"/>
<echo file="${build.results.dir}/Results.xml" append="false">
<![CDATA[<test-run name="${test-run.name}">
<revision>${svn.revision}</revision>
<time>${test-run.start.time}</time>
<variant>${test-run.variant}</variant>
<host>${local.hostname}</host>
]]></echo>
<concat destfile="${build.results.dir}/Results.xml" append="true">
<path path="${build.results.file}"/>
</concat>
<mkdir dir="${test.results.dir}"/>
<forEach list="${test.configs}" property="tag">
<sequential>
<testRunPropertyInit tag="@{tag}"/>
<property prefix="@{tag}" file="${test.config.@{tag}.rvm.dir}/constants.properties"/>
<if>
<conditions>
<not>
<isset property="properties.target"/>
</not>
</conditions>
<sequential>
<property name="properties.target"
value="target.name target.arch target.address.size target.os target.bootimage.code.address target.bootimage.data.address target.bootimage.rmap.address target.max-mappable.address target.arch.sse2"/>
<echo file="${build.results.dir}/Results.xml" append="true"><![CDATA[<target><parameters>]]></echo>
<forEach list="${properties.target}" property="property">
<sequential>
<echo file="${build.results.dir}/Results.xml" append="true"><![CDATA[
<parameter key="@{property}" value="${@{tag}.@{property}}"/>
]]></echo>
</sequential>
</forEach>
<echo file="${build.results.dir}/Results.xml" append="true"><![CDATA[</parameters></target>]]></echo>
</sequential>
</if>
<echo file="${build.results.dir}/@{tag}.xml" append="false">
<![CDATA[<test-configuration tag="@{tag}" name="${test.config.@{tag}.name}">]]></echo>
<condition property="test.config.@{tag}.prefix" value="" else="${test.config.@{tag}.name}_">
<equals arg1="${test.config.@{tag}.name}" arg2=""/>
</condition>
<forEach list="${test.config.@{tag}.tests}" property="test">
<sequential>
<concat destfile="${build.results.dir}/@{tag}.xml" append="true">
<fileset dir="${test.results.dir}" includes="@{tag}/@{test}/Results.xml"/>
</concat>
</sequential>
</forEach>
<echo file="${build.results.dir}/@{tag}.xml" append="true"><![CDATA[</test-configuration>]]></echo>
<concat destfile="${build.results.dir}/Results.xml" append="true">
<fileset dir="${build.results.dir}" includes="@{tag}.xml"/>
</concat>
</sequential>
</forEach>
<echo file="${build.results.dir}/Results.xml" append="true"><![CDATA[</test-run>]]></echo>
</target>
<!-- **************************************************************************** -->
<!-- * * -->
<!-- * Generate XML report * -->
<!-- * * -->
<!-- **************************************************************************** -->
<target name="gen-xml-report" depends="aggregate">
<xslt in="${build.results.dir}/Results.xml"
out="${test.results.dir}/Report.xml"
style="${jikesrvm.dir}/build/results2report.xsl"
force="true">
<outputproperty name="method" value="xml"/>
<outputproperty name="standalone" value="yes"/>
<outputproperty name="encoding" value="US-ASCII"/>
<outputproperty name="indent" value="yes"/>
<outputproperty name="omit-xml-declaration" value="yes"/>
</xslt>
</target>
<!-- **************************************************************************** -->
<!-- * * -->
<!-- * Targets for archiving results and report * -->
<!-- * * -->
<!-- **************************************************************************** -->
<target name="archive" depends="gen-xml-report">
<mkdir dir="${results.archive}"/>
<property name="archive.filename" value="${local.hostname}_${test-run.variant}_${test-run.start.time-stamp}_r${svn.revision}_${target.name}_Report.xml"/>
<gzip src="${test.results.dir}/Report.xml" destfile="${results.archive}/${archive.filename}.gz"/>
</target>
<!-- **************************************************************************** -->
<!-- * * -->
<!-- * Targets for generating a simple report * -->
<!-- * * -->
<!-- **************************************************************************** -->
<target name="gen-report" depends="archive">
<xslt in="${test.results.dir}/Report.xml"
out="${test.results.dir}/Report.html"
style="${jikesrvm.dir}/build/testing/report2html.xsl"
force="true">
<outputproperty name="method" value="html"/>
<outputproperty name="standalone" value="yes"/>
<outputproperty name="encoding" value="US-ASCII"/>
<outputproperty name="indent" value="yes"/>
</xslt>
</target>
<!-- **************************************************************************** -->
<!-- * * -->
<!-- * Target for uploading results to cattrack. * -->
<!-- * * -->
<!-- **************************************************************************** -->
<target name="upload-results" depends="archive" if="upload.results">
<exec executable="ssh" failonerror="true">
<arg value="${cattrack.upload.account}"/>
<arg value="mkdir"/>
<arg value="-p"/>
<arg value="${cattrack.upload.incoming.dir}/${local.hostname}"/>
</exec>
<exec executable="scp" failonerror="true">
<arg value="${results.archive}/${archive.filename}.gz"/>
<arg value="${cattrack.upload.account}:${cattrack.upload.incoming.dir}/${local.hostname}/${archive.filename}.gz_tmp"/>
</exec>
<exec executable="ssh" failonerror="true">
<arg value="${cattrack.upload.account}"/>
<arg value="chmod"/>
<arg value="go+rw"/>
<arg value="${cattrack.upload.incoming.dir}/${local.hostname}/${archive.filename}.gz_tmp"/>
</exec>
<exec executable="ssh" failonerror="true">
<arg value="${cattrack.upload.account}"/>
<arg value="mv"/>
<arg value="${cattrack.upload.incoming.dir}/${local.hostname}/${archive.filename}.gz_tmp"/>
<arg value="${cattrack.upload.incoming.dir}/${local.hostname}/${archive.filename}.gz"/>
</exec>
</target>
<!-- **************************************************************************** -->
<!-- * * -->
<!-- * Meta-target for reporting * -->
<!-- * * -->
<!-- **************************************************************************** -->
<target name="report" depends="test,upload-results,gen-report"/>
</project>

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks