blob: 231dbf335f513300415f33367deeaeec4566be36 [file] [log] [blame]
gwt.team.scottb14c5b9d2006-12-10 06:06:08 +00001<project name="user" default="build" basedir=".">
fabbott@google.com0e2dc6282008-08-22 16:09:01 +00002 <property name="gwt.root" location=".." />
3 <property name="project.tail" value="user" />
4 <property name="test.args" value="" />
fabbott@google.com25305472009-06-10 21:39:00 +00005
jat@google.combf79ddb2009-10-14 07:44:30 +00006 <!-- support old variables names -->
7 <condition property="gwt.hosts.web.remote" value="${gwt.remote.browsers}">
8 <isset property="gwt.remote.browsers" />
9 </condition>
10 <condition property="gwt.hosts.web.selenium" value="${gwt.selenium.hosts}">
11 <isset property="gwt.selenium.hosts" />
12 </condition>
13
jat@google.com57b69402009-10-14 18:08:29 +000014 <!--
15 BrowserManagerServer_Stub compiled using rmic, which doesn't generate
16 full source code
17 -->
jlabanca@google.com81244562009-08-05 19:55:36 +000018 <property name="emma.filter.exclude" value="*BrowserManagerServer_Stub*" />
19
fabbott@google.com0e2dc6282008-08-22 16:09:01 +000020 <import file="${gwt.root}/common.ant.xml" />
gwt.team.scottb14c5b9d2006-12-10 06:06:08 +000021
jat@google.com8cf77ce2009-10-16 01:47:08 +000022 <property name="test.timeout" value="4" />
jlabanca@google.com81244562009-08-05 19:55:36 +000023 <property name="emma.merged.out" value="${junit.out}/emma-coverage" />
24 <property name="gwt.junit.testcase.web.includes" value="${gwt.junit.testcase.includes}" />
25 <property name="gwt.junit.testcase.web.excludes" value="" />
26
jat@google.combf79ddb2009-10-14 07:44:30 +000027 <property name="gwt.junit.testcase.dev.includes" value="${gwt.junit.testcase.includes}" />
28 <property name="gwt.junit.testcase.dev.excludes" value="" />
29
jat@google.com57b69402009-10-14 18:08:29 +000030 <!--
jat@google.com57b69402009-10-14 18:08:29 +000031 Only IFrameLinker actually supports -noserver mode; run the other linker
32 tests if and when they are supported
33 -->
jlabanca@google.com81244562009-08-05 19:55:36 +000034 <property name="gwt.junit.testcase.noserver.includes" value="**/IFrameLinkerTest.class" />
35 <property name="gwt.junit.testcase.noserver.excludes" value="" />
fabbott@google.com25305472009-06-10 21:39:00 +000036
jat@google.com57b69402009-10-14 18:08:29 +000037 <!--
fabbott@google.com25305472009-06-10 21:39:00 +000038 Whether I18NSuite should test e.g. Foo$InnerMsgs_fr.properties (if the
39 value is "dollar") or Foo_Inner_fr.properties (for "bar")
40 -->
41 <property name="gwt.i18n.test.InnerClassChar" value="dollar"/>
42
fabbott@google.com0e2dc6282008-08-22 16:09:01 +000043 <!--
fabbott@google.com25305472009-06-10 21:39:00 +000044 Classpaths added for test cases
45 -->
46 <path id="test.extraclasspath">
jat@google.comacf97d32009-09-21 22:06:15 +000047 <pathelement location="${gwt.build}/out/dev/bin-test" />
bobv@google.comb39b79c2009-06-18 15:58:28 +000048 <pathelement location="test-super" />
fabbott@google.com25305472009-06-10 21:39:00 +000049 <pathelement location="test_i18n_${gwt.i18n.test.InnerClassChar}" />
jat@google.combf79ddb2009-10-14 07:44:30 +000050 <pathelement location="${gwt.tools.lib}/cglib/cglib-2.2.jar"/>
51 <pathelement location="${gwt.tools.lib}/easymock/easymock.jar"/>
52 <pathelement location="${gwt.tools.lib}/easymock/easymockclassextension.jar"/>
53 <pathelement location="${gwt.tools.lib}/objectweb/asm-3.1.jar"/>
fabbott@google.com25305472009-06-10 21:39:00 +000054 </path>
55
fabbott@google.com0e2dc6282008-08-22 16:09:01 +000056 <!-- Platform shouldn't matter here, just picking one -->
jat@google.com0b1619e2009-09-20 19:33:31 +000057 <property.ensure name="gwt.dev.jar" location="${gwt.build.lib}/gwt-dev.jar" />
gwt.team.scottb14c5b9d2006-12-10 06:06:08 +000058
jlabanca@google.comf780b7a2009-10-16 16:36:03 +000059 <target name="compile" description="Compile all class files"
60 unless="compile.complete">
fabbott@google.com0e2dc6282008-08-22 16:09:01 +000061 <mkdir dir="${javac.out}" />
62 <gwt.javac>
63 <classpath>
scottb@google.com4f57bc22009-01-16 22:46:42 +000064 <pathelement location="${gwt.tools.lib}/tomcat/servlet-api-2.5.jar" />
fabbott@google.com0e2dc6282008-08-22 16:09:01 +000065 <pathelement location="${gwt.tools.lib}/junit/junit-3.8.1.jar" />
66 <pathelement location="${gwt.tools.lib}/jfreechart/jfreechart-1.0.3.jar" />
67 <pathelement location="${gwt.tools.lib}/selenium/selenium-java-client-driver.jar" />
bobv@google.coma933c8b2009-03-26 02:12:25 +000068 <pathelement location="${gwt.tools.lib}/w3c/sac/sac-1.3.jar" />
69 <pathelement location="${gwt.tools.lib}/w3c/flute/flute-1.3.jar" />
fabbott@google.com0e2dc6282008-08-22 16:09:01 +000070 <pathelement location="${gwt.dev.jar}" />
71 </classpath>
72 </gwt.javac>
gwt.team.mmendez99f280b2006-12-08 23:11:29 +000073
fabbott@google.com0e2dc6282008-08-22 16:09:01 +000074 <!-- Build the BrowserManagerServer_Stub to allow remote browser testing -->
75 <rmic base="${javac.out}"
jat@google.com57b69402009-10-14 18:08:29 +000076 classname="com.google.gwt.junit.remote.BrowserManagerServer"
77 stubversion="1.2"/>
fabbott@google.com0e2dc6282008-08-22 16:09:01 +000078 </target>
gwt.team.mmendez99f280b2006-12-08 23:11:29 +000079
fabbott@google.com0e2dc6282008-08-22 16:09:01 +000080 <!--
jat@google.comacf97d32009-09-21 22:06:15 +000081 Compile test code for dev to pick up TypeOracleTestUtils and others.
jat@google.com57b69402009-10-14 18:08:29 +000082 Compiles test dependencies in dev/core
spoon@google.comd0b00f82009-03-27 14:58:53 +000083 -->
jat@google.com57b69402009-10-14 18:08:29 +000084 <target name="compile.dev.tests">
jat@google.comc090a072009-09-21 17:39:53 +000085 <gwt.ant dir="../dev" target="compile.tests" />
fabbott@google.com0e2dc6282008-08-22 16:09:01 +000086 </target>
spoon@google.comd0b00f82009-03-27 14:58:53 +000087
jat@google.com57b69402009-10-14 18:08:29 +000088 <!--
89 Compiles the test code for this project
90 -->
jat@google.come0fa5b12009-10-13 23:57:19 +000091 <target name="compile.tests"
jlabanca@google.comf780b7a2009-10-16 16:36:03 +000092 depends="compile.dev.tests, compile.emma.if.enabled"
93 unless="compile.tests.complete">
fabbott@google.com0e2dc6282008-08-22 16:09:01 +000094 <mkdir dir="${javac.junit.out}" />
jat@google.com57b69402009-10-14 18:08:29 +000095 <gwt.javac srcdir="test" excludes="com/google/gwt/langtest/**"
96 destdir="${javac.junit.out}">
fabbott@google.com0e2dc6282008-08-22 16:09:01 +000097 <classpath>
98 <pathelement location="${javac.out}" />
jat@google.comacf97d32009-09-21 22:06:15 +000099 <pathelement location="${gwt.build}/out/dev/bin-test" />
scottb@google.com4f57bc22009-01-16 22:46:42 +0000100 <pathelement location="${gwt.tools.lib}/tomcat/servlet-api-2.5.jar" />
fabbott@google.com0e2dc6282008-08-22 16:09:01 +0000101 <pathelement location="${gwt.tools.lib}/junit/junit-3.8.1.jar" />
102 <pathelement location="${gwt.tools.lib}/selenium/selenium-java-client-driver.jar" />
rjrjr@google.com34ea8a22009-10-06 16:46:04 +0000103 <pathelement location="${gwt.tools.lib}/cglib/cglib-2.2.jar"/>
104 <pathelement location="${gwt.tools.lib}/easymock/easymock.jar"/>
105 <pathelement location="${gwt.tools.lib}/easymock/easymockclassextension.jar"/>
106 <pathelement location="${gwt.tools.lib}/objectweb/asm-3.1.jar"/>
scottb@google.com2e8ef322008-11-04 20:59:58 +0000107 <pathelement location="${gwt.dev.jar}" />
fabbott@google.com0e2dc6282008-08-22 16:09:01 +0000108 </classpath>
109 </gwt.javac>
110 </target>
gwt.team.scottb14c5b9d2006-12-10 06:06:08 +0000111
jat@google.combf79ddb2009-10-14 07:44:30 +0000112 <target name="build" depends="compile"
113 description="Build and package this project">
fabbott@google.com0e2dc6282008-08-22 16:09:01 +0000114 <mkdir dir="${gwt.build.lib}" />
115 <gwt.jar>
116 <fileset dir="src" excludes="**/package.html" />
117 <fileset dir="super" excludes="**/package.html" />
118 <fileset dir="${javac.out}" />
scottb@google.com171f3f52009-08-11 19:50:31 +0000119 <zipfileset src="${gwt.tools.lib}/tomcat/servlet-api-2.5.jar" excludes="**/*.java"/>
bobv@google.coma933c8b2009-03-26 02:12:25 +0000120 <zipfileset src="${gwt.tools.lib}/w3c/sac/sac-1.3.jar" />
121 <zipfileset src="${gwt.tools.lib}/w3c/flute/flute-1.3.jar" />
fabbott@google.com0e2dc6282008-08-22 16:09:01 +0000122 </gwt.jar>
123 </target>
gwt.team.scottb14c5b9d2006-12-10 06:06:08 +0000124
fabbott@google.com0e2dc6282008-08-22 16:09:01 +0000125 <target name="checkstyle" description="Static analysis of source">
126 <gwt.checkstyle>
127 <fileset dir="src" />
128 <fileset dir="super/com/google/gwt/emul" />
129 <fileset dir="super/com/google/gwt/junit/translatable" />
130 </gwt.checkstyle>
131 </target>
gwt.team.mmendez99f280b2006-12-08 23:11:29 +0000132
jat@google.combf79ddb2009-10-14 07:44:30 +0000133 <target name="test.remoteweb" depends="test.web.remote">
134 <echo message="DEPRECATED: test.remoteweb has been renamed test.web.remote"/>
135 </target>
136
137 <target name="test.web.remote"
jat@google.com57b69402009-10-14 18:08:29 +0000138 description="Run web test with remote browsers"
jlabanca@google.comf780b7a2009-10-16 16:36:03 +0000139 if="gwt.hosts.web.remote"
140 unless="test.web.remote.disable">
jat@google.combf79ddb2009-10-14 07:44:30 +0000141 <echo message="Performing web remote testing at ${gwt.hosts.web.remote}" />
142 <property name="test.web.remote.args" value="${test.args}" />
jat@google.com3d3977f2009-10-16 04:52:05 +0000143 <fileset id="test.web.remote.tests" dir="${javac.junit.out}"
144 includes="${gwt.junit.testcase.web.includes}"
145 excludes="${gwt.junit.testcase.web.excludes}" />
jlabanca@google.com277d0ee2009-10-17 03:20:33 +0000146 <gwt.junit test.args="${test.args} -out www -web -runStyle RemoteWeb:${gwt.hosts.web.remote} -batch module"
jat@google.com3d3977f2009-10-16 04:52:05 +0000147 test.out="${junit.out}/web-remote"
148 test.cases="test.web.remote.tests" >
fabbott@google.com0e2dc6282008-08-22 16:09:01 +0000149 <extraclasspaths>
fabbott@google.com25305472009-06-10 21:39:00 +0000150 <path refid="test.extraclasspath" />
fabbott@google.com0e2dc6282008-08-22 16:09:01 +0000151 </extraclasspaths>
152 </gwt.junit>
153 </target>
zundel@google.com29666c82008-06-04 16:07:53 +0000154
jat@google.combf79ddb2009-10-14 07:44:30 +0000155 <target name="test.dev.remote"
jlabanca@google.com66eac842009-10-14 19:48:54 +0000156 depends="compile, compile.tests"
jat@google.com57b69402009-10-14 18:08:29 +0000157 description="Run dev-mode tests with remote browsers"
jlabanca@google.comf780b7a2009-10-16 16:36:03 +0000158 if="gwt.hosts.dev.remote"
159 unless="test.dev.remote.disable">
jat@google.combf79ddb2009-10-14 07:44:30 +0000160 <echo message="Performing dev-mode remote testing at ${gwt.remote.browsers}" />
161 <property name="test.dev.remote.args" value="${test.args}" />
jat@google.com57b69402009-10-14 18:08:29 +0000162 <fileset id="test.dev.remote.tests" dir="${javac.junit.out}"
163 includes="${gwt.junit.testcase.dev.includes}"
164 excludes="${gwt.junit.testcase.dev.excludes}" />
165 <gwt.junit
jlabanca@google.com277d0ee2009-10-17 03:20:33 +0000166 test.args="${test.args} -out www -runStyle RemoteWeb:${gwt.hosts.dev.remote} -batch module"
jat@google.com57b69402009-10-14 18:08:29 +0000167 test.out="${junit.out}/dev-remote" test.cases="test.dev.remote.tests" >
fabbott@google.com0e2dc6282008-08-22 16:09:01 +0000168 <extraclasspaths>
fabbott@google.com25305472009-06-10 21:39:00 +0000169 <path refid="test.extraclasspath" />
fabbott@google.com0e2dc6282008-08-22 16:09:01 +0000170 </extraclasspaths>
171 </gwt.junit>
172 </target>
gwt.team.mmendez99f280b2006-12-08 23:11:29 +0000173
jat@google.combf79ddb2009-10-14 07:44:30 +0000174 <target name="test.emma.remote"
jlabanca@google.com66eac842009-10-14 19:48:54 +0000175 depends="compile, compile.tests"
jat@google.com57b69402009-10-14 18:08:29 +0000176 description="Run emma tests with remote browsers"
jlabanca@google.comf780b7a2009-10-16 16:36:03 +0000177 if="gwt.hosts.dev.remote"
178 unless="test.emma.remote.disable">
jat@google.combf79ddb2009-10-14 07:44:30 +0000179 <echo message="Performing emma remote testing at ${gwt.hosts.dev.remote}" />
180 <property name="test.emma.remote.args" value="${test.args}" />
jat@google.com57b69402009-10-14 18:08:29 +0000181 <fileset id="test.emma.remote.tests" dir="${javac.junit.out}"
jlabanca@google.com66eac842009-10-14 19:48:54 +0000182 includes="${gwt.junit.testcase.dev.includes}"
183 excludes="${gwt.junit.testcase.dev.excludes}" />
jlabanca@google.com277d0ee2009-10-17 03:20:33 +0000184 <gwt.junit test.args="${test.args} -out www -runStyle RemoteWeb:${gwt.hosts.dev.remote} -batch module"
jat@google.com57b69402009-10-14 18:08:29 +0000185 test.out="${junit.out}/emma-remote"
186 test.cases="test.emma.remote.tests" >
jgw@google.coma3509e22009-02-06 21:06:24 +0000187 <extraclasspaths>
fabbott@google.com25305472009-06-10 21:39:00 +0000188 <path refid="test.extraclasspath" />
jgw@google.coma3509e22009-02-06 21:06:24 +0000189 <pathelement location="${gwt.tools.redist}/emma/emma.jar" />
190 </extraclasspaths>
191 </gwt.junit>
192 </target>
193
jat@google.combf79ddb2009-10-14 07:44:30 +0000194 <target name="test.emma.selenium"
jlabanca@google.com66eac842009-10-14 19:48:54 +0000195 depends="compile, compile.tests"
jat@google.com57b69402009-10-14 18:08:29 +0000196 description="Run emma tests with Selenium-RC servers"
jlabanca@google.comf780b7a2009-10-16 16:36:03 +0000197 if="gwt.hosts.dev.selenium"
198 unless="test.emma.selenium.disable">
jat@google.combf79ddb2009-10-14 07:44:30 +0000199 <echo message="Performing emma selenium testing at ${gwt.hosts.dev.selenium}" />
200 <property name="test.emma.remote.args" value="${test.args}" />
jat@google.com57b69402009-10-14 18:08:29 +0000201 <fileset id="test.emma.selenium.tests" dir="${javac.junit.out}"
jlabanca@google.com66eac842009-10-14 19:48:54 +0000202 includes="${gwt.junit.testcase.dev.includes}"
203 excludes="${gwt.junit.testcase.dev.excludes}" />
jlabanca@google.com277d0ee2009-10-17 03:20:33 +0000204 <gwt.junit test.args="${test.args} -out www -runStyle Selenium:${gwt.hosts.dev.selenium} -batch module"
jat@google.com57b69402009-10-14 18:08:29 +0000205 test.out="${junit.out}/emma-selenium"
206 test.cases="test.emma.selenium.tests" >
jat@google.combf79ddb2009-10-14 07:44:30 +0000207 <extraclasspaths>
208 <path refid="test.extraclasspath" />
209 <pathelement location="${gwt.tools.redist}/emma/emma.jar" />
210 </extraclasspaths>
211 </gwt.junit>
212 </target>
213
214 <target name="test.draft.remote"
215 depends="compile, compile.tests"
jat@google.com57b69402009-10-14 18:08:29 +0000216 description="Run draft compiled tests with remote browsers"
jlabanca@google.comf780b7a2009-10-16 16:36:03 +0000217 if="gwt.hosts.web.remote"
218 unless="test.draft.remote.disable">
jat@google.combf79ddb2009-10-14 07:44:30 +0000219 <echo message="Performing draft remote testing at ${gwt.hosts.web.remote}" />
220 <property name="test.draft.remote.args" value="${test.args}" />
jat@google.com57b69402009-10-14 18:08:29 +0000221 <fileset id="test.draft.remote.tests" dir="${javac.junit.out}"
222 includes="${gwt.junit.testcase.web.includes}"
223 excludes="${gwt.junit.testcase.web.excludes}" />
jlabanca@google.com277d0ee2009-10-17 03:20:33 +0000224 <gwt.junit test.args="${test.args} -draftCompile -web -out www -runStyle RemoteWeb:${gwt.hosts.web.remote} -batch module"
jat@google.com57b69402009-10-14 18:08:29 +0000225 test.out="${junit.out}/draft-remote"
226 test.cases="test.draft.remote.tests" >
fabbott@google.com0e2dc6282008-08-22 16:09:01 +0000227 <extraclasspaths>
fabbott@google.com25305472009-06-10 21:39:00 +0000228 <path refid="test.extraclasspath" />
fabbott@google.com0e2dc6282008-08-22 16:09:01 +0000229 </extraclasspaths>
230 </gwt.junit>
spoon@google.comd0b00f82009-03-27 14:58:53 +0000231 </target>
232
jat@google.combf79ddb2009-10-14 07:44:30 +0000233 <target name="test.nometa.remote"
jat@google.com57b69402009-10-14 18:08:29 +0000234 description="Run -XdisableClassMetadata tests with remote browsers"
jlabanca@google.comf780b7a2009-10-16 16:36:03 +0000235 if="gwt.hosts.web.remote"
236 unless="test.nometa.remote.disable">
jat@google.combf79ddb2009-10-14 07:44:30 +0000237 <echo message="Performing nometa remote testing at ${gwt.hosts.web.remote}" />
238 <property name="test.nometa.remote.args" value="${test.args}" />
jat@google.com3d3977f2009-10-16 04:52:05 +0000239 <fileset id="test.nometa.remote.tests" dir="${javac.junit.out}"
jat@google.com57b69402009-10-14 18:08:29 +0000240 includes="${gwt.junit.testcase.web.includes}"
241 excludes="${gwt.junit.testcase.web.excludes}" />
jlabanca@google.com277d0ee2009-10-17 03:20:33 +0000242 <gwt.junit test.args="${test.args} -XdisableClassMetadata -out www -runStyle RemoteWeb:${gwt.hosts.web.remote} -batch module"
jat@google.com57b69402009-10-14 18:08:29 +0000243 test.out="${junit.out}/nometa-remote"
jat@google.com2bc5a3b2009-10-16 01:11:02 +0000244 test.cases="test.nometa.remote.tests" >
jat@google.combf79ddb2009-10-14 07:44:30 +0000245 <extraclasspaths>
246 <path refid="test.extraclasspath" />
247 </extraclasspaths>
248 </gwt.junit>
249 </target>
250
251 <target name="test.selenium" depends="test.web.selenium">
252 <echo message="DEPRECATED: test.selenium has been renamed test.web.selenium"/>
253 </target>
254
255 <target name="test.web.selenium"
256 depends="compile, compile.tests"
257 description="Run web tests using Selenium RC"
jlabanca@google.comf780b7a2009-10-16 16:36:03 +0000258 if="gwt.hosts.web.selenium"
259 unless="test.web.selenium.disable">
jat@google.combf79ddb2009-10-14 07:44:30 +0000260 <echo message="Performing web testing using Selenium RC at ${gwt.hosts.web.selenium}" />
261 <property name="test.selenium.args" value="${test.args}" />
jat@google.com57b69402009-10-14 18:08:29 +0000262 <fileset id="test.web.selenium.tests" dir="${javac.junit.out}"
263 includes="${gwt.junit.testcase.web.includes}"
264 excludes="${gwt.junit.testcase.web.excludes}" />
jlabanca@google.com277d0ee2009-10-17 03:20:33 +0000265 <gwt.junit test.args="${test.args} -web -out www -runStyle Selenium:${gwt.hosts.web.selenium} -batch module"
jat@google.com57b69402009-10-14 18:08:29 +0000266 test.out="${junit.out}/web-selenium"
267 test.cases="test.web.selenium.tests" >
jat@google.combf79ddb2009-10-14 07:44:30 +0000268 <extraclasspaths>
269 <path refid="test.extraclasspath" />
270 </extraclasspaths>
271 </gwt.junit>
272 </target>
273
274 <target name="test.dev.selenium"
jlabanca@google.com66eac842009-10-14 19:48:54 +0000275 depends="compile, compile.tests"
jat@google.com57b69402009-10-14 18:08:29 +0000276 description="Run dev-mode tests using Selenium RC servers"
jlabanca@google.comf780b7a2009-10-16 16:36:03 +0000277 if="gwt.hosts.dev.selenium"
278 unless="test.dev.selenium.disable">
jat@google.combf79ddb2009-10-14 07:44:30 +0000279 <echo message="Performing dev-mode testing using Selenium RC at ${gwt.hosts.dev.selenium}" />
280 <property name="test.selenium.args" value="${test.args}" />
jat@google.com57b69402009-10-14 18:08:29 +0000281 <fileset id="test.dev.selenium.tests" dir="${javac.junit.out}"
282 includes="${gwt.junit.testcase.dev.includes}"
283 excludes="${gwt.junit.testcase.dev.excludes}" />
jlabanca@google.com277d0ee2009-10-17 03:20:33 +0000284 <gwt.junit test.args="${test.args} -out www -runStyle Selenium:${gwt.hosts.dev.selenium} -batch module"
jat@google.com57b69402009-10-14 18:08:29 +0000285 test.out="${junit.out}/dev-selenium"
286 test.cases="test.dev.selenium.tests" >
jat@google.combf79ddb2009-10-14 07:44:30 +0000287 <extraclasspaths>
288 <path refid="test.extraclasspath" />
289 </extraclasspaths>
290 </gwt.junit>
291 </target>
292
293 <target name="test.nometa.selenium"
294 description="Run nometa tests using Selenium RC"
jlabanca@google.comf780b7a2009-10-16 16:36:03 +0000295 if="gwt.hosts.web.selenium"
296 unless="test.nometa.selenium.disable">
jat@google.combf79ddb2009-10-14 07:44:30 +0000297 <echo message="Performing nometa testing using Selenium RC at ${gwt.hosts.web.selenium}" />
298 <property name="test.selenium.args" value="${test.args}" />
jat@google.com57b69402009-10-14 18:08:29 +0000299 <fileset id="test.nometa.selenium.tests" dir="${javac.junit.out}"
300 includes="${gwt.junit.testcase.web.includes}"
301 excludes="${gwt.junit.testcase.web.excludes}" />
jlabanca@google.com277d0ee2009-10-17 03:20:33 +0000302 <gwt.junit test.args="${test.args} -XdisableClassMetadata -web -out www -runStyle Selenium:${gwt.hosts.web.selenium} -batch module"
jat@google.com57b69402009-10-14 18:08:29 +0000303 test.out="${junit.out}/nometa-selenium"
304 test.cases="test.nometa.selenium.tests" >
jat@google.combf79ddb2009-10-14 07:44:30 +0000305 <extraclasspaths>
306 <path refid="test.extraclasspath" />
307 </extraclasspaths>
308 </gwt.junit>
309 </target>
310
311 <target name="test.draft.selenium"
jat@google.com57b69402009-10-14 18:08:29 +0000312 description="Run draft compiled tests using Selenium RC"
jlabanca@google.comf780b7a2009-10-16 16:36:03 +0000313 if="gwt.hosts.web.selenium"
314 unless="test.draft.selenium.disable">
jat@google.combf79ddb2009-10-14 07:44:30 +0000315 <echo message="Performing draft testing using Selenium RC at ${gwt.hosts.web.selenium}" />
316 <property name="test.selenium.args" value="${test.args}" />
jat@google.com57b69402009-10-14 18:08:29 +0000317 <fileset id="test.draft.selenium.tests" dir="${javac.junit.out}"
318 includes="${gwt.junit.testcase.web.includes}"
319 excludes="${gwt.junit.testcase.web.excludes}" />
jlabanca@google.com277d0ee2009-10-17 03:20:33 +0000320 <gwt.junit test.args="${test.args} -draftCompile -web -out www -runStyle Selenium:${gwt.hosts.web.selenium} -batch module"
jat@google.com57b69402009-10-14 18:08:29 +0000321 test.out="${junit.out}/draft-selenium"
322 test.cases="test.draft.selenium.tests" >
jat@google.combf79ddb2009-10-14 07:44:30 +0000323 <extraclasspaths>
324 <path refid="test.extraclasspath" />
325 </extraclasspaths>
326 </gwt.junit>
327 </target>
328
329 <target name="test.emma.htmlunit"
330 depends="compile, compile.tests"
jlabanca@google.comf780b7a2009-10-16 16:36:03 +0000331 description="Run emma tests with HtmlUnit"
332 unless="test.emma.htmlunit.disable">
jat@google.com57b69402009-10-14 18:08:29 +0000333 <fileset id="test.emma.htmlunit.tests" dir="${javac.junit.out}"
jlabanca@google.com66eac842009-10-14 19:48:54 +0000334 includes="${gwt.junit.testcase.dev.includes}"
335 excludes="${gwt.junit.testcase.dev.excludes}" />
jat@google.com57b69402009-10-14 18:08:29 +0000336 <gwt.junit test.args="${test.args}"
337 test.out="${junit.out}/emma-htmlunit"
338 test.cases="test.emma.htmlunit.tests" >
jat@google.combf79ddb2009-10-14 07:44:30 +0000339 <extraclasspaths>
340 <path refid="test.extraclasspath" />
341 <pathelement location="${gwt.tools.redist}/emma/emma.jar" />
342 </extraclasspaths>
343 </gwt.junit>
344 </target>
345
346 <target name="test.dev.htmlunit"
jlabanca@google.com66eac842009-10-14 19:48:54 +0000347 depends="compile, compile.tests"
jlabanca@google.comf780b7a2009-10-16 16:36:03 +0000348 description="Run dev-mode tests with HtmlUnit."
349 unless="test.dev.htmlunit.disable">
jat@google.com57b69402009-10-14 18:08:29 +0000350 <fileset id="test.dev.htmlunit.tests" dir="${javac.junit.out}"
351 includes="${gwt.junit.testcase.dev.includes}"
352 excludes="${gwt.junit.testcase.dev.excludes}" />
353 <gwt.junit test.args="${test.args}" test.out="${junit.out}/dev-htmlunit"
354 test.cases="test.dev.htmlunit.tests" >
jat@google.combf79ddb2009-10-14 07:44:30 +0000355 <extraclasspaths>
356 <path refid="test.extraclasspath" />
357 </extraclasspaths>
358 </gwt.junit>
359 </target>
360
361 <target name="test.hosted.emma" depends="test.emma">
362 <echo message="DEPRECATED: test.hosted.emma has been renamed test.emma"/>
363 </target>
364
365 <target name="test.hosted" depends="test.dev">
366 <echo message="DEPRECATED: test.hosted has been renamed test.dev"/>
367 </target>
368
jat@google.combf79ddb2009-10-14 07:44:30 +0000369 <target name="test.noserver"
370 depends="compile, compile.tests"
jlabanca@google.comf780b7a2009-10-16 16:36:03 +0000371 description="Run noserver tests for this project."
372 unless="test.noserver.disable">
jat@google.com57b69402009-10-14 18:08:29 +0000373 <fileset id="test.noserver.tests" dir="${javac.junit.out}"
374 includes="${gwt.junit.testcase.noserver.includes}"
375 excludes="${gwt.junit.testcase.noserver.excludes}" />
376 <gwt.junit test.args="${test.args} -web -noserver"
377 test.out="${junit.out}/noserver" test.cases="test.noserver.tests">
spoon@google.comd0b00f82009-03-27 14:58:53 +0000378 <extraclasspaths>
fabbott@google.com25305472009-06-10 21:39:00 +0000379 <path refid="test.extraclasspath" />
spoon@google.comd0b00f82009-03-27 14:58:53 +0000380 </extraclasspaths>
381 </gwt.junit>
fabbott@google.com0e2dc6282008-08-22 16:09:01 +0000382 </target>
gwt.team.scottb5b5e6342007-02-22 21:34:23 +0000383
jat@google.combf79ddb2009-10-14 07:44:30 +0000384 <target name="test.web.htmlunit"
385 depends="compile, compile.tests"
jlabanca@google.comf780b7a2009-10-16 16:36:03 +0000386 description="Run web-mode tests with HtmlUnit."
387 unless="test.web.htmlunit.disable">
jat@google.com57b69402009-10-14 18:08:29 +0000388 <fileset id="test.web.htmlunit.tests" dir="${javac.junit.out}"
389 includes="${gwt.junit.testcase.web.includes}"
390 excludes="${gwt.junit.testcase.web.excludes}" />
391 <gwt.junit test.args="${test.args} -out www -web"
392 test.out="${junit.out}/web-htmlunit"
393 test.cases="test.web.htmlunit.tests">
fabbott@google.com0e2dc6282008-08-22 16:09:01 +0000394 <extraclasspaths>
fabbott@google.com25305472009-06-10 21:39:00 +0000395 <path refid="test.extraclasspath" />
fabbott@google.com0e2dc6282008-08-22 16:09:01 +0000396 </extraclasspaths>
397 </gwt.junit>
398 </target>
gwt.team.scottb5b5e6342007-02-22 21:34:23 +0000399
jat@google.combf79ddb2009-10-14 07:44:30 +0000400 <target name="test.nometa.htmlunit"
401 depends="compile, compile.tests"
jlabanca@google.comf780b7a2009-10-16 16:36:03 +0000402 description="Run -XdisableClassMetadata tests with HtmlUnit."
403 unless="test.nometa.htmlunit.disable">
jat@google.com57b69402009-10-14 18:08:29 +0000404 <fileset id="test.nometa.htmlunit.tests" dir="${javac.junit.out}"
405 includes="${gwt.junit.testcase.web.includes}"
406 excludes="${gwt.junit.testcase.web.excludes}" />
407 <gwt.junit test.args="${test.args} -XdisableClassMetadata -out www -web"
408 test.out="${junit.out}/nometa-htmlunit"
409 test.cases="test.nometa.htmlunit.tests" >
bobv@google.comc0e308f2009-02-19 01:08:17 +0000410 <extraclasspaths>
fabbott@google.com25305472009-06-10 21:39:00 +0000411 <path refid="test.extraclasspath" />
bobv@google.comc0e308f2009-02-19 01:08:17 +0000412 </extraclasspaths>
413 </gwt.junit>
414 </target>
415
jat@google.combf79ddb2009-10-14 07:44:30 +0000416 <target name="test.draft.htmlunit"
417 depends="compile, compile.tests"
jlabanca@google.comf780b7a2009-10-16 16:36:03 +0000418 description="Run draft compiled HtmlUnit tests (no batching on purpose)"
419 unless="test.draft.htmlunit.disable">
jat@google.com57b69402009-10-14 18:08:29 +0000420 <fileset id="test.draft.htmlunit.tests" dir="${javac.junit.out}"
421 includes="${gwt.junit.testcase.web.includes}"
422 excludes="${gwt.junit.testcase.web.excludes}" />
423 <gwt.junit test.args="${test.args} -draftCompile -out www -web"
424 test.out="${junit.out}/draft-htmlunit"
425 test.cases="test.draft.htmlunit.tests" >
bobv@google.com62773b12009-01-29 22:31:44 +0000426 <extraclasspaths>
fabbott@google.com25305472009-06-10 21:39:00 +0000427 <path refid="test.extraclasspath" />
bobv@google.com62773b12009-01-29 22:31:44 +0000428 </extraclasspaths>
429 </gwt.junit>
430 </target>
431
jat@google.combf79ddb2009-10-14 07:44:30 +0000432 <target name="test"
433 depends="compile, compile.tests"
jat@google.com57b69402009-10-14 18:08:29 +0000434 description="Run all tests for this project.">
jlabanca@google.comf780b7a2009-10-16 16:36:03 +0000435 <!-- Prevent compilation for every target. -->
436 <property name="compile.complete" value="true"/>
437 <property name="compile.tests.complete" value="true"/>
438
jat@google.com57b69402009-10-14 18:08:29 +0000439 <property.ensure name="distro.built" location="${gwt.dev.staging.jar}"
440 message="GWT must be built before performing any tests. This can be fixed by running ant in the ${gwt.root} directory." />
jlabanca@google.comf78c54b2009-07-16 17:19:20 +0000441 <limit failonerror="true" hours="${test.timeout}">
jlabanca@google.com481db2d2009-10-19 17:28:15 +0000442 <parallel threadsPerProcessor="${gwt.threadsPerProcessor}"
443 threadCount="${gwt.threadCount}">
jlabanca@google.comf780b7a2009-10-16 16:36:03 +0000444 <!--
445 The remote targets must be run sequentially or BrowserManager will queue
446 requests, which will cause some tests to timeout while waiting.
447 -->
448 <sequential>
449 <antcall target="test.dev.remote"/>
450 <antcall target="test.emma.remote"/>
451 <antcall target="test.web.remote"/>
452 <antcall target="test.draft.remote"/>
453 <antcall target="test.nometa.remote"/>
454 </sequential>
455 <antcall target="test.dev.selenium"/>
456 <antcall target="test.emma.selenium"/>
457 <antcall target="test.web.selenium"/>
458 <antcall target="test.draft.selenium"/>
459 <antcall target="test.nometa.selenium"/>
jat@google.combf79ddb2009-10-14 07:44:30 +0000460 <antcall target="test.noserver"/>
jlabanca@google.comf780b7a2009-10-16 16:36:03 +0000461 <!-- TODO(jlabanca): Enable htmlunit tests when they are stable. -->
462 <!-- <antcall target="test.dev.htmlunit"/> -->
463 <!-- <antcall target="test.emma.htmlunit"/> -->
464 <!-- <antcall target="test.web.htmlunit"/> -->
465 <!-- <antcall target="test.draft.htmlunit"/> -->
466 <!-- <antcall target="test.nometa.htmlunit"/> -->
467 </parallel>
fabbott@google.com0e2dc6282008-08-22 16:09:01 +0000468 </limit>
469 </target>
gwt.team.scottb14c5b9d2006-12-10 06:06:08 +0000470
jat@google.com57b69402009-10-14 18:08:29 +0000471 <target name="test.htmlunit"
472 depends="compile, compile.tests"
473 description="Run all HtmlUnit tests">
jlabanca@google.com4af13062009-10-23 23:28:56 +0000474 <!-- Prevent compilation for every target. -->
475 <property name="compile.complete" value="true"/>
476 <property name="compile.tests.complete" value="true"/>
477
jat@google.com57b69402009-10-14 18:08:29 +0000478 <property.ensure name="distro.built" location="${gwt.dev.staging.jar}"
479 message="GWT must be built before performing any tests. This can be fixed by running ant in the ${gwt.root} directory." />
480 <limit failonerror="true" hours="${test.timeout}">
jlabanca@google.com481db2d2009-10-19 17:28:15 +0000481 <parallel threadsPerProcessor="${gwt.threadsPerProcessor}"
482 threadCount="${gwt.threadCount}">
jat@google.com57b69402009-10-14 18:08:29 +0000483 <antcall target="test.dev.htmlunit"/>
484 <antcall target="test.emma.htmlunit"/>
485 <antcall target="test.web.htmlunit"/>
486 <antcall target="test.draft.htmlunit"/>
487 <antcall target="test.nometa.htmlunit"/>
488 <antcall target="test.noserver"/>
489 </parallel>
490 </limit>
491 </target>
492
jat@google.combf79ddb2009-10-14 07:44:30 +0000493 <target name="test.dev"
494 depends="compile, compile.tests"
495 description="Run dev-mode tests for this project.">
jlabanca@google.com4af13062009-10-23 23:28:56 +0000496 <!-- Prevent compilation for every target. -->
497 <property name="compile.complete" value="true"/>
498 <property name="compile.tests.complete" value="true"/>
499
jat@google.combf79ddb2009-10-14 07:44:30 +0000500 <limit failonerror="true" hours="${test.timeout}">
jlabanca@google.com481db2d2009-10-19 17:28:15 +0000501 <parallel threadsPerProcessor="${gwt.threadsPerProcessor}"
502 threadCount="${gwt.threadCount}">
jat@google.combf79ddb2009-10-14 07:44:30 +0000503 <!-- disable HtmlUnit until it is reliable
504 <antcall target="test.dev.htmlunit"/>
505 -->
506 <!-- no-op unless gwt.hosts.dev.remote is defined -->
507 <antcall target="test.dev.remote"/>
508 <!-- no-op unless gwt.hosts.dev.selenium is defined -->
509 <antcall target="test.dev.selenium"/>
510 </parallel>
511 </limit>
512 </target>
513
514 <target name="test.web"
515 depends="compile, compile.tests"
jat@google.com57b69402009-10-14 18:08:29 +0000516 description="Run web-mode tests for this project.">
jlabanca@google.com4af13062009-10-23 23:28:56 +0000517 <!-- Prevent compilation for every target. -->
518 <property name="compile.complete" value="true"/>
519 <property name="compile.tests.complete" value="true"/>
520
jat@google.combf79ddb2009-10-14 07:44:30 +0000521 <limit failonerror="true" hours="${test.timeout}">
jlabanca@google.com481db2d2009-10-19 17:28:15 +0000522 <parallel threadsPerProcessor="${gwt.threadsPerProcessor}"
523 threadCount="${gwt.threadCount}">
jat@google.combf79ddb2009-10-14 07:44:30 +0000524 <!-- disable HtmlUnit until it is reliable
525 <antcall target="test.web.htmlunit"/>
526 -->
527 <!-- no-op unless gwt.hosts.web.remote is defined -->
528 <antcall target="test.web.remote"/>
529 <!-- no-op unless gwt.hosts.web.selenium is defined -->
530 <antcall target="test.web.selenium"/>
531 </parallel>
532 </limit>
533 </target>
534
535 <target name="test.emma"
536 depends="compile, compile.tests"
jat@google.com57b69402009-10-14 18:08:29 +0000537 description="Run emma tests for this project.">
jlabanca@google.com4af13062009-10-23 23:28:56 +0000538 <!-- Prevent compilation for every target. -->
539 <property name="compile.complete" value="true"/>
540 <property name="compile.tests.complete" value="true"/>
541
jat@google.combf79ddb2009-10-14 07:44:30 +0000542 <limit failonerror="true" hours="${test.timeout}">
jlabanca@google.com481db2d2009-10-19 17:28:15 +0000543 <parallel threadsPerProcessor="${gwt.threadsPerProcessor}"
544 threadCount="${gwt.threadCount}">
jat@google.combf79ddb2009-10-14 07:44:30 +0000545 <!-- disable HtmlUnit until it is reliable
546 <antcall target="test.emma.htmlunit"/>
547 -->
548 <!-- no-op unless gwt.hosts.dev.remote is defined -->
549 <antcall target="test.emma.remote"/>
550 <!-- no-op unless gwt.hosts.dev.selenium is defined -->
551 <antcall target="test.emma.selenium"/>
552 </parallel>
553 </limit>
554 </target>
555
556 <target name="test.draft"
557 depends="compile, compile.tests"
jat@google.com57b69402009-10-14 18:08:29 +0000558 description="Run draft compiled tests for this project.">
jlabanca@google.com4af13062009-10-23 23:28:56 +0000559 <!-- Prevent compilation for every target. -->
560 <property name="compile.complete" value="true"/>
561 <property name="compile.tests.complete" value="true"/>
562
jat@google.combf79ddb2009-10-14 07:44:30 +0000563 <limit failonerror="true" hours="${test.timeout}">
jlabanca@google.com481db2d2009-10-19 17:28:15 +0000564 <parallel threadsPerProcessor="${gwt.threadsPerProcessor}"
565 threadCount="${gwt.threadCount}">
jat@google.combf79ddb2009-10-14 07:44:30 +0000566 <!-- disable HtmlUnit until it is reliable
567 <antcall target="test.draft.htmlunit"/>
568 -->
569 <!-- no-op unless gwt.hosts.web.remote is defined -->
570 <antcall target="test.draft.remote"/>
571 <!-- no-op unless gwt.hosts.web.selenium is defined -->
572 <antcall target="test.draft.selenium"/>
573 </parallel>
574 </limit>
575 </target>
576
577 <target name="test.nometa"
578 depends="compile, compile.tests"
jat@google.com57b69402009-10-14 18:08:29 +0000579 description="Run -XdisableClassMetadata tests for this project.">
jlabanca@google.com4af13062009-10-23 23:28:56 +0000580 <!-- Prevent compilation for every target. -->
581 <property name="compile.complete" value="true"/>
582 <property name="compile.tests.complete" value="true"/>
583
jat@google.combf79ddb2009-10-14 07:44:30 +0000584 <limit failonerror="true" hours="${test.timeout}">
jlabanca@google.com481db2d2009-10-19 17:28:15 +0000585 <parallel threadsPerProcessor="${gwt.threadsPerProcessor}"
586 threadCount="${gwt.threadCount}">
jat@google.combf79ddb2009-10-14 07:44:30 +0000587 <!-- disable HtmlUnit until it is reliable
588 <antcall target="test.web.htmlunit"/>
589 -->
590 <!-- no-op unless gwt.hosts.web.remote is defined -->
591 <antcall target="test.nometa.remote"/>
592 <!-- no-op unless gwt.hosts.web.selenium is defined -->
593 <antcall target="test.nometa.selenium"/>
594 </parallel>
595 </limit>
596 </target>
597
jat@google.com57b69402009-10-14 18:08:29 +0000598 <!--
599 Merges coverage data for the entire project
600 -->
601 <target name="emma.merge">
jlabanca@google.com81244562009-08-05 19:55:36 +0000602 <delete dir="${emma.merged.out}" />
603 <mkdir dir="${emma.merged.out}" />
604 <emma>
605 <merge outfile="${emma.merged.out}/merged.emma" >
606 <fileset dir="${junit.out}" >
607 <include name="**/*.emma" />
608 <exclude name="${emma.merged.out}/merged.emma" />
609 </fileset>
610 </merge>
611 </emma>
612 <emma>
613 <report sourcepath="${project.classpath.src}">
614 <fileset file="${javac.emma.out}/metadata.emma" />
615 <fileset file="${emma.merged.out}/merged.emma" />
616 <txt outfile="${emma.merged.out}/coverage.txt" />
617 <html outfile="${emma.merged.out}/coverage.html" />
618 <xml outfile="${emma.merged.out}/coverage.xml" />
619 </report>
620 </emma>
621 </target>
622
jat@google.combf79ddb2009-10-14 07:44:30 +0000623 <target name="clean"
624 description="Cleans this project's intermediate and output files">
fabbott@google.com0e2dc6282008-08-22 16:09:01 +0000625 <delete dir="${project.build}" />
626 <delete file="${project.lib}" />
627 </target>
jat@google.com57b69402009-10-14 18:08:29 +0000628
629 <target name="presubmit" depends="test, checkstyle"
630 description="runs the gwt api checker, user checkstyle, and user tests">
spoon@google.comd0b00f82009-03-27 14:58:53 +0000631 <gwt.ant dir=".." target="apicheck-nobuild"/>
jgw@google.coma3509e22009-02-06 21:06:24 +0000632 </target>
gwt.team.scottb14c5b9d2006-12-10 06:06:08 +0000633</project>