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