-
Notifications
You must be signed in to change notification settings - Fork 71
/
test.xml
239 lines (222 loc) · 7.58 KB
/
test.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
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
<?xml version="1.0" encoding="UTF-8"?>
<project
name="RelEng Automated Tests"
default="run"
basedir=".">
<property environment="env" />
<!-- The property ${eclipse-home} should be passed into this script -->
<!-- sets the properties eclipse-home, and library-file -->
<property
name="eclipse-home"
value="${basedir}/../../" />
<property
name="plugin-name"
value="org.eclipse.releng.tests" />
<property
name="library-file"
value="${eclipse-home}/plugins/org.eclipse.test/library.xml" />
<!-- This target holds all initialization code that needs to be done for -->
<!-- all tests that are to be run. Initialization for individual tests -->
<!-- should be done within the body of the suite target. -->
<target name="init">
<tstamp />
<condition property="JAVADOC_OUTPUT_LOCATION" value="file:///${eclipse-home}/../../../.." else="file:///${eclipse-home}/../.." >
<os family="mac" />
</condition>
<condition property="downloadHost" value="${env.DOWNLOAD_HOST}" else="download.eclipse.org">
<isset property="env.DOWNLOAD_HOST" />
</condition>
<condition property="tar.gz">
<contains
string="${runtimeArchive}"
substring=".tar.gz" />
</condition>
<condition
property="location"
value="/builds/t">
<equals
arg1="${os}"
arg2="win32" />
</condition>
<property
name="location"
value="${basedir}/releng" />
<property
name="locationcompare"
value="${basedir}/relengcompare" />
<property
name="locationcomparecurrent"
value="${basedir}/relengcomparecurrent" />
<!-- Is now 4 part qualifier. Value used to be set at start of file.
But, then had to use only 3 part qualifier. Now, set elsewhere?
<property name="org.eclipse.releng.tests" value="org.eclipse.releng.tests_3.2.300" />
-->
<echo message="Full name with versionand qualifier of org.eclipse.releng.tests:" />
<echo message=" ${org.eclipse.releng.tests}" />
</target>
<!-- This target holds code to cleanup the testing environment after the tests -->
<!-- have been run. You can use this to delete temporary files that are created. -->
<target name="cleanup">
<!-- temp, leave for inspection
<delete dir="${location}" quiet="true" />
<delete dir="${locationcompare}" />
-->
</target>
<target
name="setup"
if="tar.gz">
<property
name="archiveDir"
value="${eclipse-home}/../.." />
<delete dir="${location}" />
<mkdir dir="${location}" />
<exec
dir="${location}"
executable="tar">
<arg line="-xzf ${archiveDir}/${runtimeArchive}" />
</exec>
<condition property="notMac">
<not>
<os family="mac" />
</not>
</condition>
</target>
<target
name="setupcompare"
if="notMac">
<!--
Run compare test only on Linux machine since it is the fastest machine.
Also, the compare tool only parses feature.xmls so it only needs to be run on one machine.
-->
<delete dir="${locationcompare}" />
<mkdir dir="${locationcompare}" />
<property
name="locationcomparetemp"
value="${locationcompare}/temp" />
<delete dir="${locationcomparetemp}" />
<mkdir dir="${locationcomparetemp}" />
<delete dir="${locationcompare}" />
<mkdir dir="${locationcompare}" />
<property
name="locationcomparetemp"
value="${locationcompare}/temp" />
<delete dir="${locationcomparetemp}" />
<mkdir dir="${locationcomparetemp}" />
<property file="${basedir}/../../equinoxp2tests.properties" />
<p2.mirror
source="${org.eclipse.equinox.p2.tests.last.release.build.repo}"
ignoreErrors="true">
<destination
kind="metadata"
location="file://${locationcomparetemp}"
name="Current build Repo" />
<destination
kind="artifact"
location="file://${locationcomparetemp}"
name="Current build Repo" />
</p2.mirror>
<p2.repo2runnable destination="${locationcompare}">
<source
dir="${locationcompare}"
includes="temp" />
</p2.repo2runnable>
<delete dir="${locationcomparetemp}" />
<delete dir="${locationcomparecurrent}" />
<mkdir dir="${locationcomparecurrent}" />
<property
name="locationcomparecurrenttemp"
value="${locationcomparecurrent}/temp" />
<delete dir="${locationcomparecurrenttemp}" />
<mkdir dir="${locationcomparecurrenttemp}" />
<p2.mirror
source="${org.eclipse.equinox.p2.tests.current.build.repo}"
ignoreErrors="true">
<destination
kind="metadata"
location="file://${locationcomparecurrenttemp}"
name="Current build Repo" />
<destination
kind="artifact"
location="file://${locationcomparecurrenttemp}"
name="Current build Repo" />
</p2.mirror>
<p2.repo2runnable destination="${locationcomparecurrent}">
<source
dir="${locationcomparecurrent}"
includes="temp" />
</p2.repo2runnable>
<delete dir="${locationcomparecurrenttemp}" />
<replace
file="${basedir}/plugins/${org.eclipse.releng.tests}/compare.properties"
token="@new@"
value="${locationcomparecurrent}/features" />
<replace
file="${basedir}/plugins/${org.eclipse.releng.tests}/compare.properties"
token="@old@"
value="${locationcompare}/features" />
<property
name="versionOutputDir"
value="${locationcompare}/../../../results/versiontool" />
<mkdir dir="${versionOutputDir}" />
<exec
dir="${versionOutputDir}"
executable="/bin/touch"
failonerror="false"
os="Linux">
<arg line="results.xml" />
</exec>
<property
name="versionOutputFile"
value="${versionOutputDir}/results.xml" />
<echo message="locationcompare ${locationcompare} versionOutputDir ${versionOutputDir} versionOutputFile ${versionOutputFile}" />
<replace
file="${basedir}/plugins/${org.eclipse.releng.tests}/compare.properties"
token="@output@"
value="${versionOutputFile}" />
<replace
file="${basedir}/plugins/${org.eclipse.releng.tests}/compare.properties"
token="@compareoptions@"
value="${basedir}/plugins/${org.eclipse.releng.tests}/compareoptions.properties" />
</target>
<!-- This target runs the test suite. Any actions that need to happen after all -->
<!-- the tests have been run should go here. -->
<target
name="run"
depends="init,BuildTests">
<ant
target="collect"
antfile="${library-file}"
dir="${eclipse-home}">
<property
name="includes"
value="org*.xml" />
<property
name="output-file"
value="${plugin-name}.xml" />
</ant>
</target>
<target
name="BuildTests"
depends="init,cleanup,setup">
<ant
target="core-test"
antfile="${library-file}"
dir="${eclipse-home}">
<property
name="data-dir"
value="${location}" />
<property
name="plugin-name"
value="${plugin-name}" />
<property
name="classname"
value="org.eclipse.releng.tests.BuildTests" />
<property
name="plugin-path"
value="${eclipse-home}/plugins/${org.eclipse.releng.tests}" />
<property
name="vmargs"
value="-DdownloadHost=${downloadHost} -DbuildId=${buildId} -DRELENGTEST.JAVADOC.URLS=${JAVADOC_OUTPUT_LOCATION}/platform.doc.isv.javadoc.txt,${JAVADOC_OUTPUT_LOCATION}/jdt.doc.isv.javadoc.txt,${JAVADOC_OUTPUT_LOCATION}/pde.doc.user.javadoc.txt,${JAVADOC_OUTPUT_LOCATION}/platform.doc.isv.schema.txt" />
</ant>
</target>
</project>