blob: 7a487eb62c3bc7c3ad345f06b3fa83c5951e5600 [file] [log] [blame]
david_williamsa3e48362007-08-22 04:21:50 +00001<project
2 default="main"
3 basedir=".">
david_williamsa3e48362007-08-22 04:21:50 +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_williamsa3e48362007-08-22 04:21:50 +00008 -->
david_williams8e4dc9c2008-07-06 08:08:58 +00009 <property
10 environment="env"/>
david_williams861dd152009-07-20 07:27:28 +000011 <property
12 name="keyCfgFile"
13 value="${env.PROJECT_BUILDERS}/${projectname}/${env.RELENG}/maps/build.cfg"/>
david_williams2f43da22009-07-22 04:25:24 +000014 <property
15 name="build.home"
16 value="${env.BUILD_HOME}"/>
david_williams861dd152009-07-20 07:27:28 +000017 <echo
18 level="info"
19 message="keyCfgFile: ${keyCfgFile}"/>
david_williams2f43da22009-07-22 04:25:24 +000020 <!-- required to get proper value of dropinsFolder -->
david_williams861dd152009-07-20 07:27:28 +000021 <property
22 file="${keyCfgFile}"/>
23 <fail
24 message="testRoot must be set for this task"
david_williams2f43da22009-07-22 04:25:24 +000025 unless="env.PROJECT_TESTS"/>
26 <property
27 name="testRoot"
28 value="${env.PROJECT_TESTS}"/>
david_williams8e4dc9c2008-07-06 08:08:58 +000029 <target
30 name="main">
david_williamsa3e48362007-08-22 04:21:50 +000031 <property
david_williams8e4dc9c2008-07-06 08:08:58 +000032 file="${build.home}/${env.RELENG_BUILDER}/build.properties"/>
david_williamsa3e48362007-08-22 04:21:50 +000033 <property
34 name="local.cache.dir"
david_williams8e4dc9c2008-07-06 08:08:58 +000035 value="${env.LOCAL_PREREQS_CACHE}"/>
david_williamsa3e48362007-08-22 04:21:50 +000036 <property
37 name="testRoot"
david_williams8e4dc9c2008-07-06 08:08:58 +000038 value="${build.home}/testRoot"/>
david_williamsa3e48362007-08-22 04:21:50 +000039 <delete
40 dir="${testRoot}"
david_williams8e4dc9c2008-07-06 08:08:58 +000041 failonerror="false"/>
42 <mkdir
43 dir="${testRoot}"/>
44 <antcall
45 target="getReleng"/>
david_williams2f43da22009-07-22 04:25:24 +000046 <fail
47 message="Required file does not exist: ${env.PROJECT_BUILDERS}/${projectname}/${env.RELENG}/maps/dependencies.properties">
48 <condition>
49 <not>
50 <available
51 file="${env.PROJECT_BUILDERS}/${projectname}/${env.RELENG}/maps/dependencies.properties"/>
52 </not>
53 </condition>
54 </fail>
david_williamsa3e48362007-08-22 04:21:50 +000055 <property
david_williams2f43da22009-07-22 04:25:24 +000056 file="${env.PROJECT_BUILDERS}/${projectname}/${env.RELENG}/maps/dependencies.properties"/>
david_williams8e4dc9c2008-07-06 08:08:58 +000057 <antcall
58 target="getDependencies"/>
david_williams8e4dc9c2008-07-06 08:08:58 +000059 <antcall
60 target="run"/>
david_williamsa3e48362007-08-22 04:21:50 +000061 </target>
david_williams8e4dc9c2008-07-06 08:08:58 +000062 <target
63 name="getReleng">
david_williamsa3e48362007-08-22 04:21:50 +000064 <property
65 name="releng.tag"
david_williams8e4dc9c2008-07-06 08:08:58 +000066 value="v${buildType}${timestamp}"/>
david_williams2f43da22009-07-22 04:25:24 +000067 <mkdir
68 dir="${env.PROJECT_BUILDERS}/${projectname}"/>
david_williamsa3e48362007-08-22 04:21:50 +000069 <cvs
70 cvsRoot=":pserver:anonymous@dev.eclipse.org:/cvsroot/webtools"
david_williams957ca732007-11-17 01:39:24 +000071 package="${env.RELENG}"
david_williams2f43da22009-07-22 04:25:24 +000072 dest="${env.PROJECT_BUILDERS}/${projectname}"
david_williamsa3e48362007-08-22 04:21:50 +000073 command="export"
74 tag="${releng.tag}"
75 quiet="${env.CVS_QUIET}"
david_williams8e4dc9c2008-07-06 08:08:58 +000076 reallyquiet="${env.CVS_REALLY_QUIET}"/>
david_williamsa3e48362007-08-22 04:21:50 +000077 </target>
david_williams8e4dc9c2008-07-06 08:08:58 +000078 <target
79 name="getDependencies">
david_williamsa3e48362007-08-22 04:21:50 +000080 <ant
david_williamsd4b1fd32008-01-02 04:16:52 +000081 antfile="${build.home}/${env.RELENG_BUILDER}/distribution/wtp.tests/testdependency.xml">
david_williamsa3e48362007-08-22 04:21:50 +000082 <property
83 name="base.install.dir"
david_williams8e4dc9c2008-07-06 08:08:58 +000084 value="${testRoot}"/>
david_williamsa3e48362007-08-22 04:21:50 +000085 <property
86 name="dependencyTargets"
david_williams8e4dc9c2008-07-06 08:08:58 +000087 value="${build.home}/${env.RELENG_BUILDER}/scripts/dependency/build.xml"/>
david_williamsa3e48362007-08-22 04:21:50 +000088 </ant>
david_williams2f43da22009-07-22 04:25:24 +000089 <!--
90 <antcall target="getAndInstallWTP"> <param name="file"
91 value="wtp-sdk-${buildId}.zip"/> </antcall>
92 -->
david_williams8e4dc9c2008-07-06 08:08:58 +000093 <antcall
94 target="getAndInstallWTP">
david_williamsa3e48362007-08-22 04:21:50 +000095 <param
96 name="file"
david_williams8e4dc9c2008-07-06 08:08:58 +000097 value="wtp-sdk-${buildType}-${buildId}-${timestamp}.zip"/>
david_williamsa3e48362007-08-22 04:21:50 +000098 </antcall>
david_williams8e4dc9c2008-07-06 08:08:58 +000099 <antcall
100 target="getAndInstallWTP">
david_williamsa3e48362007-08-22 04:21:50 +0000101 <param
102 name="file"
david_williams2f43da22009-07-22 04:25:24 +0000103 value="wtp-Automated-Tests-${buildType}-${buildId}-${timestamp}.zip"/>
david_williamsa3e48362007-08-22 04:21:50 +0000104 </antcall>
david_williams2f43da22009-07-22 04:25:24 +0000105 <!--
106 <antcall target="getAndInstallWTP"> <param name="file"
107 value="wtp-wst-Automated-Tests-${buildId}.zip"/> </antcall>
108 <antcall target="getAndInstallWTP"> <param name="file"
109 value="wtp-wst-Automated-Tests-${buildType}-${buildId}-${timestamp}.zip"/>
110 </antcall> <antcall target="getAndInstallWTP"> <param
111 name="file" value="wtp-jst-Automated-Tests-${buildId}.zip"/>
112 </antcall> <antcall target="getAndInstallWTP"> <param
113 name="file"
114 value="wtp-jst-Automated-Tests-${buildType}-${buildId}-${timestamp}.zip"/>
115 </antcall>
116 -->
david_williamsa3e48362007-08-22 04:21:50 +0000117 </target>
david_williams8e4dc9c2008-07-06 08:08:58 +0000118 <target
119 name="getAndInstallWTP">
david_williamsa3e48362007-08-22 04:21:50 +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_williamsa3e48362007-08-22 04:21:50 +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_williamsa3e48362007-08-22 04:21:50 +0000130 </target>
david_williams8e4dc9c2008-07-06 08:08:58 +0000131 <target
132 name="getWTP">
david_williamsa3e48362007-08-22 04:21:50 +0000133 <condition
134 property="file.url.1"
david_williams2f43da22009-07-22 04:25:24 +0000135 value="http://build.eclipse.org/webtools/committers/${projectname}/${timestamp}"
david_williamsa3e48362007-08-22 04:21:50 +0000136 else="http://download.eclipse.org/webtools/downloads">
david_williams8e4dc9c2008-07-06 08:08:58 +0000137 <isset
138 property="build.committers"/>
david_williamsa3e48362007-08-22 04:21:50 +0000139 </condition>
140 <condition
141 property="file.url"
david_williams2f43da22009-07-22 04:25:24 +0000142 value="${file.url.1}/${buildType}-${buildId}-${timestamp}"
david_williamsa3e48362007-08-22 04:21:50 +0000143 else="${file.url.1}/drops/${buildType}-${buildId}-${timestamp}">
david_williams8e4dc9c2008-07-06 08:08:58 +0000144 <isset
145 property="build.stream"/>
david_williamsa3e48362007-08-22 04:21:50 +0000146 </condition>
david_williams8e4dc9c2008-07-06 08:08:58 +0000147 <antcall
148 target="getWTP2"/>
david_williamsa3e48362007-08-22 04:21:50 +0000149 </target>
david_williamsa3e48362007-08-22 04:21:50 +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_williamsa3e48362007-08-22 04:21:50 +0000156 <get
157 dest="${local.cache.dir}/${file}"
158 src="${file.url}/${file}"
david_williams8e4dc9c2008-07-06 08:08:58 +0000159 ignoreerrors="true"/>
david_williamsa3e48362007-08-22 04:21:50 +0000160 </target>
david_williamsa3e48362007-08-22 04:21:50 +0000161 <target
162 name="installWTP"
163 if="file.exists">
164 <unzip
165 src="${local.cache.dir}/${file}"
david_williams2f43da22009-07-22 04:25:24 +0000166 dest="${testRoot}${dropinsFolder}"
david_williams8e4dc9c2008-07-06 08:08:58 +0000167 overwrite="true"/>
david_williamsa3e48362007-08-22 04:21:50 +0000168 </target>
david_williams8e4dc9c2008-07-06 08:08:58 +0000169 <target
170 name="run">
171 <mkdir
172 dir="${testRoot}/results/consolelogs"/>
david_williamsa3e48362007-08-22 04:21:50 +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_williamsa3e48362007-08-22 04:21:50 +0000179 </copy>
180 <ant
david_williamsd4b1fd32008-01-02 04:16:52 +0000181 antfile="${build.home}/${env.RELENG_BUILDER}/distribution/wtp.tests/build.xml"
david_williamsa3e48362007-08-22 04:21:50 +0000182 target="runTestEclipse">
183 <property
184 name="testRoot"
david_williams8e4dc9c2008-07-06 08:08:58 +0000185 value="${testRoot}"/>
david_williams2f43da22009-07-22 04:25:24 +0000186 <!-- if not otherwise set, assume all tests -->
david_williamsa3e48362007-08-22 04:21:50 +0000187 <property
188 name="testTarget"
david_williams8e4dc9c2008-07-06 08:08:58 +0000189 value="all"/>
david_williamsa3e48362007-08-22 04:21:50 +0000190 </ant>
191 <copy
david_williamsd4b1fd32008-01-02 04:16:52 +0000192 file="${build.home}/${env.RELENG_BUILDER}/distribution/wtp.tests/templateFiles/index.php"
david_williamsa3e48362007-08-22 04:21:50 +0000193 todir="${testRoot}/results"
david_williams8e4dc9c2008-07-06 08:08:58 +0000194 overwrite="true"/>
david_williamsa3e48362007-08-22 04:21:50 +0000195 </target>
david_williamsa3e48362007-08-22 04:21:50 +0000196 <target
david_williamsa3e48362007-08-22 04:21:50 +0000197 name="clean"
198 if="clean">
199 <property
david_williams8e4dc9c2008-07-06 08:08:58 +0000200 file="${build.home}/${env.RELENG_BUILDER}/build.properties"/>
david_williamsa3e48362007-08-22 04:21:50 +0000201 <property
david_williamsa3e48362007-08-22 04:21:50 +0000202 name="testRoot"
david_williams8e4dc9c2008-07-06 08:08:58 +0000203 value="${build.home}/testRoot"/>
david_williamsa3e48362007-08-22 04:21:50 +0000204 <delete
205 dir="${testRoot}"
david_williams8e4dc9c2008-07-06 08:08:58 +0000206 failonerror="false"/>
david_williamsa3e48362007-08-22 04:21:50 +0000207 </target>
jeffliu925d2c92006-03-07 07:38:36 +0000208</project>