blob: 6b301040b1b774e8344f24550f68944c57fe7301 [file] [log] [blame]
jeffliud0eb4a72005-09-28 14:58:59 +00001<project default="main" basedir=".">
2
3 <!--
4 Required inputs:
5
6 build.home
jeffliud0eb4a72005-09-28 14:58:59 +00007 buildType
8 buildId
9 date
10 time
david_williams42f9b242006-11-27 18:45:14 +000011 env.BASEOS
12 env.BASEWS
13 env.BASEARCH
jeffliu21a78862005-11-30 07:03:22 +000014 buildType.tests [optional]
15 buildId.tests [optional]
16 date.tests [optional]
17 time.tests [optional]
jeffliu5067e5e2006-07-10 19:21:17 +000018 build.stream [optional]
jeffliu21a78862005-11-30 07:03:22 +000019 build.committers [optional]
20 releng.tag [optional]
jeffliud0eb4a72005-09-28 14:58:59 +000021 perf.target [optional]
22 -->
david_williams42f9b242006-11-27 18:45:14 +000023 <!-- Note to be cross-platform, "environment variables" are only appropriate for
24 some variables, e.g. ones we set, since properties are case sensitive, even if
25 the environment variables on your operating system are not, e.g. it will
26 be ${env.Path} not ${env.PATH} on Windows -->
27 <property environment="env" />
28
29
30
jeffliud0eb4a72005-09-28 14:58:59 +000031 <target name="main">
jeffliu269ce342006-03-17 17:56:32 +000032 <property name="perf.buildId" value="${buildType}${date}-${time}"/>
33 <property name="timestamp" value="${date}${time}"/>
jeffliu21a78862005-11-30 07:03:22 +000034 <property name="buildType.tests" value="${buildType}"/>
35 <property name="buildId.tests" value="${buildId}"/>
36 <property name="date.tests" value="${date}"/>
37 <property name="time.tests" value="${time}"/>
jeffliu269ce342006-03-17 17:56:32 +000038 <property name="timestamp.tests" value="${date.tests}${time.tests}"/>
jeffliud0eb4a72005-09-28 14:58:59 +000039 <property file="${build.home}/releng.wtpbuilder/build.properties"/>
david_williams42f9b242006-11-27 18:45:14 +000040 <property name="local.cache.dir" value="${env.LOCAL_PREREQS_CACHE}"/>
jeffliu269ce342006-03-17 17:56:32 +000041 <property name="workDir" value="${build.home}/workDir"/>
42 <property name="perfRoot" value="${build.home}/perfRoot"/>
43 <delete dir="${workDir}" failonerror="false"/>
44 <delete dir="${perfRoot}" failonerror="false"/>
45 <mkdir dir="${local.cache.dir}"/>
46 <mkdir dir="${workDir}"/>
jeffliud0eb4a72005-09-28 14:58:59 +000047 <mkdir dir="${perfRoot}"/>
48 <antcall target="getReleng"/>
49 <property file="${perfRoot}/releng/maps/dependencies.properties"/>
jeffliu269ce342006-03-17 17:56:32 +000050 <antcall target="getDependencies"/>
51 <condition property="wtp-sdk" value="wtp-sdk-${buildId}.zip" else="wtp-sdk-${buildType}-${buildId}-${timestamp}.zip">
52 <available file="${local.cache.dir}/wtp-sdk-${buildId}.zip"/>
53 </condition>
54 <condition property="wtp-wst-tests" value="wtp-wst-Automated-Tests-${buildId}.zip" else="wtp-wst-Automated-Tests-${buildType}-${buildId}-${timestamp}.zip">
55 <available file="${local.cache.dir}/wtp-wst-Automated-Tests-${buildId}.zip"/>
56 </condition>
57 <condition property="wtp-jst-tests" value="wtp-jst-Automated-Tests-${buildId}.zip" else="wtp-jst-Automated-Tests-${buildType}-${buildId}-${timestamp}.zip">
58 <available file="${local.cache.dir}/wtp-jst-Automated-Tests-${buildId}.zip"/>
59 </condition>
jeffliue0a99af2006-03-28 20:57:45 +000060 <antcall target="setup"/>
jlanutica8b3542007-05-18 13:33:13 +000061 <condition property="15x">
62 <equals arg1="R1.5" arg2="${build.stream}"/>
63 </condition>
64 <antcall target="run_deprecated"/>
jeffliud0eb4a72005-09-28 14:58:59 +000065 <antcall target="run"/>
jeffliud0eb4a72005-09-28 14:58:59 +000066 </target>
67
68 <target name="getReleng">
jeffliu269ce342006-03-17 17:56:32 +000069 <property name="releng.tag" value="v${buildType}${timestamp}"/>
jeffliud0eb4a72005-09-28 14:58:59 +000070 <cvs
david_williams0e4fcd02005-11-06 20:10:58 +000071 cvsRoot=":pserver:anonymous@dev.eclipse.org:/cvsroot/webtools"
jeffliud0eb4a72005-09-28 14:58:59 +000072 package="releng"
73 dest="${perfRoot}"
74 command="export"
75 tag="${releng.tag}"
76 />
77 </target>
78
jeffliu269ce342006-03-17 17:56:32 +000079 <target name="getDependencies">
80 <property name="install.destination" value="${workDir}/"/>
81 <antcall target="getAndInstall">
82 <param name="groupId" value="eclipse" />
83 <param name="clean" value="true" />
84 </antcall>
85 </target>
86
jeffliud0eb4a72005-09-28 14:58:59 +000087 <target name="setup">
jeffliu269ce342006-03-17 17:56:32 +000088 <property file="${build.home}/releng.wtpbuilder/build.properties"/>
89 <property file="${perfRoot}/releng/maps/dependencies.properties"/>
jeffliud0eb4a72005-09-28 14:58:59 +000090 <property name="install.destination" value="${perfRoot}"/>
jeffliud0eb4a72005-09-28 14:58:59 +000091 <antcall target="getAndInstall">
92 <param name="groupId" value="eclipse" />
93 <param name="clean" value="true" />
94 </antcall>
95 <antcall target="getAndInstall">
96 <param name="groupId" value="eclipseTestFramework" />
97 <param name="clean" value="true" />
98 </antcall>
99 <antcall target="getAndInstall">
100 <param name="groupId" value="emf" />
101 <param name="clean" value="true" />
102 </antcall>
103 <antcall target="getAndInstall">
104 <param name="groupId" value="gef" />
105 <param name="clean" value="true" />
106 </antcall>
jlanuti201ffe32007-03-19 17:51:16 +0000107 <condition property="15x">
jlanuti99254572007-02-28 19:46:11 +0000108 <equals arg1="R1.5" arg2="${build.stream}"/>
109 </condition>
jlanuti201ffe32007-03-19 17:51:16 +0000110 <antcall target="getAndInstallDtp"/>
jeffliud0eb4a72005-09-28 14:58:59 +0000111 <antcall target="getAndInstall">
112 <param name="groupId" value="tomcat.5" />
113 </antcall>
114 <antcall target="getAndInstall">
115 <param name="groupId" value="tomcat.4" />
116 </antcall>
117 <antcall target="getAndInstall">
118 <param name="groupId" value="jonas.4" />
119 </antcall>
120 <antcall target="getAndInstall">
121 <param name="groupId" value="oagis.release" />
122 </antcall>
123 <antcall target="getAndInstall">
124 <param name="groupId" value="oagis.wsdl" />
125 </antcall>
126 <antcall target="getAndInstall">
127 <param name="groupId" value="derby" />
128 </antcall>
129 <antcall target="getAndInstallWTP">
jeffliu269ce342006-03-17 17:56:32 +0000130 <param name="file" value="wtp-sdk-${buildId}.zip" />
131 </antcall>
132 <antcall target="getAndInstallWTP">
133 <param name="file" value="wtp-sdk-${buildType}-${buildId}-${timestamp}.zip" />
jeffliud0eb4a72005-09-28 14:58:59 +0000134 </antcall>
135 <antcall target="getAndInstallWTP">
jeffliu21a78862005-11-30 07:03:22 +0000136 <param name="file" value="wtp-wst-Automated-Tests-${buildId.tests}.zip" />
jeffliud0eb4a72005-09-28 14:58:59 +0000137 </antcall>
138 <antcall target="getAndInstallWTP">
jeffliu269ce342006-03-17 17:56:32 +0000139 <param name="file" value="wtp-wst-Automated-Tests-${buildType.tests}-${buildId.tests}-${timestamp.tests}.zip" />
140 </antcall>
141 <antcall target="getAndInstallWTP">
jeffliu21a78862005-11-30 07:03:22 +0000142 <param name="file" value="wtp-jst-Automated-Tests-${buildId.tests}.zip" />
jeffliud0eb4a72005-09-28 14:58:59 +0000143 </antcall>
jeffliu269ce342006-03-17 17:56:32 +0000144 <antcall target="getAndInstallWTP">
145 <param name="file" value="wtp-jst-Automated-Tests-${buildType.tests}-${buildId.tests}-${timestamp.tests}.zip" />
146 </antcall>
jeffliud0eb4a72005-09-28 14:58:59 +0000147 <antcall target="setup.derby"/>
jeffliu269ce342006-03-17 17:56:32 +0000148 <copy file="${build.home}/releng.wtpbuilder/distribution/wtp.perf/performance-tests.xml" tofile="${perfRoot}/performance-tests.xml"></copy>
jlanuti2cc6acc2007-03-19 19:19:03 +0000149
150 <!-- get path to equinox jar inside ${eclipse.home} folder (copy/rename actual jar) -->
jlanutica8b3542007-05-18 13:33:13 +0000151 <copy todir="${workDir}/eclipse">
152 <fileset dir="${workDir}/eclipse/plugins">
153 <include name="org.eclipse.equinox.launcher_*.jar" />
154 </fileset>
jlanuti2cc6acc2007-03-19 19:19:03 +0000155 </copy>
jeffliud0eb4a72005-09-28 14:58:59 +0000156 </target>
jlanuti201ffe32007-03-19 17:51:16 +0000157
158 <target name="getAndInstallDtp" unless="15x">
159 <antcall target="getAndInstall">
160 <param name="groupId" value="dtp" />
161 <param name="clean" value="true" />
162 </antcall>
163 </target>
164
jeffliud0eb4a72005-09-28 14:58:59 +0000165 <target name="getAndInstall">
166 <property name="dependencyTargets" value="${build.home}/releng.wtpbuilder/scripts/dependency/build.xml"/>
167 <ant antfile="${dependencyTargets}" target="checkDependency">
168 <property name="groupId" value="${groupId}" />
169 </ant>
170 <ant antfile="${dependencyTargets}" target="installDependency">
171 <property name="groupId" value="${groupId}" />
172 </ant>
173 </target>
174
175 <target name="getAndInstallWTP">
jeffliu269ce342006-03-17 17:56:32 +0000176 <available file="${local.cache.dir}/${file}" property="file.exists"/>
jeffliud0eb4a72005-09-28 14:58:59 +0000177 <antcall target="getWTP"/>
jeffliu269ce342006-03-17 17:56:32 +0000178 <available file="${local.cache.dir}/${file}" property="file.exists"/>
179 <antcall target="installWTP"/>
jeffliud0eb4a72005-09-28 14:58:59 +0000180 </target>
181
jeffliu21a78862005-11-30 07:03:22 +0000182 <target name="getWTP">
jeffliu5067e5e2006-07-10 19:21:17 +0000183 <condition property="file.url.1" value="http://download.eclipse.org/webtools/committers" else="http://download.eclipse.org/webtools/downloads">
jeffliu21a78862005-11-30 07:03:22 +0000184 <isset property="build.committers"/>
185 </condition>
jeffliu5067e5e2006-07-10 19:21:17 +0000186 <condition property="file.url" value="${file.url.1}/drops/${build.stream}/${buildType}-${buildId}-${timestamp}" else="${file.url.1}/drops/${buildType}-${buildId}-${timestamp}">
187 <isset property="build.stream"/>
188 </condition>
jeffliu21a78862005-11-30 07:03:22 +0000189 <antcall target="getWTP2"/>
190 </target>
191
192 <target name="getWTP2" unless="file.exists">
jeffliu5067e5e2006-07-10 19:21:17 +0000193 <property name="file.url" value="http://download.eclipse.org/webtools/downloads/drops/${build.stream}/${buildType}-${buildId}-${timestamp}"/>
jeffliu269ce342006-03-17 17:56:32 +0000194 <get dest="${local.cache.dir}/${file}" src="${file.url}/${file}" ignoreerrors="true"/>
195 </target>
196
197 <target name="installWTP" if="file.exists">
198 <unzip src="${local.cache.dir}/${file}" dest="${install.destination}" overwrite="true"/>
jeffliud0eb4a72005-09-28 14:58:59 +0000199 </target>
200
201 <target name="setup.derby">
202 <property name="derby" value="${install.destination}/eclipse/plugins/org.apache.derby"/>
203 <mkdir dir="${derby}"/>
204 <copy todir="${derby}" overwrite="true">
205 <fileset dir="${perfRoot}/incubating-derby-10.0.2.1-bin/lib">
206 <include name="**/*.jar"/>
207 </fileset>
208 </copy>
jeffliu269ce342006-03-17 17:56:32 +0000209 <copy tofile="${derby}/plugin.xml" file="${build.home}/releng.wtpbuilder/distribution/wtp.perf/derby.plugin.xml.template" overwrite="true"/>
jeffliud0eb4a72005-09-28 14:58:59 +0000210 <replace dir="${perfRoot}/eclipse/plugins" value="&lt;import plugin=&quot;org.apache.derby&quot;/&gt;">
211 <include name="org.eclipse.test.performance_*/plugin.xml"/>
212 <replacetoken><![CDATA[<import plugin="org.apache.derby" optional="true"/>]]></replacetoken>
213 </replace>
214 </target>
215
jlanutica8b3542007-05-18 13:33:13 +0000216 <target name="run" unless="15x">
jeffliud0eb4a72005-09-28 14:58:59 +0000217 <property name="perf.target" value="main"/>
jeffliu269ce342006-03-17 17:56:32 +0000218 <mkdir dir="${perfRoot}/results/consolelogs"/>
jlanutica8b3542007-05-18 13:33:13 +0000219 <java fork="true" failonerror="true" timeout="28800000" output="${perfRoot}/results/consolelogs/wtpperflog.txt" dir="${workDir}"
220 classname="org.eclipse.equinox.launcher.Main">
221 <classpath>
222 <fileset dir="${workDir}/eclipse/plugins">
223 <include name="org.eclipse.equinox.launcher_*.jar" />
224 </fileset>
225 </classpath>
226 <jvmarg value="-Dosgi.ws=${env.BASEWS}" />
david_williams42f9b242006-11-27 18:45:14 +0000227 <jvmarg value="-Dosgi.os=${env.BASEOS}" />
228 <jvmarg value="-Dosgi.arch=${env.BASEARCH}" /> <jvmarg value="-Dnoclean=true" />
jeffliu269ce342006-03-17 17:56:32 +0000229 <jvmarg value="-DbuildType=${buildType}" />
230 <jvmarg value="-DbuildId=${buildId}" />
231 <jvmarg value="-Dtimestamp=${timestamp}"/>
232 <jvmarg value="-DbuildType.tests=${buildType.tests}" />
233 <jvmarg value="-DbuildId.tests=${buildId.tests}" />
234 <jvmarg value="-Dtimestamp.tests=${timestamp.tests}"/>
235 <arg value="-propertyfile" />
236 <arg value="${build.home}/releng.wtpbuilder/distribution/wtp.perf/perf.properties" />
237 <arg value="-application" />
238 <arg value="org.eclipse.ant.core.antRunner" />
239 <arg value="-file" />
240 <arg value="${build.home}/releng.wtpbuilder/distribution/wtp.perf/perf.xml" />
241 <arg value="-logger" />
242 <arg value="org.apache.tools.ant.DefaultLogger" />
243 <arg value="${perf.target}" />
244 <sysproperty key="eclipse-home" value="${perfRoot}/eclipse"/>
245 <sysproperty key="perf.buildId" value="${perf.buildId}"/>
jeffliu269ce342006-03-17 17:56:32 +0000246 <sysproperty key="build.home" value="${build.home}" />
247 <sysproperty key="local.cache.dir" value="${local.cache.dir}"/>
248 <sysproperty key="perfRoot" value="${perfRoot}"/>
249 <sysproperty key="testDir" value="${perfRoot}" />
250 </java>
jeffliud0eb4a72005-09-28 14:58:59 +0000251 </target>
jeffliu269ce342006-03-17 17:56:32 +0000252
jlanutica8b3542007-05-18 13:33:13 +0000253 <target name="run_deprecated" if="15x">
254 <property name="perf.target" value="main"/>
255 <mkdir dir="${perfRoot}/results/consolelogs"/>
256 <java fork="true" failonerror="true" timeout="28800000" output="${perfRoot}/results/consolelogs/wtpperflog.txt" dir="${workDir}"
257 classname="org.eclipse.core.launcher.Main">
258 <classpath>
259 <fileset dir="${workDir}/eclipse/plugins">
260 <include name="startup.jar" />
261 </fileset>
262 </classpath>
263 <jvmarg value="-Dosgi.ws=${env.BASEWS}" />
264 <jvmarg value="-Dosgi.os=${env.BASEOS}" />
265 <jvmarg value="-Dosgi.arch=${env.BASEARCH}" /> <jvmarg value="-Dnoclean=true" />
266 <jvmarg value="-DbuildType=${buildType}" />
267 <jvmarg value="-DbuildId=${buildId}" />
268 <jvmarg value="-Dtimestamp=${timestamp}"/>
269 <jvmarg value="-DbuildType.tests=${buildType.tests}" />
270 <jvmarg value="-DbuildId.tests=${buildId.tests}" />
271 <jvmarg value="-Dtimestamp.tests=${timestamp.tests}"/>
272 <arg value="-propertyfile" />
273 <arg value="${build.home}/releng.wtpbuilder/distribution/wtp.perf/perf.properties" />
274 <arg value="-application" />
275 <arg value="org.eclipse.ant.core.antRunner" />
276 <arg value="-file" />
277 <arg value="${build.home}/releng.wtpbuilder/distribution/wtp.perf/perf.xml" />
278 <arg value="-logger" />
279 <arg value="org.apache.tools.ant.DefaultLogger" />
280 <arg value="${perf.target}" />
281 <sysproperty key="eclipse-home" value="${perfRoot}/eclipse"/>
282 <sysproperty key="perf.buildId" value="${perf.buildId}"/>
283 <sysproperty key="build.home" value="${build.home}" />
284 <sysproperty key="local.cache.dir" value="${local.cache.dir}"/>
285 <sysproperty key="perfRoot" value="${perfRoot}"/>
286 <sysproperty key="testDir" value="${perfRoot}" />
287 </java>
288 </target>
289
jeffliu269ce342006-03-17 17:56:32 +0000290 <target name="graph">
jeffliu5820f872006-05-03 14:40:36 +0000291 <property name="perf.buildId" value="${buildType}${date}-${time}"/>
292 <property name="perfRoot" value="${build.home}/perfRoot"/>
jeffliu269ce342006-03-17 17:56:32 +0000293 <cvs
294 cvsRoot=":pserver:anonymous@dev.eclipse.org:/cvsroot/eclipse"
295 package="org.eclipse.releng.basebuilder"
296 dest="${perfRoot}"
297 command="export"
298 tag="M5_32"
299 />
300 <property file="${build.home}/releng.wtpbuilder/distribution/wtp.perf/perf.properties"/>
301 <antcall target="setup.derby">
302 <param name="derby" value="${perfRoot}/org.eclipse.releng.basebuilder/plugins/org.apache.derby"/>
303 </antcall>
304 <mkdir dir="${perfRoot}/results/graph"/>
david_williams54315a72007-02-14 22:50:44 +0000305 <java jar="${perfRoot}/org.eclipse.releng.basebuilder/startup.jar" fork="true" failonerror="true" timeout="3600000" dir="${perfRoot}">
david_williams42f9b242006-11-27 18:45:14 +0000306 <jvmarg value="-Dosgi.ws=${env.BASEWS}" />
307 <jvmarg value="-Dosgi.os=${env.BASEOS}" />
david_williams54315a72007-02-14 22:50:44 +0000308 <jvmarg value="-Dosgi.arch=${env.BASEARCH}" />
309 <jvmarg value="-Declipse.perf.dbloc=${build.home}/${perf.dbloc}"/>
jeffliu269ce342006-03-17 17:56:32 +0000310 <arg value="-application" />
311 <arg value="org.eclipse.test.performance.ui.resultGenerator" />
312 <arg value="-baseline"/>
313 <arg value="${perf.ref.buildId}"/>
314 <arg value="-baseline.prefix"/>
315 <arg value="${perf.ref.config}"/>
316 <arg value="-current"/>
317 <arg value="${perf.buildId}"/>
318 <arg value="-current.prefix"/>
319 <arg value="${perf.config}"/>
320 <arg value="-jvm"/>
321 <arg value="${perf.jvm}"/>
322 <arg value="-config"/>
323 <arg value="${perf.config}"/>
324 <arg value="-output"/>
325 <arg value="${perfRoot}/results/graph"/>
326 </java>
327 <copy file="${build.home}/releng.wtpbuilder/distribution/wtp.perf/performance.php" tofile="${perfRoot}/results/graph/performance.php"/>
328 </target>
329
330 <target name="upload" if="login">
jeffliu5820f872006-05-03 14:40:36 +0000331 <mkdir dir="${build.home}/archives"/>
332 <zip destfile="${build.home}/archives/${buildType}-${buildId}-${date}${time}.zip" basedir="${build.home}/perfRoot/results"/>
jeffliu5067e5e2006-07-10 19:21:17 +0000333 <condition property="upload.path.1"
334 else="~/downloads/webtools/downloads"
335 value="~/downloads/webtools/committers">
jeffliu269ce342006-03-17 17:56:32 +0000336 <isset property="build.committers"/>
337 </condition>
jeffliu5067e5e2006-07-10 19:21:17 +0000338 <condition property="upload.path"
339 else="${upload.path.1}/drops/${buildType}-${buildId}-${date}${time}/perfresults"
340 value="${upload.path.1}/drops/${build.stream}/${buildType}-${buildId}-${date}${time}/perfresults">
341 <isset property="build.stream"/>
342 </condition>
jeffliu269ce342006-03-17 17:56:32 +0000343 <exec executable="ssh" dir="${build.home}">
jeffliu5820f872006-05-03 14:40:36 +0000344 <arg line="${login}@download1.eclipse.org rm -rf ${upload.path}"/>
345 </exec>
346 <exec executable="ssh" dir="${build.home}">
jeffliu269ce342006-03-17 17:56:32 +0000347 <arg line="${login}@download1.eclipse.org mkdir ${upload.path}"/>
348 </exec>
349 <exec executable="scp" dir="${build.home}">
jeffliu9b95b082006-03-29 19:41:10 +0000350 <arg line="-r ./perfRoot/results/consolelogs ${login}@download1.eclipse.org:${upload.path}"/>
351 </exec>
352 <exec executable="scp" dir="${build.home}">
353 <arg line="-r ./perfRoot/results/html ${login}@download1.eclipse.org:${upload.path}"/>
354 </exec>
355 <exec executable="scp" dir="${build.home}">
356 <arg line="-r ./perfRoot/results/xml ${login}@download1.eclipse.org:${upload.path}"/>
357 </exec>
358 <exec executable="scp" dir="${build.home}">
359 <arg line="-r ./perfRoot/results/graph ${login}@download1.eclipse.org:${upload.path}"/>
jeffliu269ce342006-03-17 17:56:32 +0000360 </exec>
361 </target>
362
363 <target name="clean" if="clean">
jeffliu7c7e7242006-05-01 20:30:52 +0000364 <property file="${build.home}/releng.wtpbuilder/build.properties"/>
david_williams42f9b242006-11-27 18:45:14 +0000365 <property name="local.cache.dir" value="${env.LOCAL_PREREQS_CACHE}"/>
jeffliu7c7e7242006-05-01 20:30:52 +0000366 <property name="workDir" value="${build.home}/workDir"/>
367 <property name="perfRoot" value="${build.home}/perfRoot"/>
jeffliu269ce342006-03-17 17:56:32 +0000368 <delete dir="${workDir}" failonerror="false"/>
369 <delete dir="${perfRoot}" failonerror="false"/>
jeffliu7c7e7242006-05-01 20:30:52 +0000370 <delete failonerror="false">
371 <fileset dir="${local.cache.dir}" includes="wtp-*"/>
372 </delete>
jeffliu269ce342006-03-17 17:56:32 +0000373 </target>
374
jeffliud0eb4a72005-09-28 14:58:59 +0000375</project>