Stephan Herrmann | dcd87c1 | 2010-04-25 10:59:27 +0000 | [diff] [blame] | 1 | <?xml version="1.0"?> |
| 2 | <!-- |
| 3 | Copyright (c) 2010 Stephan Herrmann and others. |
| 4 | All rights reserved. This program and the accompanying materials |
| 5 | are made available under the terms of the Eclipse Public License v1.0 |
| 6 | which accompanies this distribution, and is available at |
| 7 | http://www.eclipse.org/legal/epl-v10.html |
| 8 | |
| 9 | Contributors: |
| 10 | Stephan Herrmann - initial API and implementation |
| 11 | --> |
| 12 | <project name="Main Object Teams Build and Test Automation" default="INFO"> |
| 13 | |
| 14 | <target name="showGivenProperties" |
| 15 | description="Show values of all properties that should be passed from our caller."> |
| 16 | <echo>Properties passed into this script: |
| 17 | ------------------------------------------------------------------------------ |
| 18 | path of eclipse SDK: |
| 19 | eclipse-app.tgz = ${eclipse-app.tgz} |
Stephan Herrmann | af43e4a | 2013-04-29 23:19:56 +0200 | [diff] [blame] | 20 | eclipse SDK build qualifier: |
| 21 | eclipse.sdk.qualifier = ${eclipse.sdk.qualifier} |
Stephan Herrmann | dcd87c1 | 2010-04-25 10:59:27 +0000 | [diff] [blame] | 22 | path of eclipse test framework: |
Stephan Herrmann | 8372dc2 | 2010-06-03 22:41:05 +0000 | [diff] [blame] | 23 | eclipse.tests.zip= ${eclipse.tests.zip} |
| 24 | path of published updates: |
| 25 | published.updates= ${published.updates} |
Stephan Herrmann | dcd87c1 | 2010-04-25 10:59:27 +0000 | [diff] [blame] | 26 | should sources be built (true|false)? |
| 27 | do.build.all = ${do.build.all} |
| 28 | should test be run (true|false)? |
| 29 | do.run.tests = ${do.run.tests} |
Stephan Herrmann | 56428e9 | 2013-02-23 12:29:56 +0100 | [diff] [blame] | 30 | directory for tempory files during testing: |
| 31 | test.tmpDir = ${test.tmpDir} |
Stephan Herrmann | e73f885 | 2016-11-01 00:23:59 +0100 | [diff] [blame] | 32 | git working area |
| 33 | fetchCacheLocation = ${fetchCacheLocation} |
Stephan Herrmann | e8ce6eb | 2016-11-01 01:01:55 +0100 | [diff] [blame] | 34 | path to map file (with substitutions): |
| 35 | map.file.path = ${map.file.path} |
| 36 | |
Stephan Herrmann | dcd87c1 | 2010-04-25 10:59:27 +0000 | [diff] [blame] | 37 | ------------------------------------------------------------------------------ |
| 38 | </echo> |
| 39 | </target> |
| 40 | |
| 41 | <target name="setupProperties" depends="showGivenProperties"> |
| 42 | |
| 43 | <dirname property="_toplevelDir" file="${ant.file}"/> |
| 44 | |
| 45 | <!-- main configuration file (version dependent names etc.): --> |
| 46 | <loadproperties srcfile="${_toplevelDir}/run.properties" /> |
| 47 | |
Stephan Herrmann | dcd87c1 | 2010-04-25 10:59:27 +0000 | [diff] [blame] | 48 | <!-- ======== Directories (indentation shows structure): ======== --> |
| 49 | <!-- build scripts: --> |
| 50 | <property name="OTScriptDir" value="${_toplevelDir}" /> |
| 51 | <property name="buildfile" value="${OTScriptDir}/build.xml" /> |
| 52 | <property name="builder-otcompiler" value="${OTScriptDir}/OT-Compiler" /> |
| 53 | <property name="builder-otdt" value="${OTScriptDir}/OTDT-Build" /> |
| 54 | |
| 55 | <!-- directories for the build: --> |
| 56 | <property name="build.root.dir" value="${user.dir}/build-root" /> |
Stephan Herrmann | 33c2604 | 2010-06-03 10:24:16 +0000 | [diff] [blame] | 57 | <!-- These names are hard coded in pde-build: --> |
| 58 | <property name="buildDirectory" value="${build.root.dir}/src" /> |
Stephan Herrmann | 33c2604 | 2010-06-03 10:24:16 +0000 | [diff] [blame] | 59 | <property name="baseLocation" value="${build.root.dir}/eclipse" /> |
Stephan Herrmann | dcd87c1 | 2010-04-25 10:59:27 +0000 | [diff] [blame] | 60 | |
| 61 | <!-- directories for testing: --> |
| 62 | <property name="test.root.dir" value="${user.dir}/test-root" /> |
| 63 | <!-- This name is used in individual test.xml of test plugins: --> |
| 64 | <property name="test.eclipseDir" value="${test.root.dir}/eclipse" /> |
| 65 | |
| 66 | <!-- directories for update sites: --> |
Stephan Herrmann | f82b3e7 | 2015-06-09 14:51:36 +0200 | [diff] [blame] | 67 | <property name="compilerUpdatesDir" value="${user.dir}/updateSiteCompiler"/> |
Stephan Herrmann | ae580b9 | 2018-06-08 22:31:20 +0200 | [diff] [blame^] | 68 | <!-- TODO: extract to prerequisistes? --> |
| 69 | <property name="compilerUpdatesDir" value="http://download.eclipse.org/objectteams/updates/ot2.7/compiler"/> |
Stephan Herrmann | dcd87c1 | 2010-04-25 10:59:27 +0000 | [diff] [blame] | 70 | <property name="otdtUpdatesDir" value="${user.dir}/updateSite"/> |
| 71 | <property name="testsUpdatesDirBase" value="${user.dir}/updateSiteTests"/> |
Stephan Herrmann | 20ff77c | 2010-06-03 09:31:09 +0000 | [diff] [blame] | 72 | <!-- will have sub directories "eclipse" and "otdt" --> |
Stephan Herrmann | dcd87c1 | 2010-04-25 10:59:27 +0000 | [diff] [blame] | 73 | |
Stephan Herrmann | eac9068 | 2013-04-29 23:29:13 +0200 | [diff] [blame] | 74 | <!-- ======== Insert SDK build qualifier into our configuration files: ======== --> |
| 75 | <copy file="${map.file.path}.in" tofile="${map.file.path}"> |
| 76 | <filterset> |
| 77 | <filter token="SDK_QUALIFIER" value="${eclipse.sdk.qualifier}"/> |
| 78 | </filterset> |
| 79 | </copy> |
Stephan Herrmann | 32ed6af | 2014-01-05 02:44:25 +0100 | [diff] [blame] | 80 | <!-- Insert SDK build qualifier into our configuration file: --> |
| 81 | <copy file="${OTScriptDir}/test.properties.in" tofile="${OTScriptDir}/test.properties" overwrite="true"> |
| 82 | <filterset> |
| 83 | <filter token="SDK_QUALIFIER" value="${eclipse.sdk.qualifier}"/> |
| 84 | </filterset> |
| 85 | </copy> |
| 86 | |
| 87 | <!-- versions of test plugins: --> |
| 88 | <loadproperties srcfile="${OTScriptDir}/test.properties" /> |
Stephan Herrmann | eac9068 | 2013-04-29 23:29:13 +0200 | [diff] [blame] | 89 | |
Stephan Herrmann | dcd87c1 | 2010-04-25 10:59:27 +0000 | [diff] [blame] | 90 | <!-- ======== More Configuration Details: ======== --> |
| 91 | <!-- maybe obsolete: file prefix to distinguish output files. --> |
| 92 | <property name="file-id" value="XXX" /> |
| 93 | |
| 94 | <!-- Configure Java for STAGE 1 and STAGE 2 building: --> |
| 95 | <property name="vm" value="java" /> |
| 96 | <property name="vm.args" value="-Xmx912m" /> |
Stephan Herrmann | dcd87c1 | 2010-04-25 10:59:27 +0000 | [diff] [blame] | 97 | |
| 98 | <property name="installmode" value="clean" /> |
| 99 | |
| 100 | <property name="saxon.jar.name" value="saxon8.jar" /> |
| 101 | <property name="saxon.jar.path" value="${user.home}/.ant/lib/${saxon.jar.name}" /> |
Stephan Herrmann | 2ab0c0e | 2016-11-01 14:21:09 +0100 | [diff] [blame] | 102 | <available file="${saxon.jar.path}" property="_hasSaxon.jar" /> <!-- on HIPP this is set to true by the caller --> |
Stephan Herrmann | dcd87c1 | 2010-04-25 10:59:27 +0000 | [diff] [blame] | 103 | |
| 104 | <!-- ant's os.arch is slightly different than osgi's arch --> |
Stephan Herrmann | 1a9d85a | 2010-05-17 22:45:31 +0000 | [diff] [blame] | 105 | <condition property="arch" value="x86_64"> <!-- HACK: hard coding 64-bit architecture --> |
Stephan Herrmann | dcd87c1 | 2010-04-25 10:59:27 +0000 | [diff] [blame] | 106 | <os arch="i386" /> |
| 107 | </condition> |
| 108 | <condition property="arch" value="ppc64"> <!-- HACK: hard coding 64-bit architecture --> |
| 109 | <os arch="ppc" /> |
| 110 | </condition> |
Stephan Herrmann | 005fc31 | 2010-05-18 12:52:58 +0000 | [diff] [blame] | 111 | <condition property="arch" value="x86_64"> <!-- Map ant's arch to OSGi arch --> |
| 112 | <os arch="amd64" /> |
| 113 | </condition> |
Stephan Herrmann | dcd87c1 | 2010-04-25 10:59:27 +0000 | [diff] [blame] | 114 | <!-- if not set above, set it to os.arch --> |
| 115 | <property name="arch" value="${os.arch}" /> |
| 116 | |
| 117 | </target> |
| 118 | |
| 119 | |
| 120 | <target name="INFO"> |
| 121 | <echo>Usage: |
Stephan Herrmann | b105b08 | 2011-05-15 00:39:56 +0000 | [diff] [blame] | 122 | ant -f run.xml ot-junit-all -> runs OTDT Build and Testprocess |
| 123 | ant -f run.xml ot-junit-otdt -> runs OTDT Build and Testprocess excluding jdt tests |
| 124 | ant -f run.xml ot-junit-build -> runs just OTDT Buildprocess |
| 125 | ant -f run.xml ot-compiler-build -> just build the compiler |
| 126 | ant -f run.xml ot-junit-run -> runs just OTDT Tests w/o TestSetup |
| 127 | </echo> |
Stephan Herrmann | dcd87c1 | 2010-04-25 10:59:27 +0000 | [diff] [blame] | 128 | </target> |
| 129 | |
| 130 | <target name="ot-junit-all" depends="setupProperties,checkOS" description="Build all and run all tests."> |
| 131 | <echo message="Starting BuildProcess and Testrun in ${build.root.dir}"/> |
| 132 | <antcall target="verifyAntInstall"/> |
| 133 | <antcall target="setupTests" /> |
| 134 | <antcall target="runAllTests"/> |
| 135 | </target> |
| 136 | |
Stephan Herrmann | d8c8165 | 2010-11-06 15:01:14 +0000 | [diff] [blame] | 137 | <target name="ot-junit-otdt" depends="setupProperties,checkOS" description="Build all and run otdt tests."> |
| 138 | <echo message="Starting BuildProcess and Testrun in ${build.root.dir}"/> |
| 139 | <antcall target="verifyAntInstall"/> |
| 140 | <antcall target="setupTests" /> |
| 141 | <antcall target="runOTDTTests"/> |
| 142 | </target> |
| 143 | |
Stephan Herrmann | dcd87c1 | 2010-04-25 10:59:27 +0000 | [diff] [blame] | 144 | <target name="ot-junit-build" depends="setupProperties,checkOS" description="build everything without running tests"> |
| 145 | <echo message="Starting BuildProcess in ${build.root.dir}"/> |
| 146 | <antcall target="verifyAntInstall"/> |
| 147 | <antcall target="createOTDTEclipse"/> |
Stephan Herrmann | 8b5e97e | 2013-07-30 18:44:03 +0200 | [diff] [blame] | 148 | <antcall target="setupTests" /> |
Stephan Herrmann | dcd87c1 | 2010-04-25 10:59:27 +0000 | [diff] [blame] | 149 | </target> |
| 150 | |
Stephan Herrmann | b59f3f0 | 2011-05-15 00:17:51 +0000 | [diff] [blame] | 151 | <target name="ot-compiler-build" depends="setupProperties,checkOS" description="build only the compiler (for debugging the build)"> |
| 152 | <echo message="Starting BuildProcess in ${build.root.dir}"/> |
| 153 | <antcall target="verifyAntInstall"/> |
| 154 | <antcall target="createOTCompilerEclipse"/> |
| 155 | </target> |
| 156 | |
Stephan Herrmann | dcd87c1 | 2010-04-25 10:59:27 +0000 | [diff] [blame] | 157 | <target name="ot-junit-run" depends="setupProperties,checkOS" description="Run tests without building"> |
| 158 | <echo message="Starting Testrun ${test.root.dir}"/> |
| 159 | <antcall target="runAllTests" /> |
| 160 | </target> |
| 161 | |
Stephan Herrmann | 8b5e97e | 2013-07-30 18:44:03 +0200 | [diff] [blame] | 162 | <target name="ot-junit-run-ot" depends="setupProperties,checkOS" description="Run OT tests without building"> |
| 163 | <echo message="Starting Testrun ${test.root.dir}"/> |
| 164 | <antcall target="runOTDTTests" /> |
| 165 | </target> |
| 166 | |
Stephan Herrmann | dcd87c1 | 2010-04-25 10:59:27 +0000 | [diff] [blame] | 167 | <!-- =================== END Public Targets ==================== --> |
| 168 | |
| 169 | <!-- === Setup Targets: === --> |
| 170 | |
| 171 | <target name="verifyAntInstall" unless="_hasSaxon.jar"> |
| 172 | <copy failonerror="true" overwrite="false" file="${OTScriptDir}/${saxon.jar.name}" tofile="${saxon.jar.path}"></copy> |
| 173 | <echo message="Needed to copy saxon8.jar to ${saxon.jar.path}. Please restart the build." /> |
| 174 | <echo message="For an explanation, see http://ant.apache.org/faq.html#delegating-classloader-1.6" /> |
| 175 | <fail message="See above. Please restart the build."/> |
| 176 | </target> |
| 177 | |
| 178 | <!-- checks on which os ant is run, set ${os} and ${ws} accordingly --> |
| 179 | <target name="determineOS"> |
| 180 | <condition property="os.isWindows"> |
| 181 | <os family="windows"/> |
| 182 | </condition> |
| 183 | |
| 184 | <condition property="os.isLinux"> |
| 185 | <os name="Linux" /> |
| 186 | </condition> |
| 187 | </target> |
| 188 | |
| 189 | <target name="checkOS" depends="determineOS,windows,linux"/> |
| 190 | |
| 191 | <target name="windows" if="os.isWindows"> |
| 192 | <echo message="OS is Windows"/> |
| 193 | <property name="os" value="win32" /> |
| 194 | <property name="ws" value="win32" /> |
| 195 | </target> |
| 196 | |
| 197 | <target name="linux" unless="os.isWindows" > |
| 198 | <echo message="OS is Linux"/> |
| 199 | <!-- eclipse-app.tgz is already passed from the calling script --> |
| 200 | <property name="os" value="linux" /> |
| 201 | <property name="ws" value="gtk" /> |
| 202 | </target> |
| 203 | |
| 204 | <target name="setupForCompile" depends="checkOS" unless="_hasCreatedOTDTEclipse"> |
| 205 | <antcall target="UnzipEclipse"/> |
| 206 | <antcall target="AddPluginsToEclipse"/> |
| 207 | </target> |
| 208 | |
| 209 | <target name="UnzipEclipse"> |
| 210 | <echo message="Extracting Eclipse (${eclipse-app.tgz}) in ${build.root.dir}..."/> |
| 211 | <mkdir dir="${build.root.dir}"/> |
| 212 | <untar compression="gzip" src="${eclipse-app.tgz}" dest="${build.root.dir}"/> |
| 213 | </target> |
| 214 | |
Stephan Herrmann | 37d869a | 2011-12-16 23:48:02 +0100 | [diff] [blame] | 215 | <target name="AddPluginsToEclipse" description="Add git.pde.build plugins to the base Eclipse"> |
Stephan Herrmann | dcd87c1 | 2010-04-25 10:59:27 +0000 | [diff] [blame] | 216 | <mkdir dir="${baseLocation}/dropins/plugins"/> |
Stephan Herrmann | e67e17d | 2011-10-27 14:36:26 +0000 | [diff] [blame] | 217 | <copy file="${OTScriptDir}/lib/${git.pde.build}" todir="${baseLocation}/dropins/plugins" /> |
Stephan Herrmann | dcd87c1 | 2010-04-25 10:59:27 +0000 | [diff] [blame] | 218 | </target> |
| 219 | |
| 220 | <!-- ==== BUILDING AND RUNNING: ==== --> |
| 221 | |
| 222 | <!-- ==== BUILD STAGE 1: ==== --> |
| 223 | <!-- setting an empty inputstring is a workaround for http://issues.apache.org/bugzilla/show_bug.cgi?id=34461 --> |
| 224 | <target name="createOTCompilerEclipse" depends="setupForCompile" description="create the bootstrapping Eclipse with OT/J compiler"> |
| 225 | <echo message="Invoke pdebuild for creating the OT-Compiler"/> |
Stephan Herrmann | 4f3bca7 | 2018-06-07 14:57:00 +0200 | [diff] [blame] | 226 | <!-- don't build it ... |
Stephan Herrmann | dcd87c1 | 2010-04-25 10:59:27 +0000 | [diff] [blame] | 227 | <java |
| 228 | inputstring="" |
| 229 | dir="${baseLocation}" |
| 230 | fork="true" |
| 231 | classname="org.eclipse.equinox.launcher.Main" |
| 232 | classpath="${baseLocation}/plugins/${org.eclipse.equinox.launcher_jar}"> |
| 233 | <arg value="-Dosgi.ws=${ws}"/> |
| 234 | <arg value="-Dosgi.os=${os}"/> |
| 235 | <arg value="-Dosgi.arch=${arch}"/> |
| 236 | <arg value="-application"/> |
| 237 | <arg value="org.eclipse.ant.core.antRunner"/> |
| 238 | <arg value="-buildfile"/> |
| 239 | <arg value="${buildfile}"/> |
| 240 | <arg value="-Dbuild.root.dir=${build.root.dir}"/> |
| 241 | <arg value="-DbaseLocation=${baseLocation}"/> |
| 242 | <arg value="-DOTScriptDir=${OTScriptDir}"/> |
| 243 | <arg value="-Drun.eclipseScriptDir=${run.eclipseScriptDir}"/> |
| 244 | <arg value="-Dbuilder=${builder-otcompiler}"/> |
Stephan Herrmann | 4f3bca7 | 2018-06-07 14:57:00 +0200 | [diff] [blame] | 245 | <arg value="-D${installmode}=true"/> <! - - <- obsolete? - - > |
Stephan Herrmann | dcd87c1 | 2010-04-25 10:59:27 +0000 | [diff] [blame] | 246 | <arg value="-Dcomponent.short=OT-Compiler"/> |
Stephan Herrmann | f82b3e7 | 2015-06-09 14:51:36 +0200 | [diff] [blame] | 247 | <arg value="-DotdtUpdatesDir=${compilerUpdatesDir}"/> |
Stephan Herrmann | dcd87c1 | 2010-04-25 10:59:27 +0000 | [diff] [blame] | 248 | <arg value="-Dconfigs=*,*,*"/> |
| 249 | <arg value="-Dbaseos=${os}"/> |
| 250 | <arg value="-Dbasews=${ws}"/> |
| 251 | <arg value="-Dbasearch=${arch}"/> |
| 252 | <arg value="-Dtest.root.dir=${test.root.dir}"/> |
| 253 | <arg value="-Dtest.eclipseDir=${test.eclipseDir}"/> |
| 254 | <arg value="-DmapVersionTag=${mapVersionTag}"/> |
Stephan Herrmann | d8abd7a | 2012-04-12 22:08:50 +0200 | [diff] [blame] | 255 | <arg value="-Dmap.file.path=${map.file.path}"/> |
Stephan Herrmann | 414d073 | 2016-11-01 11:43:14 +0100 | [diff] [blame] | 256 | <arg value="-DfetchCacheLocation=${fetchCacheLocation}"/> |
Stephan Herrmann | dcd87c1 | 2010-04-25 10:59:27 +0000 | [diff] [blame] | 257 | <arg value="-Declipse-app.tgz=${eclipse-app.tgz}"/> |
| 258 | <arg value="-Declipse.tests.zip=${eclipse.tests.zip}"/> |
Stephan Herrmann | a11eb20 | 2016-11-10 21:53:44 +0100 | [diff] [blame] | 259 | <arg value="-Djdt.compiler.apt=${jdt.compiler.apt}"/> |
| 260 | <arg value="-Djdt.compiler.tool=${jdt.compiler.tool}"/> |
Stephan Herrmann | 4f3bca7 | 2018-06-07 14:57:00 +0200 | [diff] [blame] | 261 | < ! - -arg value="-verbose" / - -> |
Stephan Herrmann | dcd87c1 | 2010-04-25 10:59:27 +0000 | [diff] [blame] | 262 | <jvmarg value="${vm.args}"/> |
Stephan Herrmann | dcd87c1 | 2010-04-25 10:59:27 +0000 | [diff] [blame] | 263 | </java> |
Stephan Herrmann | 4f3bca7 | 2018-06-07 14:57:00 +0200 | [diff] [blame] | 264 | .. by try to re-use the compiler from the previous published build: --> |
Stephan Herrmann | b105b08 | 2011-05-15 00:39:56 +0000 | [diff] [blame] | 265 | <!-- Now we should have an update site with the patch feature, time to install it into base: --> |
Stephan Herrmann | f500dd1 | 2018-06-07 15:10:22 +0200 | [diff] [blame] | 266 | <ant antfile="${OTScriptDir}/p2helper.xml" target="installFeatureFromUrl" dir="${baseLocation}"> |
Stephan Herrmann | b59f3f0 | 2011-05-15 00:17:51 +0000 | [diff] [blame] | 267 | <property name="feature" value="org.eclipse.objectteams.otdt.core.patch.feature.group"/> |
Stephan Herrmann | ae580b9 | 2018-06-08 22:31:20 +0200 | [diff] [blame^] | 268 | <property name="sourceUpdatesUrl" value="${compilerUpdatesDir}"/> |
Stephan Herrmann | b59f3f0 | 2011-05-15 00:17:51 +0000 | [diff] [blame] | 269 | <property name="targetEclipseDir" value="${baseLocation}"/> |
| 270 | </ant> |
Stephan Herrmann | 7a27112 | 2018-06-07 15:22:27 +0200 | [diff] [blame] | 271 | <delete> |
Stephan Herrmann | ae580b9 | 2018-06-08 22:31:20 +0200 | [diff] [blame^] | 272 | <fileset dir="${baseLocation}/plugins/" includes="org.eclipse.jdt.core_*.v* org.eclipse.jdt.core.source_*.v*" /> |
Stephan Herrmann | 7a27112 | 2018-06-07 15:22:27 +0200 | [diff] [blame] | 273 | </delete> |
Stephan Herrmann | dcd87c1 | 2010-04-25 10:59:27 +0000 | [diff] [blame] | 274 | </target> |
| 275 | |
| 276 | <!-- ==== BUILD STAGE 2: ==== --> |
| 277 | <!-- setting an empty inputstring is a workaround for http://issues.apache.org/bugzilla/show_bug.cgi?id=34461 --> |
| 278 | <target name="createOTDTEclipse" depends="createOTCompilerEclipse" unless="_hasCreatedOTDTEclipse"> |
| 279 | |
| 280 | <!-- Make org.eclipse.test.performance available while compiling test projects: --> |
| 281 | <echo message="Pre-installing Eclipse Test Framework into OTCompilerEclipse..."/> |
Stephan Herrmann | 67cbf1c | 2010-09-26 09:59:15 +0000 | [diff] [blame] | 282 | <mkdir dir="${testsUpdatesDirBase}/eclipse"/> |
| 283 | <unzip dest="${testsUpdatesDirBase}/eclipse" src="${eclipse.tests.zip}"/> |
Stephan Herrmann | dcd87c1 | 2010-04-25 10:59:27 +0000 | [diff] [blame] | 284 | <ant antfile="${OTScriptDir}/p2helper.xml" target="installFeature" dir="${baseLocation}"> |
| 285 | <property name="feature" value="org.eclipse.test.feature.group"/> |
Stephan Herrmann | 20ff77c | 2010-06-03 09:31:09 +0000 | [diff] [blame] | 286 | <property name="sourceUpdatesDir" value="${testsUpdatesDirBase}/eclipse"/> |
Stephan Herrmann | dcd87c1 | 2010-04-25 10:59:27 +0000 | [diff] [blame] | 287 | <property name="targetEclipseDir" value="${baseLocation}"/> |
| 288 | </ant> |
Stephan Herrmann | 8372dc2 | 2010-06-03 22:41:05 +0000 | [diff] [blame] | 289 | |
| 290 | <!-- pre-load updateSite with published releases: --> |
Stephan Herrmann | 0c9b572 | 2010-06-04 22:13:03 +0000 | [diff] [blame] | 291 | <mkdir dir="${otdtUpdatesDir}/plugins"/> |
| 292 | <mkdir dir="${otdtUpdatesDir}/features"/> |
Stephan Herrmann | a5b8dbf | 2015-10-18 17:46:21 +0200 | [diff] [blame] | 293 | <!-- don't use previous artifacts during the transition to OTDRE: |
Stephan Herrmann | 0c9b572 | 2010-06-04 22:13:03 +0000 | [diff] [blame] | 294 | <exec executable="/bin/sh"> |
| 295 | <arg value="-c"/> |
| 296 | <arg value="ln -s ${published.updates}/features/* ${otdtUpdatesDir}/features/"/> |
| 297 | </exec> |
| 298 | <exec executable="/bin/sh"> |
| 299 | <arg value="-c"/> |
| 300 | <arg value="ln -s ${published.updates}/plugins/* ${otdtUpdatesDir}/plugins/"/> |
| 301 | </exec> |
Stephan Herrmann | a5b8dbf | 2015-10-18 17:46:21 +0200 | [diff] [blame] | 302 | --> |
Stephan Herrmann | 8372dc2 | 2010-06-03 22:41:05 +0000 | [diff] [blame] | 303 | <!-- pre-load category-less metadata: --> |
Stephan Herrmann | a5b8dbf | 2015-10-18 17:46:21 +0200 | [diff] [blame] | 304 | <!-- |
Stephan Herrmann | 8372dc2 | 2010-06-03 22:41:05 +0000 | [diff] [blame] | 305 | <copy failonerror="false" flatten="true" toDir="${otdtUpdatesDir}"> |
| 306 | <fileset dir="${user.dir}/metadata"> |
| 307 | <include name="*.xml"/> |
| 308 | </fileset> |
| 309 | </copy> |
Stephan Herrmann | a5b8dbf | 2015-10-18 17:46:21 +0200 | [diff] [blame] | 310 | --> |
Stephan Herrmann | dcd87c1 | 2010-04-25 10:59:27 +0000 | [diff] [blame] | 311 | |
| 312 | <echo message="Invoke pdebuild for creating a full OTDT"/> |
| 313 | <java |
| 314 | inputstring="" |
| 315 | dir="${baseLocation}" |
| 316 | fork="true" |
| 317 | classname="org.eclipse.equinox.launcher.Main" |
| 318 | classpath="${baseLocation}/plugins/${org.eclipse.equinox.launcher_jar}"> |
| 319 | <arg value="-clean"/> |
| 320 | <arg value="-Dosgi.ws=${ws}"/> |
| 321 | <arg value="-Dosgi.os=${os}"/> |
| 322 | <arg value="-Dosgi.arch=${arch}"/> |
| 323 | <arg value="-application"/> |
| 324 | <arg value="org.eclipse.ant.core.antRunner"/> |
| 325 | <arg value="-buildfile"/> |
| 326 | <arg value="${buildfile}"/> |
| 327 | <arg value="-Dbuild.root.dir=${build.root.dir}"/> |
| 328 | <arg value="-DbaseLocation=${baseLocation}"/> |
| 329 | <arg value="-Drun.eclipseScriptDir=${run.eclipseScriptDir}"/> |
| 330 | <arg value="-DOTScriptDir=${OTScriptDir}"/> |
| 331 | <arg value="-Dbuilder=${builder-otdt}"/> |
| 332 | <arg value="-D${installmode}=true"/> |
| 333 | <arg value="-Dcomponent.short=OTDT-Build"/> |
| 334 | <arg value="-DotdtUpdatesDir=${otdtUpdatesDir}"/> |
Stephan Herrmann | 20ff77c | 2010-06-03 09:31:09 +0000 | [diff] [blame] | 335 | <arg value="-DtestsUpdatesDirBase=${testsUpdatesDirBase}"/> |
Stephan Herrmann | dcd87c1 | 2010-04-25 10:59:27 +0000 | [diff] [blame] | 336 | <arg value="-Dbaseos=${os}"/> |
| 337 | <arg value="-Dbasews=${ws}"/> |
| 338 | <arg value="-Dbasearch=${arch}"/> |
| 339 | <arg value="-Dtest.root.dir=${test.root.dir}"/> |
| 340 | <arg value="-Dtest.eclipseDir=${test.eclipseDir}"/> |
Stephan Herrmann | dcd87c1 | 2010-04-25 10:59:27 +0000 | [diff] [blame] | 341 | <arg value="-DmapVersionTag=${mapVersionTag}"/> |
Stephan Herrmann | 414d073 | 2016-11-01 11:43:14 +0100 | [diff] [blame] | 342 | <arg value="-Dmap.file.path=${map.file.path}"/> |
| 343 | <arg value="-DfetchCacheLocation=${fetchCacheLocation}"/> |
Stephan Herrmann | dcd87c1 | 2010-04-25 10:59:27 +0000 | [diff] [blame] | 344 | <arg value="-Ddo.run.tests=${do.run.tests}"/> |
| 345 | <arg value="-Ddo.build.all=${do.build.all}"/> |
| 346 | <arg value="-Declipse-app.tgz=${eclipse-app.tgz}"/> |
| 347 | <arg value="-Declipse.tests.zip=${eclipse.tests.zip}"/> |
Stephan Herrmann | a11eb20 | 2016-11-10 21:53:44 +0100 | [diff] [blame] | 348 | <arg value="-Djdt.compiler.apt=${jdt.compiler.apt}"/> |
| 349 | <arg value="-Djdt.compiler.tool=${jdt.compiler.tool}"/> |
Stephan Herrmann | eacdfde | 2010-08-25 05:58:42 +0000 | [diff] [blame] | 350 | <!--arg value="-verbose" /--> |
Stephan Herrmann | dcd87c1 | 2010-04-25 10:59:27 +0000 | [diff] [blame] | 351 | <jvmarg value="${vm.args}"/> |
Stephan Herrmann | dcd87c1 | 2010-04-25 10:59:27 +0000 | [diff] [blame] | 352 | <!-- arg value="${verboseAnt}"/ --> |
| 353 | <!-- arg value="-debug" / --> |
| 354 | </java> |
Stephan Herrmann | 20ff77c | 2010-06-03 09:31:09 +0000 | [diff] [blame] | 355 | <!-- At this point a local update site exists, thanks to p2gathering=true --> |
Stephan Herrmann | 99e184d | 2010-06-11 17:27:25 +0000 | [diff] [blame] | 356 | |
| 357 | <ant antfile="${OTScriptDir}/p2helper.xml" target="patchMetadata" dir="${otdtUpdatesDir}"/> |
| 358 | |
Stephan Herrmann | dcd87c1 | 2010-04-25 10:59:27 +0000 | [diff] [blame] | 359 | <property name="_hasCreatedOTDTEclipse" value="true" /> |
| 360 | </target> |
| 361 | |
| 362 | <!-- TESTING at STAGE 3: --> |
| 363 | <target name="setupTests" depends="createOTDTEclipse" description="Install the tests into an fresh OTDT"> |
| 364 | <available file="${buildDirectory}/label.properties" property="label.properties.exists" /> |
| 365 | <ant antfile="${OTScriptDir}/test.xml" target="setupTests" dir="${build.root.dir}"> |
| 366 | <property name="os" value="${os}" /> |
| 367 | <property name="ws" value="${ws}" /> |
| 368 | <property name="arch" value="${arch}" /> |
| 369 | <property name="baseos" value="${os}" /> |
| 370 | <property name="basews" value="${ws}" /> |
| 371 | <property name="basearch" value="${arch}" /> |
| 372 | <property name="eclipse-app.tgz" value="${eclipse-app.tgz}" /> |
| 373 | <property file="${buildDirectory}/label.properties" /> |
| 374 | <property name="otdtUpdatesDir" value="${otdtUpdatesDir}" /> |
Stephan Herrmann | 20ff77c | 2010-06-03 09:31:09 +0000 | [diff] [blame] | 375 | <property name="testsUpdatesDirBase" value="${testsUpdatesDirBase}" /> |
Stephan Herrmann | dcd87c1 | 2010-04-25 10:59:27 +0000 | [diff] [blame] | 376 | </ant> |
| 377 | </target> |
| 378 | |
| 379 | <target name="runAllTests" description="Delegate to the next level script to perform the actual testing."> |
| 380 | <ant antfile="${OTScriptDir}/test.xml" target="all" dir="${build.root.dir}"> |
| 381 | <property name="os" value="${os}" /> |
| 382 | <property name="ws" value="${ws}" /> |
| 383 | <property name="arch" value="${arch}" /> |
| 384 | <property name="baseos" value="${os}" /> |
| 385 | <property name="basews" value="${ws}" /> |
| 386 | <property name="basearch" value="${arch}" /> |
| 387 | <property name="otdtUpdatesDir" value="${otdtUpdatesDir}" /> |
Stephan Herrmann | 20ff77c | 2010-06-03 09:31:09 +0000 | [diff] [blame] | 388 | <property name="testsUpdatesDirBase" value="${testsUpdatesDirBase}" /> |
Stephan Herrmann | 56428e9 | 2013-02-23 12:29:56 +0100 | [diff] [blame] | 389 | <property name="test.tmpDir" value="${test.tmpDir}"/> |
Stephan Herrmann | dcd87c1 | 2010-04-25 10:59:27 +0000 | [diff] [blame] | 390 | <property name="vmargs" value="${vmargs}" /> |
| 391 | </ant> |
| 392 | </target> |
| 393 | |
Stephan Herrmann | d8c8165 | 2010-11-06 15:01:14 +0000 | [diff] [blame] | 394 | <target name="runOTDTTests" description="Delegate to the next level script to perform the actual testing."> |
| 395 | <ant antfile="${OTScriptDir}/test.xml" target="otdt-tests" dir="${build.root.dir}"> |
| 396 | <property name="os" value="${os}" /> |
| 397 | <property name="ws" value="${ws}" /> |
| 398 | <property name="arch" value="${arch}" /> |
| 399 | <property name="baseos" value="${os}" /> |
| 400 | <property name="basews" value="${ws}" /> |
| 401 | <property name="basearch" value="${arch}" /> |
| 402 | <property name="otdtUpdatesDir" value="${otdtUpdatesDir}" /> |
| 403 | <property name="testsUpdatesDirBase" value="${testsUpdatesDirBase}" /> |
Stephan Herrmann | 56428e9 | 2013-02-23 12:29:56 +0100 | [diff] [blame] | 404 | <property name="test.tmpDir" value="${test.tmpDir}"/> |
Stephan Herrmann | d8c8165 | 2010-11-06 15:01:14 +0000 | [diff] [blame] | 405 | <property name="vmargs" value="${vmargs}" /> |
| 406 | </ant> |
| 407 | </target> |
| 408 | |
Stephan Herrmann | dcd87c1 | 2010-04-25 10:59:27 +0000 | [diff] [blame] | 409 | <!-- currently unused target name="collectResults"> |
Stephan Herrmann | a1eeb30 | 2013-04-29 23:51:25 +0200 | [diff] [blame] | 410 | <ant target="collect" antfile="${test.root.dir}/library.xml" dir="${otresults}"> |
Stephan Herrmann | dcd87c1 | 2010-04-25 10:59:27 +0000 | [diff] [blame] | 411 | <property name="includes" value="org.*.xml"/> |
| 412 | <property name="output-file" value="AllTestSuites.xml"/> |
| 413 | </ant> |
| 414 | </target --> |
| 415 | |
| 416 | </project> |