blob: ec9bf0bfd8c66ae575d0a3e408375ae4c1e6f847 [file] [log] [blame]
Stephan Herrmanndcd87c12010-04-25 10:59:27 +00001<?xml version="1.0"?>
2<!--
3 Copyright (c) 2010 Stephan Herrmann and others.
Stephan Herrmann35705382020-03-03 21:42:19 +01004This program and the accompanying materials
5are made available under the terms of the Eclipse Public License 2.0
6which accompanies this distribution, and is available at
7https://www.eclipse.org/legal/epl-2.0/
Stephan Herrmanndcd87c12010-04-25 10:59:27 +00008
Stephan Herrmann35705382020-03-03 21:42:19 +01009SPDX-License-Identifier: EPL-2.0
Stephan Herrmanndcd87c12010-04-25 10:59:27 +000010 Contributors:
11 Stephan Herrmann - initial API and implementation
12-->
13<project name="Main Object Teams Build and Test Automation" default="INFO">
14
15 <target name="showGivenProperties"
16 description="Show values of all properties that should be passed from our caller.">
17 <echo>Properties passed into this script:
18------------------------------------------------------------------------------
Stephan Herrmann5acccae2019-04-13 17:46:35 +020019path of base eclipse SDK:
Stephan Herrmanndcd87c12010-04-25 10:59:27 +000020 eclipse-app.tgz = ${eclipse-app.tgz}
Stephan Herrmannaf43e4a2013-04-29 23:19:56 +020021eclipse SDK build qualifier:
22 eclipse.sdk.qualifier = ${eclipse.sdk.qualifier}
Stephan Herrmanndcd87c12010-04-25 10:59:27 +000023path of eclipse test framework:
Stephan Herrmann8372dc22010-06-03 22:41:05 +000024 eclipse.tests.zip= ${eclipse.tests.zip}
25path of published updates:
26 published.updates= ${published.updates}
Stephan Herrmanndcd87c12010-04-25 10:59:27 +000027should sources be built (true|false)?
28 do.build.all = ${do.build.all}
29should test be run (true|false)?
30 do.run.tests = ${do.run.tests}
Stephan Herrmann56428e92013-02-23 12:29:56 +010031directory for tempory files during testing:
32 test.tmpDir = ${test.tmpDir}
Stephan Herrmanne73f8852016-11-01 00:23:59 +010033git working area
34 fetchCacheLocation = ${fetchCacheLocation}
Stephan Herrmanne8ce6eb2016-11-01 01:01:55 +010035path to map file (with substitutions):
36 map.file.path = ${map.file.path}
37
Stephan Herrmanndcd87c12010-04-25 10:59:27 +000038------------------------------------------------------------------------------
39 </echo>
40 </target>
41
42 <target name="setupProperties" depends="showGivenProperties">
43
44 <dirname property="_toplevelDir" file="${ant.file}"/>
45
46 <!-- main configuration file (version dependent names etc.): -->
47 <loadproperties srcfile="${_toplevelDir}/run.properties" />
48
Stephan Herrmanndcd87c12010-04-25 10:59:27 +000049 <!-- ======== Directories (indentation shows structure): ======== -->
50 <!-- build scripts: -->
51 <property name="OTScriptDir" value="${_toplevelDir}" />
52 <property name="buildfile" value="${OTScriptDir}/build.xml" />
53 <property name="builder-otcompiler" value="${OTScriptDir}/OT-Compiler" />
54 <property name="builder-otdt" value="${OTScriptDir}/OTDT-Build" />
Stephan Herrmann89245632019-04-13 20:05:41 +020055
56 <!-- directories for testing: -->
57 <property name="test.root.dir" value="${user.dir}/test-root" />
58 <!-- This name is used in individual test.xml of test plugins: -->
59 <property name="test.eclipseDir" value="${test.root.dir}/eclipse" />
Stephan Herrmanndcd87c12010-04-25 10:59:27 +000060
61 <!-- directories for the build: -->
62 <property name="build.root.dir" value="${user.dir}/build-root" />
Stephan Herrmann33c26042010-06-03 10:24:16 +000063 <!-- These names are hard coded in pde-build: -->
64 <property name="buildDirectory" value="${build.root.dir}/src" />
Stephan Herrmann342fbb32019-04-13 20:20:46 +020065 <property name="bootLocation" value="${build.root.dir}/eclipse" />
Stephan Herrmann89245632019-04-13 20:05:41 +020066 <property name="baseLocation" value="${test.eclipseDir}" />
Stephan Herrmanndcd87c12010-04-25 10:59:27 +000067
68 <!-- directories for update sites: -->
69 <property name="otdtUpdatesDir" value="${user.dir}/updateSite"/>
70 <property name="testsUpdatesDirBase" value="${user.dir}/updateSiteTests"/>
Stephan Herrmann20ff77c2010-06-03 09:31:09 +000071 <!-- will have sub directories "eclipse" and "otdt" -->
Stephan Herrmanndcd87c12010-04-25 10:59:27 +000072
Stephan Herrmanneac90682013-04-29 23:29:13 +020073 <!-- ======== Insert SDK build qualifier into our configuration files: ======== -->
74 <copy file="${map.file.path}.in" tofile="${map.file.path}">
75 <filterset>
76 <filter token="SDK_QUALIFIER" value="${eclipse.sdk.qualifier}"/>
77 </filterset>
78 </copy>
Stephan Herrmanneac90682013-04-29 23:29:13 +020079
Stephan Herrmanndcd87c12010-04-25 10:59:27 +000080 <!-- ======== More Configuration Details: ======== -->
81 <!-- maybe obsolete: file prefix to distinguish output files. -->
82 <property name="file-id" value="XXX" />
83
84 <!-- Configure Java for STAGE 1 and STAGE 2 building: -->
85 <property name="vm" value="java" />
86 <property name="vm.args" value="-Xmx912m" />
Stephan Herrmanndcd87c12010-04-25 10:59:27 +000087
88 <property name="installmode" value="clean" />
89
90 <property name="saxon.jar.name" value="saxon8.jar" />
91 <property name="saxon.jar.path" value="${user.home}/.ant/lib/${saxon.jar.name}" />
Stephan Herrmann2ab0c0e2016-11-01 14:21:09 +010092 <available file="${saxon.jar.path}" property="_hasSaxon.jar" /> <!-- on HIPP this is set to true by the caller -->
Stephan Herrmanndcd87c12010-04-25 10:59:27 +000093
94 <!-- ant's os.arch is slightly different than osgi's arch -->
Stephan Herrmann1a9d85a2010-05-17 22:45:31 +000095 <condition property="arch" value="x86_64"> <!-- HACK: hard coding 64-bit architecture -->
Stephan Herrmanndcd87c12010-04-25 10:59:27 +000096 <os arch="i386" />
97 </condition>
98 <condition property="arch" value="ppc64"> <!-- HACK: hard coding 64-bit architecture -->
99 <os arch="ppc" />
100 </condition>
Stephan Herrmann005fc312010-05-18 12:52:58 +0000101 <condition property="arch" value="x86_64"> <!-- Map ant's arch to OSGi arch -->
102 <os arch="amd64" />
103 </condition>
Stephan Herrmanndcd87c12010-04-25 10:59:27 +0000104 <!-- if not set above, set it to os.arch -->
105 <property name="arch" value="${os.arch}" />
106
107 </target>
108
109
110 <target name="INFO">
111 <echo>Usage:
Stephan Herrmannb105b082011-05-15 00:39:56 +0000112 ant -f run.xml ot-junit-all -> runs OTDT Build and Testprocess
113 ant -f run.xml ot-junit-otdt -> runs OTDT Build and Testprocess excluding jdt tests
114 ant -f run.xml ot-junit-build -> runs just OTDT Buildprocess
115 ant -f run.xml ot-compiler-build -> just build the compiler
116 ant -f run.xml ot-junit-run -> runs just OTDT Tests w/o TestSetup
117 </echo>
Stephan Herrmanndcd87c12010-04-25 10:59:27 +0000118 </target>
119
120 <target name="ot-junit-all" depends="setupProperties,checkOS" description="Build all and run all tests.">
121 <echo message="Starting BuildProcess and Testrun in ${build.root.dir}"/>
122 <antcall target="verifyAntInstall"/>
123 <antcall target="setupTests" />
124 <antcall target="runAllTests"/>
125 </target>
126
Stephan Herrmannd8c81652010-11-06 15:01:14 +0000127 <target name="ot-junit-otdt" depends="setupProperties,checkOS" description="Build all and run otdt tests.">
128 <echo message="Starting BuildProcess and Testrun in ${build.root.dir}"/>
129 <antcall target="verifyAntInstall"/>
130 <antcall target="setupTests" />
131 <antcall target="runOTDTTests"/>
132 </target>
133
Stephan Herrmanndcd87c12010-04-25 10:59:27 +0000134 <target name="ot-junit-build" depends="setupProperties,checkOS" description="build everything without running tests">
135 <echo message="Starting BuildProcess in ${build.root.dir}"/>
136 <antcall target="verifyAntInstall"/>
Stephan Herrmann8b5e97e2013-07-30 18:44:03 +0200137 <antcall target="setupTests" />
Stephan Herrmanndcd87c12010-04-25 10:59:27 +0000138 </target>
139
Stephan Herrmannb59f3f02011-05-15 00:17:51 +0000140 <target name="ot-compiler-build" depends="setupProperties,checkOS" description="build only the compiler (for debugging the build)">
141 <echo message="Starting BuildProcess in ${build.root.dir}"/>
142 <antcall target="verifyAntInstall"/>
143 <antcall target="createOTCompilerEclipse"/>
144 </target>
145
Stephan Herrmanndcd87c12010-04-25 10:59:27 +0000146 <target name="ot-junit-run" depends="setupProperties,checkOS" description="Run tests without building">
147 <echo message="Starting Testrun ${test.root.dir}"/>
148 <antcall target="runAllTests" />
149 </target>
150
Stephan Herrmann8b5e97e2013-07-30 18:44:03 +0200151 <target name="ot-junit-run-ot" depends="setupProperties,checkOS" description="Run OT tests without building">
152 <echo message="Starting Testrun ${test.root.dir}"/>
153 <antcall target="runOTDTTests" />
154 </target>
155
Stephan Herrmanneb0f2922018-08-09 13:27:26 +0200156 <target name="ot-junit-run-onlyone" depends="setupProperties,checkOS" description="Run OT tests without building">
157 <echo message="Starting Testrun ${test.root.dir}"/>
Stephan Herrmanna887ab72018-08-09 14:11:12 +0200158 <antcall target="setupTests" />
Stephan Herrmanneb0f2922018-08-09 13:27:26 +0200159 <antcall target="runOnlyoneTests" />
160 </target>
161
Stephan Herrmanndcd87c12010-04-25 10:59:27 +0000162 <!-- =================== END Public Targets ==================== -->
163
164 <!-- === Setup Targets: === -->
165
166 <target name="verifyAntInstall" unless="_hasSaxon.jar">
167 <copy failonerror="true" overwrite="false" file="${OTScriptDir}/${saxon.jar.name}" tofile="${saxon.jar.path}"></copy>
168 <echo message="Needed to copy saxon8.jar to ${saxon.jar.path}. Please restart the build." />
169 <echo message="For an explanation, see http://ant.apache.org/faq.html#delegating-classloader-1.6" />
170 <fail message="See above. Please restart the build."/>
171 </target>
172
173 <!-- checks on which os ant is run, set ${os} and ${ws} accordingly -->
174 <target name="determineOS">
175 <condition property="os.isWindows">
176 <os family="windows"/>
177 </condition>
178
179 <condition property="os.isLinux">
180 <os name="Linux" />
181 </condition>
182 </target>
183
184 <target name="checkOS" depends="determineOS,windows,linux"/>
185
186 <target name="windows" if="os.isWindows">
187 <echo message="OS is Windows"/>
188 <property name="os" value="win32" />
189 <property name="ws" value="win32" />
190 </target>
191
192 <target name="linux" unless="os.isWindows" >
193 <echo message="OS is Linux"/>
194 <!-- eclipse-app.tgz is already passed from the calling script -->
195 <property name="os" value="linux" />
196 <property name="ws" value="gtk" />
197 </target>
198
Stephan Herrmannb5ca0342021-03-04 20:08:55 +0100199 <target name="setupForCompile" depends="checkOS,setupProperties" unless="_hasCreatedOTDTEclipse">
Stephan Herrmanndcd87c12010-04-25 10:59:27 +0000200 <antcall target="UnzipEclipse"/>
201 <antcall target="AddPluginsToEclipse"/>
202 </target>
203
204 <target name="UnzipEclipse">
Stephan Herrmann3b9c6ee2019-07-20 17:17:41 +0200205 <echo message="Extracting Boot Eclipse (${eclipse-app.tgz}) in ${build.root.dir}..."/>
Stephan Herrmanndd1efd52021-03-03 16:18:08 +0100206 <tempfile property="eclipse.app.tmp" prefix="eclipse-app"/>
Stephan Herrmannec8afbe2021-03-03 15:53:26 +0100207 <get src="${eclipse-app.tgz}" dest="${eclipse.app.tmp}"/>
208
Stephan Herrmanndcd87c12010-04-25 10:59:27 +0000209 <mkdir dir="${build.root.dir}"/>
Stephan Herrmannec8afbe2021-03-03 15:53:26 +0100210 <untar compression="gzip" src="${eclipse.app.tmp}" dest="${build.root.dir}"/>
211 <echo message="Extracting Base Eclipse (${eclipse.app.tmp}) in ${test.root.dir}..."/>
Stephan Herrmannd3be87b2019-04-13 20:14:21 +0200212 <mkdir dir="${test.root.dir}"/>
Stephan Herrmannec8afbe2021-03-03 15:53:26 +0100213 <untar compression="gzip" src="${eclipse.app.tmp}" dest="${test.root.dir}"/>
Stephan Herrmann3b9c6ee2019-07-20 17:17:41 +0200214 <delete>
Stephan Herrmanndd1efd52021-03-03 16:18:08 +0100215 <!-- avoid conflict with OTDT-variant when resolving source plug-ins against baseLocation: -->
Stephan Herrmann3b9c6ee2019-07-20 17:17:41 +0200216 <fileset dir="${baseLocation}/plugins/" includes="org.eclipse.jdt.core_*.v* org.eclipse.jdt.core.source_*.v*" />
Stephan Herrmann9e3ac7e2022-12-27 23:12:48 +0100217 <fileset dir="${baseLocation}/plugins/" includes="org.eclipse.jdt.core.compiler.batch_*.v* org.eclipse.jdt.core.compiler.batch.source_*.v*" />
Stephan Herrmann3b9c6ee2019-07-20 17:17:41 +0200218 </delete>
Stephan Herrmanne71cef92021-03-03 16:47:54 +0100219 <delete file="${eclipse.app.tmp}"></delete>
Stephan Herrmanndcd87c12010-04-25 10:59:27 +0000220 </target>
221
Stephan Herrmann342fbb32019-04-13 20:20:46 +0200222 <target name="AddPluginsToEclipse" description="Add git.pde.build plugins to the boot Eclipse">
223 <mkdir dir="${bootLocation}/dropins/plugins"/>
224 <copy file="${OTScriptDir}/lib/${git.pde.build}" todir="${bootLocation}/dropins/plugins" />
Stephan Herrmanndcd87c12010-04-25 10:59:27 +0000225 </target>
226
227 <!-- ==== BUILDING AND RUNNING: ==== -->
228
229 <!-- ==== BUILD STAGE 1: ==== -->
230 <!-- setting an empty inputstring is a workaround for http://issues.apache.org/bugzilla/show_bug.cgi?id=34461 -->
231 <target name="createOTCompilerEclipse" depends="setupForCompile" description="create the bootstrapping Eclipse with OT/J compiler">
Stephan Herrmann30912d62019-05-23 20:00:33 +0200232 <echo message="Invoke pdebuild for creating the base new OT-Compiler"/>
233 <java
234 inputstring=""
235 dir="${baseLocation}"
236 fork="true"
237 classname="org.eclipse.equinox.launcher.Main"
Stephan Herrmann3b9c6ee2019-07-20 17:17:41 +0200238 classpath="${bootLocation}/plugins/${org.eclipse.equinox.launcher_jar}">
Stephan Herrmann30912d62019-05-23 20:00:33 +0200239 <arg value="-Dosgi.ws=${ws}"/>
240 <arg value="-Dosgi.os=${os}"/>
241 <arg value="-Dosgi.arch=${arch}"/>
242 <arg value="-application"/>
243 <arg value="org.eclipse.ant.core.antRunner"/>
244 <arg value="-buildfile"/>
245 <arg value="${buildfile}"/>
246 <arg value="-Dbuild.root.dir=${build.root.dir}"/>
247 <arg value="-DbaseLocation=${baseLocation}"/>
Stephan Herrmannce88e992019-07-14 17:45:55 +0200248 <arg value="-DbootLocation=${bootLocation}"/>
Stephan Herrmann30912d62019-05-23 20:00:33 +0200249 <arg value="-DOTScriptDir=${OTScriptDir}"/>
250 <arg value="-Drun.eclipseScriptDir=${run.eclipseScriptDir}"/>
251 <arg value="-Dbuilder=${builder-otcompiler}"/>
252 <arg value="-D${installmode}=true"/> <!-- <- obsolete? -->
253 <arg value="-Dcomponent.short=OT-Compiler"/>
254 <arg value="-DotdtUpdatesDir=${otdtUpdatesDir}"/>
255 <arg value="-Dconfigs=*,*,*"/>
256 <arg value="-Dbaseos=${os}"/>
257 <arg value="-Dbasews=${ws}"/>
258 <arg value="-Dbasearch=${arch}"/>
259 <arg value="-Dtest.root.dir=${test.root.dir}"/>
260 <arg value="-Dtest.eclipseDir=${test.eclipseDir}"/>
261 <arg value="-DmapVersionTag=${mapVersionTag}"/>
262 <arg value="-Dmap.file.path=${map.file.path}"/>
Stephan Herrmannbd1e2192019-07-17 23:44:52 +0200263 <arg value="-DfetchCacheLocation=${fetchCacheLocation}"/>
Stephan Herrmann30912d62019-05-23 20:00:33 +0200264 <arg value="-Declipse.sdk.qualifier=${eclipse.sdk.qualifier}"/>
265 <arg value="-Declipse-app.tgz=${eclipse-app.tgz}"/>
266 <arg value="-Declipse.tests.zip=${eclipse.tests.zip}"/>
267 <!--arg value="-verbose" /-->
268 <jvmarg value="${vm.args}"/>
Stephan Herrmann30912d62019-05-23 20:00:33 +0200269 </java>
Stephan Herrmann3b9c6ee2019-07-20 17:17:41 +0200270 <!-- Now we should have an update site with the patch feature, time to install it into the boot eclipse: -->
271 <ant antfile="${OTScriptDir}/p2helper.xml" target="installFeature" dir="${bootLocation}">
Stephan Herrmann30912d62019-05-23 20:00:33 +0200272 <property name="feature" value="org.eclipse.objectteams.otdt.core.patch.feature.group"/>
273 <property name="sourceUpdatesDir" value="${otdtUpdatesDir}"/>
Stephan Herrmann3b9c6ee2019-07-20 17:17:41 +0200274 <property name="targetEclipseDir" value="${bootLocation}"/>
Stephan Herrmann30912d62019-05-23 20:00:33 +0200275 </ant>
Stephan Herrmann3b9c6ee2019-07-20 17:17:41 +0200276 <!-- make space for next stage of building, avoid duplicate jdt.core plugins from stages 1 & 2 -->
Stephan Herrmannd3035fa2022-12-30 13:47:30 +0100277<!--
Stephan Herrmann3b9c6ee2019-07-20 17:17:41 +0200278 <delete includeemptydirs="true">
279 <fileset dir="${otdtUpdatesDir}" includes="**"/>
280 </delete>
Stephan Herrmannd3035fa2022-12-30 13:47:30 +0100281-->
Stephan Herrmanndcd87c12010-04-25 10:59:27 +0000282 </target>
283
284 <!-- ==== BUILD STAGE 2: ==== -->
285 <!-- setting an empty inputstring is a workaround for http://issues.apache.org/bugzilla/show_bug.cgi?id=34461 -->
286 <target name="createOTDTEclipse" depends="createOTCompilerEclipse" unless="_hasCreatedOTDTEclipse">
287
288 <!-- Make org.eclipse.test.performance available while compiling test projects: -->
Stephan Herrmann3b9c6ee2019-07-20 17:17:41 +0200289 <echo message="Pre-installing Eclipse Test Framework into base Eclipse..."/>
Stephan Herrmann67cbf1c2010-09-26 09:59:15 +0000290 <mkdir dir="${testsUpdatesDirBase}/eclipse"/>
Stephan Herrmannd827cfd2021-03-03 16:31:26 +0100291 <tempfile property="eclipse.tests.tmp" prefix="eclipse.tests"/>
292 <get src="${eclipse.tests.zip}" dest="${eclipse.tests.tmp}"/>
Stephan Herrmanndd1efd52021-03-03 16:18:08 +0100293 <unzip dest="${testsUpdatesDirBase}/eclipse" src="${eclipse.tests.tmp}"/>
Stephan Herrmanne71cef92021-03-03 16:47:54 +0100294 <delete file="${eclipse.tests.tmp}"/>
Stephan Herrmanndcd87c12010-04-25 10:59:27 +0000295 <ant antfile="${OTScriptDir}/p2helper.xml" target="installFeature" dir="${baseLocation}">
296 <property name="feature" value="org.eclipse.test.feature.group"/>
Stephan Herrmann20ff77c2010-06-03 09:31:09 +0000297 <property name="sourceUpdatesDir" value="${testsUpdatesDirBase}/eclipse"/>
Stephan Herrmanndcd87c12010-04-25 10:59:27 +0000298 <property name="targetEclipseDir" value="${baseLocation}"/>
299 </ant>
Stephan Herrmann8372dc22010-06-03 22:41:05 +0000300
301 <!-- pre-load updateSite with published releases: -->
Stephan Herrmann3b9c6ee2019-07-20 17:17:41 +0200302<!-- don't use previous artifacts during the transition to OTDRE:
Stephan Herrmann0c9b5722010-06-04 22:13:03 +0000303 <mkdir dir="${otdtUpdatesDir}/plugins"/>
304 <mkdir dir="${otdtUpdatesDir}/features"/>
305 <exec executable="/bin/sh">
306 <arg value="-c"/>
307 <arg value="ln -s ${published.updates}/features/* ${otdtUpdatesDir}/features/"/>
308 </exec>
309 <exec executable="/bin/sh">
310 <arg value="-c"/>
311 <arg value="ln -s ${published.updates}/plugins/* ${otdtUpdatesDir}/plugins/"/>
312 </exec>
Stephan Herrmanna5b8dbf2015-10-18 17:46:21 +0200313-->
Stephan Herrmann8372dc22010-06-03 22:41:05 +0000314 <!-- pre-load category-less metadata: -->
Stephan Herrmanna5b8dbf2015-10-18 17:46:21 +0200315<!--
Stephan Herrmann8372dc22010-06-03 22:41:05 +0000316 <copy failonerror="false" flatten="true" toDir="${otdtUpdatesDir}">
317 <fileset dir="${user.dir}/metadata">
318 <include name="*.xml"/>
319 </fileset>
320 </copy>
Stephan Herrmanna5b8dbf2015-10-18 17:46:21 +0200321-->
Stephan Herrmanndcd87c12010-04-25 10:59:27 +0000322
323 <echo message="Invoke pdebuild for creating a full OTDT"/>
324 <java
325 inputstring=""
Stephan Herrmann84a4f632019-04-13 20:36:08 +0200326 dir="${bootLocation}"
Stephan Herrmanndcd87c12010-04-25 10:59:27 +0000327 fork="true"
328 classname="org.eclipse.equinox.launcher.Main"
Stephan Herrmann3b9c6ee2019-07-20 17:17:41 +0200329 classpath="${bootLocation}/plugins/${org.eclipse.equinox.launcher_jar}">
Stephan Herrmanndcd87c12010-04-25 10:59:27 +0000330 <arg value="-clean"/>
331 <arg value="-Dosgi.ws=${ws}"/>
332 <arg value="-Dosgi.os=${os}"/>
333 <arg value="-Dosgi.arch=${arch}"/>
334 <arg value="-application"/>
335 <arg value="org.eclipse.ant.core.antRunner"/>
336 <arg value="-buildfile"/>
337 <arg value="${buildfile}"/>
338 <arg value="-Dbuild.root.dir=${build.root.dir}"/>
Stephan Herrmann1c25fec2019-04-13 20:44:20 +0200339 <arg value="-DbootLocation=${bootLocation}"/>
Stephan Herrmanndcd87c12010-04-25 10:59:27 +0000340 <arg value="-DbaseLocation=${baseLocation}"/>
Stephan Herrmann4d4276f2019-04-13 22:06:31 +0200341 <arg value="-DtransformedRepoLocation=${baseLocation}"/> <!-- fetch jars into target -->
Stephan Herrmanndcd87c12010-04-25 10:59:27 +0000342 <arg value="-Drun.eclipseScriptDir=${run.eclipseScriptDir}"/>
343 <arg value="-DOTScriptDir=${OTScriptDir}"/>
344 <arg value="-Dbuilder=${builder-otdt}"/>
345 <arg value="-D${installmode}=true"/>
346 <arg value="-Dcomponent.short=OTDT-Build"/>
347 <arg value="-DotdtUpdatesDir=${otdtUpdatesDir}"/>
Stephan Herrmann20ff77c2010-06-03 09:31:09 +0000348 <arg value="-DtestsUpdatesDirBase=${testsUpdatesDirBase}"/>
Stephan Herrmanndcd87c12010-04-25 10:59:27 +0000349 <arg value="-Dbaseos=${os}"/>
350 <arg value="-Dbasews=${ws}"/>
351 <arg value="-Dbasearch=${arch}"/>
352 <arg value="-Dtest.root.dir=${test.root.dir}"/>
353 <arg value="-Dtest.eclipseDir=${test.eclipseDir}"/>
Stephan Herrmanndcd87c12010-04-25 10:59:27 +0000354 <arg value="-DmapVersionTag=${mapVersionTag}"/>
Stephan Herrmann414d0732016-11-01 11:43:14 +0100355 <arg value="-Dmap.file.path=${map.file.path}"/>
356 <arg value="-DfetchCacheLocation=${fetchCacheLocation}"/>
Stephan Herrmanndcd87c12010-04-25 10:59:27 +0000357 <arg value="-Ddo.run.tests=${do.run.tests}"/>
Stephan Herrmanndcd87c12010-04-25 10:59:27 +0000358 <arg value="-Declipse-app.tgz=${eclipse-app.tgz}"/>
359 <arg value="-Declipse.tests.zip=${eclipse.tests.zip}"/>
Stephan Herrmanneacdfde2010-08-25 05:58:42 +0000360 <!--arg value="-verbose" /-->
Stephan Herrmanndcd87c12010-04-25 10:59:27 +0000361 <jvmarg value="${vm.args}"/>
Stephan Herrmanndcd87c12010-04-25 10:59:27 +0000362 <!-- arg value="${verboseAnt}"/ -->
363 <!-- arg value="-debug" / -->
364 </java>
Stephan Herrmann20ff77c2010-06-03 09:31:09 +0000365 <!-- At this point a local update site exists, thanks to p2gathering=true -->
Stephan Herrmann99e184d2010-06-11 17:27:25 +0000366
Stephan Herrmann31101742019-05-23 19:11:12 +0200367 <ant antfile="${OTScriptDir}/p2helper.xml" target="patchMetadata" dir="${otdtUpdatesDir}"/>
368
Stephan Herrmanndcd87c12010-04-25 10:59:27 +0000369 <property name="_hasCreatedOTDTEclipse" value="true" />
370 </target>
371
372 <!-- TESTING at STAGE 3: -->
Stephan Herrmann21972f62021-03-04 19:29:10 +0100373 <!-- assumed from previous invocation: depends="createOTDTEclipse" -->
374 <target name="setupTests" description="Install the tests into an fresh OTDT">
Stephan Herrmanndcd87c12010-04-25 10:59:27 +0000375 <available file="${buildDirectory}/label.properties" property="label.properties.exists" />
376 <ant antfile="${OTScriptDir}/test.xml" target="setupTests" dir="${build.root.dir}">
377 <property name="os" value="${os}" />
378 <property name="ws" value="${ws}" />
379 <property name="arch" value="${arch}" />
380 <property name="baseos" value="${os}" />
381 <property name="basews" value="${ws}" />
382 <property name="basearch" value="${arch}" />
383 <property name="eclipse-app.tgz" value="${eclipse-app.tgz}" />
384 <property file="${buildDirectory}/label.properties" />
385 <property name="otdtUpdatesDir" value="${otdtUpdatesDir}" />
Stephan Herrmann20ff77c2010-06-03 09:31:09 +0000386 <property name="testsUpdatesDirBase" value="${testsUpdatesDirBase}" />
Stephan Herrmanndcd87c12010-04-25 10:59:27 +0000387 </ant>
388 </target>
389
390 <target name="runAllTests" description="Delegate to the next level script to perform the actual testing.">
391 <ant antfile="${OTScriptDir}/test.xml" target="all" dir="${build.root.dir}">
392 <property name="os" value="${os}" />
393 <property name="ws" value="${ws}" />
394 <property name="arch" value="${arch}" />
395 <property name="baseos" value="${os}" />
396 <property name="basews" value="${ws}" />
397 <property name="basearch" value="${arch}" />
398 <property name="otdtUpdatesDir" value="${otdtUpdatesDir}" />
Stephan Herrmann20ff77c2010-06-03 09:31:09 +0000399 <property name="testsUpdatesDirBase" value="${testsUpdatesDirBase}" />
Stephan Herrmann56428e92013-02-23 12:29:56 +0100400 <property name="test.tmpDir" value="${test.tmpDir}"/>
Stephan Herrmanndcd87c12010-04-25 10:59:27 +0000401 <property name="vmargs" value="${vmargs}" />
402 </ant>
403 </target>
404
Stephan Herrmannd8c81652010-11-06 15:01:14 +0000405 <target name="runOTDTTests" description="Delegate to the next level script to perform the actual testing.">
406 <ant antfile="${OTScriptDir}/test.xml" target="otdt-tests" dir="${build.root.dir}">
407 <property name="os" value="${os}" />
408 <property name="ws" value="${ws}" />
409 <property name="arch" value="${arch}" />
410 <property name="baseos" value="${os}" />
411 <property name="basews" value="${ws}" />
412 <property name="basearch" value="${arch}" />
413 <property name="otdtUpdatesDir" value="${otdtUpdatesDir}" />
414 <property name="testsUpdatesDirBase" value="${testsUpdatesDirBase}" />
Stephan Herrmann56428e92013-02-23 12:29:56 +0100415 <property name="test.tmpDir" value="${test.tmpDir}"/>
Stephan Herrmannd8c81652010-11-06 15:01:14 +0000416 <property name="vmargs" value="${vmargs}" />
417 </ant>
418 </target>
419
Stephan Herrmanneb0f2922018-08-09 13:27:26 +0200420 <target name="runOnlyoneTests" description="Delegate to the next level script to perform the actual testing.">
421 <ant antfile="${OTScriptDir}/test.xml" target="onlyone" dir="${build.root.dir}">
422 <property name="os" value="${os}" />
423 <property name="ws" value="${ws}" />
424 <property name="arch" value="${arch}" />
425 <property name="baseos" value="${os}" />
426 <property name="basews" value="${ws}" />
427 <property name="basearch" value="${arch}" />
428 <property name="otdtUpdatesDir" value="${otdtUpdatesDir}" />
429 <property name="testsUpdatesDirBase" value="${testsUpdatesDirBase}" />
430 <property name="test.tmpDir" value="${test.tmpDir}"/>
431 <property name="vmargs" value="${vmargs}" />
432 </ant>
433 </target>
434
Stephan Herrmanndcd87c12010-04-25 10:59:27 +0000435 <!-- currently unused target name="collectResults">
Stephan Herrmanna1eeb302013-04-29 23:51:25 +0200436 <ant target="collect" antfile="${test.root.dir}/library.xml" dir="${otresults}">
Stephan Herrmanndcd87c12010-04-25 10:59:27 +0000437 <property name="includes" value="org.*.xml"/>
438 <property name="output-file" value="AllTestSuites.xml"/>
439 </ant>
440 </target -->
441
442</project>