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