Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

[6669a9]: test.xml Maximize Restore History

Download this file

test.xml    426 lines (385 with data), 20.4 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
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
<!--
~ This file is part of the Jikes RVM project (http://jikesrvm.org).
~
~ This file is licensed to You under the Eclipse Public License (EPL);
~ 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/eclipse-1.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="require.checkstyle" value="false"/>
<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="test.results.file" value="${test.results.dir}/Results.xml"/>
<property name="build.results.file" value="${test.results.dir}/BuildResults.xml"/>
<property name="test.report.file" value="${test.results.dir}/Report.xml"/>
<property name="test.report.html" value="${test.results.dir}/Report.html"/>
<property name="temp.aggregate.file" value="${test.results.dir}/Aggregate.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}.target" value="main"/>
<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="default"/>
<property name="test.config.@{tag}.mode" value="${test.mode}"/>
<property name="test.config.@{tag}.extra.rvm.args" value=""/>
</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="yyyy-MM-dd'T'HH:mm:ss'Z'" 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[<buildresults>
<build-target>
<name>${target.name}</name>
<parameters>]]></bres>
<property file="${target.file}" prefix="build-target"/>
<forEach list="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" property="parameter">
<sequential>
<bres append="true"><![CDATA[
<parameter key="@{parameter}" value="${build-target.@{parameter}}"/>]]></bres>
</sequential>
</forEach>
<bres append="true"><![CDATA[
</parameters>]]></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"
target="${test.config.@{tag}.target}"
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}"/>
<property name="require.checkstyle" value="${require.checkstyle}"/>
</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>
<name>${test.config.@{tag}.configuration}</name>
<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.assertions config.default-heapsize.initial config.default-heapsize.maximum config.bootimage.compiler.args config.stress-gc-interval config.alignment-checking"/>
<forEach list="${properties.config}" property="property">
<sequential>
<bres><![CDATA[
<parameter key="@{property}" value="${@{tag}.@{property}}"/>]]></bres>
</sequential>
</forEach>
<bres><![CDATA[
</parameters>
<duration>${test.config.@{tag}.build.time}</duration>
<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>
</build-configuration>]]></bres>
</sequential>
</if>
<if>
<conditions>
<and>
<not>
<isset property="${test.config.@{tag}.configuration}.built"/>
</not>
<isset property="skip.build"/>
</and>
</conditions>
<sequential>
<property name="${test.config.@{tag}.configuration}.built" value="true"/>
<bres><![CDATA[
<build-configuration>
<name>${test.config.@{tag}.configuration}</name>
<parameters></parameters>
<duration>0</duration>
<result>SUCCESS</result>
<output>Builds are being skipped</output>
</build-configuration>]]></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}"/>
<echo message=" Extra RVM Args: ${test.config.@{tag}.extra.rvm.args}"/>
<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}"/>
<property name="test.config.${test.config.@{tag}.configuration}.extra.rvm.args" value="${test.config.@{tag}.extra.rvm.args}"/>
<propertyset>
<propertyref prefix="exclude."/>
</propertyset>
</subant>
</sequential>
</forEach>
</sequential>
</if>
</sequential>
</forEach>
<bres><![CDATA[
</build-target>
</buildresults>
]]></bres>
</target>
<!-- **************************************************************************** -->
<!-- * * -->
<!-- * Targets for generating results * -->
<!-- * * -->
<!-- **************************************************************************** -->
<target name="gen-xml-results" depends="init,get-svn-version">
<mkdir dir="${build.results.dir}"/>
<mkdir dir="${test.results.dir}"/>
<tstamp prefix="test-run.end">
<format property="time" pattern="yyyy-MM-dd'T'HH:mm:ss'Z'" timezone="UTC"/>
</tstamp>
<echo file="${test.results.file}" append="false"><![CDATA[<results version="1.1">
<name>${test-run.name}</name>
<variant>${test-run.variant}</variant>
<revision>${svn.revision}</revision>
<start-time>${test-run.start.time}</start-time>
<end-time>${test-run.end.time}</end-time>
<parameters>
</parameters>
<host>
<name>${local.hostname}</name>
<parameters>
</parameters>
</host>]]></echo>
<forEach list="${test.configs}" property="tag">
<sequential>
<testRunPropertyInit tag="@{tag}"/>
<property prefix="@{tag}" file="${test.config.@{tag}.rvm.dir}/constants.properties"/>
<echo file="${build.results.dir}/@{tag}.xml" append="false"><![CDATA[
<test-configuration>
<build-configuration>${test.config.@{tag}.configuration}</build-configuration>
<name>${test.config.@{tag}.name}</name>
<parameters>
<parameter key="mode" value="${test.config.@{tag}.rvm.dir}"/>
<parameter key="mode" value="${test.config.@{tag}.mode}"/>
</parameters>
]]></echo>
<forEach list="${test.config.@{tag}.tests}" property="test">
<sequential>
<erxmlvalidate lenient="true" failonerrorproperty="@{tag}.@{test}.Results.xml.valid">
<fileset dir="${test.results.dir}" includes="@{tag}/@{test}/Results.xml"/>
</erxmlvalidate>
<if>
<conditions>
<not>
<isset property="@{tag}.@{test}.Results.xml.valid"/>
</not>
</conditions>
<sequential>
<concat destfile="${build.results.dir}/@{tag}.xml" append="true">
<fileset dir="${test.results.dir}" includes="@{tag}/@{test}/Results.xml"/>
</concat>
</sequential>
</if>
</sequential>
</forEach>
<echo file="${build.results.dir}/@{tag}.xml" append="true"><![CDATA[
</test-configuration>]]></echo>
<erxmlvalidate lenient="true" failonerrorproperty="@{tag}.xml.valid">
<fileset dir="${build.results.dir}" includes="@{tag}.xml"/>
</erxmlvalidate>
<if>
<conditions>
<not>
<isset property="@{tag}.xml.valid"/>
</not>
</conditions>
<sequential>
<concat destfile="${test.results.file}" append="true">
<fileset dir="${build.results.dir}" includes="@{tag}.xml"/>
</concat>
</sequential>
</if>
</sequential>
</forEach>
<echo file="${test.results.file}" append="true"><![CDATA[
</results>
]]></echo>
</target>
<!-- **************************************************************************** -->
<!-- * * -->
<!-- * Generate XML report * -->
<!-- * * -->
<!-- **************************************************************************** -->
<target name="gen-xml-report" depends="gen-xml-results">
<echo file="${temp.aggregate.file}" append="false"><![CDATA[<aggregate>
]]></echo>
<concat destfile="${temp.aggregate.file}" append="true">
<filelist dir="${test.results.dir}" files="BuildResults.xml,Results.xml"/>
</concat>
<echo file="${temp.aggregate.file}" append="true"><![CDATA[
</aggregate>]]></echo>
<xslt in="${temp.aggregate.file}"
out="${test.report.file}"
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>
<delete file="${temp.aggregate.file}"/>
</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.report.file}" destfile="${results.archive}/${archive.filename}.gz"/>
</target>
<!-- **************************************************************************** -->
<!-- * * -->
<!-- * Targets for generating a simple report * -->
<!-- * * -->
<!-- **************************************************************************** -->
<target name="gen-report-html" depends="archive">
<xslt in="${test.report.file}"
out="${test.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}"/>
</exec>
<exec executable="scp" failonerror="true">
<arg value="${results.archive}/${archive.filename}.gz"/>
<arg value="${cattrack.upload.account}:${cattrack.upload.incoming.dir}/${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}/${archive.filename}.gz_tmp"/>
</exec>
<exec executable="ssh" failonerror="true">
<arg value="${cattrack.upload.account}"/>
<arg value="mv"/>
<arg value="${cattrack.upload.incoming.dir}/${archive.filename}.gz_tmp"/>
<arg value="${cattrack.upload.incoming.dir}/${archive.filename}.gz"/>
</exec>
</target>
<!-- **************************************************************************** -->
<!-- * * -->
<!-- * Meta-target for reporting * -->
<!-- * * -->
<!-- **************************************************************************** -->
<target name="report" depends="test,upload-results,gen-report-html"/>
</project>