-
Notifications
You must be signed in to change notification settings - Fork 0
/
collectTestResults.xml
113 lines (92 loc) · 2.72 KB
/
collectTestResults.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
<?xml version="1.0" encoding="UTF-8"?>
<project
name="collectTestResults"
default="collectTestResults"
basedir=".">
<!-- example properties. Caller normally provides. -->
<property
name="buildURL"
value="https://ci.eclipse.org/releng/job/AutomatedTests/job/ep426I-unit-cen64-gtk3-java17" />
<property
name="buildID"
value="N20121014-2000" />
<!--<property
name="EBUILDER_HASH"
value="master" />-->
<target
name="init"
unless="collectTestResultsInitialized">
<fail unless="buildURL" />
<fail unless="postingDirectory" />
<fail unless="buildID" />
<property
name="jenkinsJobURL"
value="${buildURL}" />
<property
name="jenkinsResultURL"
value="${jenkinsJobURL}/artifact/*zip*/archive.zip" />
<echo message="jenkinsResultURL ${jenkinsResultURL} " />
<property
name="postingDirectory"
value="${postingDirectory}" />
<echo message="postingDirectory: ${postingDirectory}"/>
<condition
property="resultsDir"
value="${postingDirectory}/${buildID}/performance"
else="${postingDirectory}/${buildID}/testresults">
<contains
string="${jenkinsJobURL}"
substring="-perf-"
casesensitive="yes" />
</condition>
<!-- attempt to create incase hasn't been created yet -->
<mkdir dir="${resultsDir}" />
<property
name="tmpzipdir"
value="${resultsDir}/tmpzip" />
<mkdir dir="${tmpzipdir}" />
<property
name="collectTestResultsInitialized"
value="true" />
</target>
<target
name="collectTestResults"
depends="init"
description="Collect Test Results from Jenkins to build machine location.">
<retry
retrycount="3"
retrydelay="1000">
<get
ignoreerrors="true"
verbose="true"
src="${jenkinsResultURL}"
dest="${tmpzipdir}/archive.zip" />
</retry>
<unzip
overwrite="true"
src="${tmpzipdir}/archive.zip"
dest="${resultsDir}/">
<globmapper
from="archive/workarea/${buildID}/eclipse-testing/results/*"
to="*" />
</unzip>
<!-- This is needed for the summary table on the I-build download page -->
<property
name="jenkinsResultXML"
value="${jenkinsJobURL}/testReport/api/xml?tree=failCount,passCount,skipCount,duration" />
<echo message="jenkinsResultXML ${jenkinsResultXML} " />
<retry
retrycount="3"
retrydelay="1000">
<get
src="${jenkinsResultXML}"
dest="${resultsDir}/${job}.xml" />
</retry>
<delete failonerror="false">
<fileset dir="${resultsDir}">
<include name="${tmpzipdir}" />
<include name="archive/**" />
</fileset>
</delete>
</target>
</project>