blob: 3ee1693573d91e26f57e81da9d8ca212139201f2 [file] [log] [blame]
david_williams6b5d0882008-07-05 08:03:22 +00001<project
2 default="main"
3 basedir=".">
david_williams6b5d0882008-07-05 08:03:22 +00004 <!--
david_williams8e4dc9c2008-07-06 08:08:58 +00005 Required inputs: build.home buildType buildId timestamp
6 build.stream [optional] build.committers [optional] testTarget
7 [optional]
david_williams6b5d0882008-07-05 08:03:22 +00008 -->
david_williams8e4dc9c2008-07-06 08:08:58 +00009 <property
10 environment="env"/>
11 <target
12 name="main">
david_williams6b5d0882008-07-05 08:03:22 +000013 <property
david_williams8e4dc9c2008-07-06 08:08:58 +000014 file="${build.home}/${env.RELENG_BUILDER}/build.properties"/>
david_williams6b5d0882008-07-05 08:03:22 +000015 <property
16 name="local.cache.dir"
david_williams8e4dc9c2008-07-06 08:08:58 +000017 value="${env.LOCAL_PREREQS_CACHE}"/>
david_williams6b5d0882008-07-05 08:03:22 +000018 <property
19 name="testRoot"
david_williams8e4dc9c2008-07-06 08:08:58 +000020 value="${build.home}/testRoot"/>
david_williams6b5d0882008-07-05 08:03:22 +000021 <delete
22 dir="${testRoot}"
david_williams8e4dc9c2008-07-06 08:08:58 +000023 failonerror="false"/>
24 <mkdir
25 dir="${testRoot}"/>
26 <antcall
27 target="getReleng"/>
david_williams6b5d0882008-07-05 08:03:22 +000028 <property
david_williamscecc5a92009-09-30 03:17:50 +000029 file="${testRoot}/${env.RELENG}${env.DEP_DIR}/maps/dependencies.properties"/>
david_williams8e4dc9c2008-07-06 08:08:58 +000030 <antcall
31 target="getDependencies"/>
david_williams6b5d0882008-07-05 08:03:22 +000032 <condition
33 property="wtp-sdk"
34 value="wtp-sdk-${buildId}.zip"
35 else="wtp-sdk-${buildType}-${buildId}-${timestamp}.zip">
david_williams8e4dc9c2008-07-06 08:08:58 +000036 <available
37 file="${local.cache.dir}/wtp-sdk-${buildId}.zip"/>
david_williams6b5d0882008-07-05 08:03:22 +000038 </condition>
39 <condition
40 property="wtp-wst-tests"
41 value="wtp-wst-Automated-Tests-${buildId}.zip"
42 else="wtp-wst-Automated-Tests-${buildType}-${buildId}-${timestamp}.zip">
43 <available
david_williams8e4dc9c2008-07-06 08:08:58 +000044 file="${local.cache.dir}/wtp-wst-Automated-Tests-${buildId}.zip"/>
david_williams6b5d0882008-07-05 08:03:22 +000045 </condition>
46 <condition
47 property="wtp-jst-tests"
48 value="wtp-jst-Automated-Tests-${buildId}.zip"
49 else="wtp-jst-Automated-Tests-${buildType}-${buildId}-${timestamp}.zip">
50 <available
david_williams8e4dc9c2008-07-06 08:08:58 +000051 file="${local.cache.dir}/wtp-jst-Automated-Tests-${buildId}.zip"/>
david_williams6b5d0882008-07-05 08:03:22 +000052 </condition>
david_williams8e4dc9c2008-07-06 08:08:58 +000053 <antcall
54 target="run"/>
david_williams6b5d0882008-07-05 08:03:22 +000055 </target>
david_williams8e4dc9c2008-07-06 08:08:58 +000056 <target
57 name="getReleng">
david_williams6b5d0882008-07-05 08:03:22 +000058 <property
59 name="releng.tag"
david_williams8e4dc9c2008-07-06 08:08:58 +000060 value="v${buildType}${timestamp}"/>
david_williams6b5d0882008-07-05 08:03:22 +000061 <cvs
62 cvsRoot=":pserver:anonymous@dev.eclipse.org:/cvsroot/webtools"
63 package="${env.RELENG}"
64 dest="${testRoot}"
65 command="export"
66 tag="${releng.tag}"
67 quiet="${env.CVS_QUIET}"
david_williams8e4dc9c2008-07-06 08:08:58 +000068 reallyquiet="${env.CVS_REALLY_QUIET}"/>
david_williams6b5d0882008-07-05 08:03:22 +000069 </target>
david_williams8e4dc9c2008-07-06 08:08:58 +000070 <target
71 name="getDependencies">
david_williams6b5d0882008-07-05 08:03:22 +000072 <ant
73 antfile="${build.home}/${env.RELENG_BUILDER}/distribution/wtp.tests/testdependency.xml">
74 <property
75 name="base.install.dir"
david_williams8e4dc9c2008-07-06 08:08:58 +000076 value="${testRoot}"/>
david_williams6b5d0882008-07-05 08:03:22 +000077 <property
78 name="dependencyTargets"
david_williams8e4dc9c2008-07-06 08:08:58 +000079 value="${build.home}/${env.RELENG_BUILDER}/scripts/dependency/build.xml"/>
david_williams6b5d0882008-07-05 08:03:22 +000080 </ant>
david_williams8e4dc9c2008-07-06 08:08:58 +000081 <antcall
82 target="getAndInstallWTP">
david_williams6b5d0882008-07-05 08:03:22 +000083 <param
84 name="file"
david_williams8e4dc9c2008-07-06 08:08:58 +000085 value="wtp-sdk-${buildId}.zip"/>
david_williams6b5d0882008-07-05 08:03:22 +000086 </antcall>
david_williams8e4dc9c2008-07-06 08:08:58 +000087 <antcall
88 target="getAndInstallWTP">
david_williams6b5d0882008-07-05 08:03:22 +000089 <param
90 name="file"
david_williams8e4dc9c2008-07-06 08:08:58 +000091 value="wtp-sdk-${buildType}-${buildId}-${timestamp}.zip"/>
david_williams6b5d0882008-07-05 08:03:22 +000092 </antcall>
david_williams8e4dc9c2008-07-06 08:08:58 +000093 <antcall
94 target="getAndInstallWTP">
david_williams6b5d0882008-07-05 08:03:22 +000095 <param
96 name="file"
david_williams8e4dc9c2008-07-06 08:08:58 +000097 value="wtp-wst-Automated-Tests-${buildId}.zip"/>
david_williams6b5d0882008-07-05 08:03:22 +000098 </antcall>
david_williams8e4dc9c2008-07-06 08:08:58 +000099 <antcall
100 target="getAndInstallWTP">
david_williams6b5d0882008-07-05 08:03:22 +0000101 <param
102 name="file"
david_williams8e4dc9c2008-07-06 08:08:58 +0000103 value="wtp-wst-Automated-Tests-${buildType}-${buildId}-${timestamp}.zip"/>
david_williams6b5d0882008-07-05 08:03:22 +0000104 </antcall>
david_williams8e4dc9c2008-07-06 08:08:58 +0000105 <antcall
106 target="getAndInstallWTP">
david_williams6b5d0882008-07-05 08:03:22 +0000107 <param
108 name="file"
david_williams8e4dc9c2008-07-06 08:08:58 +0000109 value="wtp-jst-Automated-Tests-${buildId}.zip"/>
david_williams6b5d0882008-07-05 08:03:22 +0000110 </antcall>
david_williams8e4dc9c2008-07-06 08:08:58 +0000111 <antcall
112 target="getAndInstallWTP">
david_williams6b5d0882008-07-05 08:03:22 +0000113 <param
114 name="file"
david_williams8e4dc9c2008-07-06 08:08:58 +0000115 value="wtp-jst-Automated-Tests-${buildType}-${buildId}-${timestamp}.zip"/>
david_williams6b5d0882008-07-05 08:03:22 +0000116 </antcall>
117 </target>
david_williams8e4dc9c2008-07-06 08:08:58 +0000118 <target
119 name="getAndInstallWTP">
david_williams6b5d0882008-07-05 08:03:22 +0000120 <available
121 file="${local.cache.dir}/${file}"
david_williams8e4dc9c2008-07-06 08:08:58 +0000122 property="file.exists"/>
123 <antcall
124 target="getWTP"/>
david_williams6b5d0882008-07-05 08:03:22 +0000125 <available
126 file="${local.cache.dir}/${file}"
david_williams8e4dc9c2008-07-06 08:08:58 +0000127 property="file.exists"/>
128 <antcall
129 target="installWTP"/>
david_williams6b5d0882008-07-05 08:03:22 +0000130 </target>
david_williams8e4dc9c2008-07-06 08:08:58 +0000131 <target
132 name="getWTP">
david_williams6b5d0882008-07-05 08:03:22 +0000133 <condition
134 property="file.url.1"
135 value="http://download.eclipse.org/webtools/committers"
136 else="http://download.eclipse.org/webtools/downloads">
david_williams8e4dc9c2008-07-06 08:08:58 +0000137 <isset
138 property="build.committers"/>
david_williams6b5d0882008-07-05 08:03:22 +0000139 </condition>
140 <condition
141 property="file.url"
142 value="${file.url.1}/drops/${build.stream}/${buildType}-${buildId}-${timestamp}"
143 else="${file.url.1}/drops/${buildType}-${buildId}-${timestamp}">
david_williams8e4dc9c2008-07-06 08:08:58 +0000144 <isset
145 property="build.stream"/>
david_williams6b5d0882008-07-05 08:03:22 +0000146 </condition>
david_williams8e4dc9c2008-07-06 08:08:58 +0000147 <antcall
148 target="getWTP2"/>
david_williams6b5d0882008-07-05 08:03:22 +0000149 </target>
david_williams6b5d0882008-07-05 08:03:22 +0000150 <target
151 name="getWTP2"
152 unless="file.exists">
153 <property
154 name="file.url"
david_williams8e4dc9c2008-07-06 08:08:58 +0000155 value="http://download.eclipse.org/webtools/downloads/drops/${build.stream}/${buildType}-${buildId}-${timestamp}"/>
david_williams6b5d0882008-07-05 08:03:22 +0000156 <get
157 dest="${local.cache.dir}/${file}"
158 src="${file.url}/${file}"
david_williams8e4dc9c2008-07-06 08:08:58 +0000159 ignoreerrors="true"/>
david_williams6b5d0882008-07-05 08:03:22 +0000160 </target>
david_williams6b5d0882008-07-05 08:03:22 +0000161 <target
162 name="installWTP"
163 if="file.exists">
164 <unzip
165 src="${local.cache.dir}/${file}"
166 dest="${testRoot}"
david_williams8e4dc9c2008-07-06 08:08:58 +0000167 overwrite="true"/>
david_williams6b5d0882008-07-05 08:03:22 +0000168 </target>
david_williams8e4dc9c2008-07-06 08:08:58 +0000169 <target
170 name="run">
171 <mkdir
172 dir="${testRoot}/results/consolelogs"/>
david_williams6b5d0882008-07-05 08:03:22 +0000173 <copy
174 todir="${testRoot}"
175 flatten="true"
176 overwrite="true">
177 <fileset
david_williams8e4dc9c2008-07-06 08:08:58 +0000178 dir="${build.home}/${env.RELENG_BUILDER}/distribution/wtp.tests/testScripts"/>
david_williams6b5d0882008-07-05 08:03:22 +0000179 </copy>
180 <ant
181 antfile="${build.home}/${env.RELENG_BUILDER}/distribution/wtp.tests/build.xml"
182 target="runTestEclipse">
183 <property
184 name="testRoot"
david_williams8e4dc9c2008-07-06 08:08:58 +0000185 value="${testRoot}"/>
david_williams6b5d0882008-07-05 08:03:22 +0000186 <property
187 name="testTarget"
david_williams8e4dc9c2008-07-06 08:08:58 +0000188 value="all"/>
david_williams6b5d0882008-07-05 08:03:22 +0000189 </ant>
190 <copy
191 file="${build.home}/${env.RELENG_BUILDER}/distribution/wtp.tests/templateFiles/index.php"
192 todir="${testRoot}/results"
david_williams8e4dc9c2008-07-06 08:08:58 +0000193 overwrite="true"/>
david_williams6b5d0882008-07-05 08:03:22 +0000194 </target>
david_williams6b5d0882008-07-05 08:03:22 +0000195 <target
196 name="upload"
197 if="login">
david_williams8e4dc9c2008-07-06 08:08:58 +0000198 <mkdir
199 dir="${build.home}/archives"/>
david_williams6b5d0882008-07-05 08:03:22 +0000200 <zip
201 destfile="${build.home}/archives/${buildType}-${buildId}-${timestamp}.zip"
david_williams8e4dc9c2008-07-06 08:08:58 +0000202 basedir="${build.home}/testRoot/results"/>
david_williams6b5d0882008-07-05 08:03:22 +0000203 <condition
204 property="upload.path.1"
205 else="~/downloads/webtools/downloads"
206 value="~/downloads/webtools/committers">
david_williams8e4dc9c2008-07-06 08:08:58 +0000207 <isset
208 property="build.committers"/>
david_williams6b5d0882008-07-05 08:03:22 +0000209 </condition>
210 <condition
211 property="upload.path"
212 else="${upload.path.1}/drops/${buildType}-${buildId}-${timestamp}/testResults/${config}"
213 value="${upload.path.1}/drops/${build.stream}/${buildType}-${buildId}-${timestamp}/testResults/${config}">
david_williams8e4dc9c2008-07-06 08:08:58 +0000214 <isset
215 property="build.stream"/>
david_williams6b5d0882008-07-05 08:03:22 +0000216 </condition>
217 <exec
218 executable="ssh"
219 dir="${build.home}">
220 <arg
david_williams8e4dc9c2008-07-06 08:08:58 +0000221 line="${login}@download1.eclipse.org rm -rf ${upload.path}"/>
david_williams6b5d0882008-07-05 08:03:22 +0000222 </exec>
223 <exec
224 executable="ssh"
225 dir="${build.home}">
226 <arg
david_williams8e4dc9c2008-07-06 08:08:58 +0000227 line="${login}@download1.eclipse.org mkdir ${upload.path}"/>
david_williams6b5d0882008-07-05 08:03:22 +0000228 </exec>
229 <exec
230 executable="scp"
231 dir="${build.home}">
232 <arg
david_williams8e4dc9c2008-07-06 08:08:58 +0000233 line="-r ./testRoot/results ${login}@download1.eclipse.org:${upload.path}"/>
david_williams6b5d0882008-07-05 08:03:22 +0000234 </exec>
235 </target>
david_williams6b5d0882008-07-05 08:03:22 +0000236 <target
237 name="clean"
238 if="clean">
239 <property
david_williams8e4dc9c2008-07-06 08:08:58 +0000240 file="${build.home}/${env.RELENG_BUILDER}/build.properties"/>
david_williams6b5d0882008-07-05 08:03:22 +0000241 <property
242 name="local.cache.dir"
david_williams8e4dc9c2008-07-06 08:08:58 +0000243 value="${env.LOCAL_PREREQS_CACHE}"/>
david_williams6b5d0882008-07-05 08:03:22 +0000244 <property
245 name="testRoot"
david_williams8e4dc9c2008-07-06 08:08:58 +0000246 value="${build.home}/testRoot"/>
david_williams6b5d0882008-07-05 08:03:22 +0000247 <delete
248 dir="${testRoot}"
david_williams8e4dc9c2008-07-06 08:08:58 +0000249 failonerror="false"/>
250 <delete
251 failonerror="false">
david_williams6b5d0882008-07-05 08:03:22 +0000252 <fileset
253 dir="${local.cache.dir}"
david_williams8e4dc9c2008-07-06 08:08:58 +0000254 includes="wtp-*"/>
david_williams6b5d0882008-07-05 08:03:22 +0000255 </delete>
256 </target>
david_williams6b5d0882008-07-05 08:03:22 +0000257</project>