blob: c37fbeb5de907f79c98ae04d3b450308087c6d28 [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" />
kjin@google.combdabce32010-09-08 22:25:08 +00004 <property name="test.args" value="-ea" />
5 <property name="test.jvmargs" value="-ea" />
fabbott@google.com25305472009-06-10 21:39:00 +00006
jat@google.combf79ddb2009-10-14 07:44:30 +00007 <!-- support old variables names -->
8 <condition property="gwt.hosts.web.remote" value="${gwt.remote.browsers}">
9 <isset property="gwt.remote.browsers" />
10 </condition>
11 <condition property="gwt.hosts.web.selenium" value="${gwt.selenium.hosts}">
12 <isset property="gwt.selenium.hosts" />
13 </condition>
14
jat@google.com57b69402009-10-14 18:08:29 +000015 <!--
16 BrowserManagerServer_Stub compiled using rmic, which doesn't generate
17 full source code
18 -->
jlabanca@google.com81244562009-08-05 19:55:36 +000019 <property name="emma.filter.exclude" value="*BrowserManagerServer_Stub*" />
20
fabbott@google.com0e2dc6282008-08-22 16:09:01 +000021 <import file="${gwt.root}/common.ant.xml" />
gwt.team.scottb14c5b9d2006-12-10 06:06:08 +000022
jlabanca@google.com18f24c02011-03-11 19:01:02 +000023 <property name="test.timeout" value="5" />
jlabanca@google.com81244562009-08-05 19:55:36 +000024 <property name="emma.merged.out" value="${junit.out}/emma-coverage" />
25 <property name="gwt.junit.testcase.web.includes" value="${gwt.junit.testcase.includes}" />
26 <property name="gwt.junit.testcase.web.excludes" value="" />
27
jat@google.combf79ddb2009-10-14 07:44:30 +000028 <property name="gwt.junit.testcase.dev.includes" value="${gwt.junit.testcase.includes}" />
29 <property name="gwt.junit.testcase.dev.excludes" value="" />
30
gwt.mirrorbot@gmail.comd54a4bd2010-06-07 19:20:31 +000031 <property name="benchmark.timeout" value="30" />
32 <property name="gwt.benchmark.testcase.web.includes" value="${gwt.benchmark.testcase.includes}" />
33 <property name="gwt.benchmark.testcase.web.excludes" value="${gwt.benchmark.testcase.excludes}" />
nchalko@google.comad61f1d2011-01-17 17:08:08 +000034
35 <property name="gwt.tck.testcase.dev.includes" value="com/google/gwt/validation/tck/**/*GwtSuite.class" />
36 <property name="gwt.tct.testcase.dev.excludes" value="" />
gwt.mirrorbot@gmail.comd54a4bd2010-06-07 19:20:31 +000037
scottb@google.com92dd9932011-03-11 17:50:44 +000038 <property name="gwt.nongwt.testcase.includes" value="com/google/gwt/dev/jjs/GwtAstBuilderTest.class" />
39 <property name="gwt.nongwt.testcase.excludes" value="" />
40
jat@google.com57b69402009-10-14 18:08:29 +000041 <!--
jlabanca@google.com4c4d76d2009-11-01 16:30:34 +000042 Test args can be specified per test target type.
43 -->
kjin@google.combdabce32010-09-08 22:25:08 +000044 <property name="test.args.dev.remote" value="${test.args} -out www -standardsMode -runStyle RemoteWeb:${gwt.hosts.dev.remote}" />
45 <property name="test.args.dev.selenium" value='${test.args} -out www -standardsMode -runStyle "Selenium:${gwt.hosts.dev.selenium}"' />
46 <property name="test.args.web.remote" value="${test.args} -out www -prod -standardsMode -runStyle RemoteWeb:${gwt.hosts.web.remote}" />
47 <property name="test.args.web.selenium" value='${test.args} -prod -standardsMode -out www -runStyle "Selenium:${gwt.hosts.web.selenium}"' />
jlabanca@google.com4c4d76d2009-11-01 16:30:34 +000048
49 <!--
fabbott@google.com25305472009-06-10 21:39:00 +000050 Whether I18NSuite should test e.g. Foo$InnerMsgs_fr.properties (if the
51 value is "dollar") or Foo_Inner_fr.properties (for "bar")
52 -->
53 <property name="gwt.i18n.test.InnerClassChar" value="dollar"/>
54
spoon@google.com11b85e12010-05-28 15:44:36 +000055 <!-- Platform shouldn't matter here, just picking one -->
56 <property.ensure name="gwt.dev.jar" location="${gwt.build.lib}/gwt-dev.jar" />
57
fabbott@google.com0e2dc6282008-08-22 16:09:01 +000058 <!--
fabbott@google.com25305472009-06-10 21:39:00 +000059 Classpaths added for test cases
60 -->
61 <path id="test.extraclasspath">
jat@google.comacf97d32009-09-21 22:06:15 +000062 <pathelement location="${gwt.build}/out/dev/bin-test" />
bobv@google.comb39b79c2009-06-18 15:58:28 +000063 <pathelement location="test-super" />
fabbott@google.com25305472009-06-10 21:39:00 +000064 <pathelement location="test_i18n_${gwt.i18n.test.InnerClassChar}" />
nchalko@google.com69da43f2010-10-06 13:53:06 +000065 <pathelement location="${gwt.tools.lib}/apache/log4j/log4j-1.2.16.jar" />
jat@google.combf79ddb2009-10-14 07:44:30 +000066 <pathelement location="${gwt.tools.lib}/cglib/cglib-2.2.jar"/>
yaxin@google.come7a13602010-10-28 01:53:17 +000067 <pathelement location="${gwt.tools.lib}/objenesis/objenesis-1.2.jar"/>
68 <pathelement location="${gwt.tools.lib}/easymock/easymock-3.0.jar"/>
jat@google.combf79ddb2009-10-14 07:44:30 +000069 <pathelement location="${gwt.tools.lib}/objectweb/asm-3.1.jar"/>
kjin@google.comb289ff42010-08-20 14:59:07 +000070 <pathelement location="${gwt.tools.lib}/javax/validation/validation-api-1.0.0.GA.jar" />
71 <pathelement location="${gwt.tools.lib}/javax/validation/validation-api-1.0.0.GA-sources.jar" />
amitmanjhi@google.comd241b1d2010-09-03 05:25:06 +000072 <pathelement location="${gwt.tools.lib}/hibernate/validator/hibernate-validator-4.1.0.Final.jar" />
nchalko@google.com69da43f2010-10-06 13:53:06 +000073 <pathelement location="${gwt.tools.lib}/hibernate/validator/hibernate-validator-4.1.0.Final-sources.jar" />
amitmanjhi@google.comd241b1d2010-09-03 05:25:06 +000074 <pathelement location="${gwt.tools.lib}/slf4j/slf4j-api/slf4j-api-1.6.1.jar" />
75 <pathelement location="${gwt.tools.lib}/slf4j/slf4j-log4j12/slf4j-log4j12-1.6.1.jar" />
kjin@google.comb289ff42010-08-20 14:59:07 +000076 <pathelement location="${gwt.tools}/redist/json/r2_20080312/json-1.5.jar" />
nchalko@google.com00457012011-01-11 22:19:47 +000077 <!-- TCK jars -->
78 <pathelement location="${gwt.tools.lib}/hibernate/validator/tck/jsr303-tck-1.0.3.GA-sources.jar" />
79 <pathelement location="${gwt.tools.lib}/hibernate/validator/tck/jsr303-tck-1.0.3.GA.jar" />
80 <pathelement location="${gwt.tools.lib}/jboss/test-audit/jboss-test-audit-api-1.0.0-sources.jar" />
81 <pathelement location="${gwt.tools.lib}/jboss/test-audit/jboss-test-audit-api-1.0.0.jar" />
82 <pathelement location="${gwt.tools.lib}/jboss/test-harness/jboss-test-harness-1.0.0-sources.jar" />
83 <pathelement location="${gwt.tools.lib}/jboss/test-harness/jboss-test-harness-1.0.0.jar" />
84 <pathelement location="${gwt.tools.lib}/jboss/test-harness/jboss-test-harness-api-1.0.0-sources.jar" />
85 <pathelement location="${gwt.tools.lib}/jboss/test-harness/jboss-test-harness-api-1.0.0.jar" />
86 <pathelement location="${gwt.tools.lib}/testng/testng-5.14.1-sources.jar" />
fabbott@google.com618aafc2011-03-08 16:22:05 +000087 <pathelement location="${gwt.tools.lib}/testng/testng-5.14.1-nojunit.jar" />
spoon@google.com11b85e12010-05-28 15:44:36 +000088 <pathelement location="${gwt.dev.jar}" />
fabbott@google.com25305472009-06-10 21:39:00 +000089 </path>
90
jlabanca@google.comf780b7a2009-10-16 16:36:03 +000091 <target name="compile" description="Compile all class files"
92 unless="compile.complete">
fabbott@google.com0e2dc6282008-08-22 16:09:01 +000093 <mkdir dir="${javac.out}" />
tomerigo@google.comc2163e62010-02-01 16:08:26 +000094 <gwt.javac excludes="**/super/**">
fabbott@google.com0e2dc6282008-08-22 16:09:01 +000095 <classpath>
scottb@google.com4f57bc22009-01-16 22:46:42 +000096 <pathelement location="${gwt.tools.lib}/tomcat/servlet-api-2.5.jar" />
fabbott@google.com618aafc2011-03-08 16:22:05 +000097 <pathelement location="${gwt.tools.lib}/junit/junit-4.8.2.jar" />
fabbott@google.com0e2dc6282008-08-22 16:09:01 +000098 <pathelement location="${gwt.tools.lib}/jfreechart/jfreechart-1.0.3.jar" />
99 <pathelement location="${gwt.tools.lib}/selenium/selenium-java-client-driver.jar" />
bobv@google.coma933c8b2009-03-26 02:12:25 +0000100 <pathelement location="${gwt.tools.lib}/w3c/sac/sac-1.3.jar" />
unnurg@google.com48d73ec2011-05-05 15:11:08 +0000101 <pathelement location="${gwt.tools.lib}/w3c/flute/flute-1.3-gg2.jar" />
amitmanjhi@google.comc278ce82010-06-28 15:45:45 +0000102 <pathelement location="${gwt.tools}/redist/json/r2_20080312/json-1.5.jar" />
amitmanjhi@google.coma2d73122010-06-24 21:48:00 +0000103 <pathelement location="${gwt.tools.lib}/javax/validation/validation-api-1.0.0.GA.jar" />
nchalko@google.com90f14a02010-07-28 19:08:32 +0000104 <!-- The source is included so validation is available from client code -->
105 <pathelement location="${gwt.tools.lib}/javax/validation/validation-api-1.0.0.GA-sources.jar" />
nchalko@google.com69da43f2010-10-06 13:53:06 +0000106 <!-- Hibernate is included until we can provide the super source as an third party jar" -->
107 <pathelement location="${gwt.tools.lib}/hibernate/validator/hibernate-validator-4.1.0.Final.jar" />
108 <pathelement location="${gwt.tools.lib}/hibernate/validator/hibernate-validator-4.1.0.Final-sources.jar" />
bobv@google.com8af231d2011-06-09 18:31:51 +0000109 <!-- Bootstrap support needed for obfuscated type tokens for JRE runtime -->
110 <pathelement location="${gwt.tools.lib}/requestfactory/requestfactory-apt.jar" />
fabbott@google.com0e2dc6282008-08-22 16:09:01 +0000111 <pathelement location="${gwt.dev.jar}" />
112 </classpath>
113 </gwt.javac>
gwt.team.mmendez99f280b2006-12-08 23:11:29 +0000114
fabbott@google.com0e2dc6282008-08-22 16:09:01 +0000115 <!-- Build the BrowserManagerServer_Stub to allow remote browser testing -->
116 <rmic base="${javac.out}"
jat@google.com57b69402009-10-14 18:08:29 +0000117 classname="com.google.gwt.junit.remote.BrowserManagerServer"
118 stubversion="1.2"/>
fabbott@google.com0e2dc6282008-08-22 16:09:01 +0000119 </target>
gwt.team.mmendez99f280b2006-12-08 23:11:29 +0000120
fabbott@google.com0e2dc6282008-08-22 16:09:01 +0000121 <!--
jat@google.comacf97d32009-09-21 22:06:15 +0000122 Compile test code for dev to pick up TypeOracleTestUtils and others.
jat@google.com57b69402009-10-14 18:08:29 +0000123 Compiles test dependencies in dev/core
spoon@google.comd0b00f82009-03-27 14:58:53 +0000124 -->
jat@google.com57b69402009-10-14 18:08:29 +0000125 <target name="compile.dev.tests">
jat@google.comc090a072009-09-21 17:39:53 +0000126 <gwt.ant dir="../dev" target="compile.tests" />
fabbott@google.com0e2dc6282008-08-22 16:09:01 +0000127 </target>
spoon@google.comd0b00f82009-03-27 14:58:53 +0000128
jat@google.com57b69402009-10-14 18:08:29 +0000129 <!--
130 Compiles the test code for this project
131 -->
jat@google.come0fa5b12009-10-13 23:57:19 +0000132 <target name="compile.tests"
jlabanca@google.comf780b7a2009-10-16 16:36:03 +0000133 depends="compile.dev.tests, compile.emma.if.enabled"
134 unless="compile.tests.complete">
fabbott@google.com0e2dc6282008-08-22 16:09:01 +0000135 <mkdir dir="${javac.junit.out}" />
nchalko@google.com00457012011-01-11 22:19:47 +0000136 <gwt.javac srcdir="test" excludes="com/google/gwt/langtest/**" destdir="${javac.junit.out}">
fabbott@google.com0e2dc6282008-08-22 16:09:01 +0000137 <classpath>
138 <pathelement location="${javac.out}" />
fabbott@google.com618aafc2011-03-08 16:22:05 +0000139 <pathelement location="${gwt.tools.lib}/junit/junit-4.8.2.jar" />
fabbott@google.com0e2dc6282008-08-22 16:09:01 +0000140 <pathelement location="${gwt.tools.lib}/selenium/selenium-java-client-driver.jar" />
bobv@google.com8af231d2011-06-09 18:31:51 +0000141 <!-- Bootstrap support needed for obfuscated type tokens for JRE runtime -->
142 <pathelement location="${gwt.tools.lib}/requestfactory/requestfactory-apt.jar" />
spoon@google.com11b85e12010-05-28 15:44:36 +0000143 <path refid="test.extraclasspath" />
fabbott@google.com0e2dc6282008-08-22 16:09:01 +0000144 </classpath>
145 </gwt.javac>
146 </target>
gwt.team.scottb14c5b9d2006-12-10 06:06:08 +0000147
zundel@google.comc0a2ce32011-06-08 23:44:32 +0000148 <!-- Precompile some GWT modules to speed up end-user builds -->
149 <!-- TODO(zundel): Find a way to precompile all modules -->
150 <!-- without tedious manual specification -->
151 <target name="precompile.modules" depends="compile">
152 <outofdate>
153 <sourcefiles>
bobv@google.com2ddc4d82011-07-01 16:12:59 +0000154 <fileset dir="${gwt.root}/user/src" >
155 <exclude name="com/google/web/bindery/requestfactory/apt/**"/>
156 </fileset>
zundel@google.comc0a2ce32011-06-08 23:44:32 +0000157 <fileset dir="${gwt.root}/user/super" />
158 <fileset dir="${gwt.root}/dev/core/src" />
159 <fileset dir="${gwt.root}/dev/core/super" />
160 <fileset file="${gwt.dev.jar}" />
161 </sourcefiles>
162 <targetfiles>
163 <!-- TODO(zundel): this is a mechanical transform -->
164 <!-- from module name. There must be a better way. -->
165 <pathelement location="${project.build}/bin/com/google/gwt/core/Core.gwtar" />
166 <pathelement location="${project.build}/bin/com/google/gwt/json/JSON.gwtar" />
167 <pathelement location="${project.build}/bin/com/google/gwt/regexp/RegExp.gwtar" />
168 <pathelement location="${project.build}/bin/com/google/gwt/user/User.gwtar" />
169 <pathelement location="${project.build}/bin/com/google/gwt/xml/XML.gwtar" />
170 <pathelement location="${project.build}/bin/com/google/gwt/rpc/RPC.gwtar" />
171 <pathelement location="${project.build}/bin/com/google/gwt/debug/Debug.gwtar" />
172 <pathelement location="${project.build}/bin/com/google/gwt/place/Place.gwtar" />
173 <pathelement location="${project.build}/bin/com/google/gwt/activity/Activity.gwtar" />
174 <pathelement location="${project.build}/bin/com/google/web/bindery/event/Event.gwtar" />
175 <pathelement location="${project.build}/bin/com/google/web/bindery/autobean/AutoBean.gwtar" />
176 <pathelement location="${project.build}/bin/com/google/web/bindery/requestfactory/RequestFactory.gwtar" />
177 <pathelement location="${project.build}/bin/com/google/gwt/logging/Logging.gwtar" />
178 </targetfiles>
179 <sequential>
180 <compileModule>
181 <module>
182 <!-- Order is important! Modules that inherit from -->
183 <!-- others should come later in the list. -->
184 <!-- All modules depend on Core -->
185 <arg value="com.google.gwt.core.Core" />
186 <arg value="com.google.gwt.json.JSON" />
187 <arg value="com.google.gwt.regexp.RegExp" />
188 <arg value="com.google.gwt.user.User" />
189
190 <!-- Below are modules that depend on User -->
191 <arg value="com.google.gwt.xml.XML" />
192 <arg value="com.google.gwt.rpc.RPC" />
193 <arg value="com.google.gwt.debug.Debug" />
194 <arg value="com.google.gwt.logging.Logging" />
195
196 <arg value="com.google.gwt.place.Place" />
197 <arg value="com.google.gwt.activity.Activity" />
198
199 <arg value="com.google.web.bindery.event.Event" />
200 <arg value="com.google.web.bindery.autobean.AutoBean" />
201 <arg value="com.google.web.bindery.requestfactory.RequestFactory" />
202 </module>
203 </compileModule>
204 </sequential>
205 </outofdate>
206 </target>
207
208 <target name="build" depends="precompile.modules"
jat@google.combf79ddb2009-10-14 07:44:30 +0000209 description="Build and package this project">
fabbott@google.com0e2dc6282008-08-22 16:09:01 +0000210 <mkdir dir="${gwt.build.lib}" />
211 <gwt.jar>
212 <fileset dir="src" excludes="**/package.html" />
213 <fileset dir="super" excludes="**/package.html" />
214 <fileset dir="${javac.out}" />
scottb@google.com171f3f52009-08-11 19:50:31 +0000215 <zipfileset src="${gwt.tools.lib}/tomcat/servlet-api-2.5.jar" excludes="**/*.java"/>
bobv@google.coma933c8b2009-03-26 02:12:25 +0000216 <zipfileset src="${gwt.tools.lib}/w3c/sac/sac-1.3.jar" />
unnurg@google.com48d73ec2011-05-05 15:11:08 +0000217 <zipfileset src="${gwt.tools.lib}/w3c/flute/flute-1.3-gg2.jar" />
fabbott@google.com0e2dc6282008-08-22 16:09:01 +0000218 </gwt.jar>
219 </target>
gwt.team.scottb14c5b9d2006-12-10 06:06:08 +0000220
fabbott@google.com0e2dc6282008-08-22 16:09:01 +0000221 <target name="checkstyle" description="Static analysis of source">
222 <gwt.checkstyle>
nchalko@google.comeb3e87a2010-08-05 20:48:12 +0000223 <fileset dir="src" >
224 <exclude name="javax/validation/super/javax/validation/constraints/Pattern.java"/>
nchalko@google.comb1077dc2010-08-13 13:36:43 +0000225 <exclude name="javax/validation/super/javax/validation/spi/ConfigurationState.java"/>
226 <exclude name="javax/validation/super/javax/validation/MessageInterpolator.java"/>
227 <exclude name="javax/validation/super/javax/validation/Configuration.java"/>
228 <exclude name="javax/validation/super/javax/validation/Validation.java"/>
nchalko@google.com49735242010-10-22 15:52:03 +0000229 <exclude name="org/hibernate/validator/super/org/hibernate/validator/**/*.java"/>
nchalko@google.coma648abd2010-12-20 19:43:41 +0000230 <exclude name="org/hibernate/validator/ValidationMessages.java"/>
nchalko@google.comb1077dc2010-08-13 13:36:43 +0000231 </fileset>
fabbott@google.com0e2dc6282008-08-22 16:09:01 +0000232 <fileset dir="super/com/google/gwt/emul" />
233 <fileset dir="super/com/google/gwt/junit/translatable" />
234 </gwt.checkstyle>
scottb@google.com6de97562009-11-03 21:04:24 +0000235 <gwt.checkstyle.tests>
236 <fileset dir="test">
scottb@google.com391ffa02009-11-03 22:04:04 +0000237 <include name="com/google/**/*.java" />
238 <include name="test/**" />
scottb@google.com6de97562009-11-03 21:04:24 +0000239 </fileset>
240 </gwt.checkstyle.tests>
fabbott@google.com0e2dc6282008-08-22 16:09:01 +0000241 </target>
gwt.team.mmendez99f280b2006-12-08 23:11:29 +0000242
jat@google.combf79ddb2009-10-14 07:44:30 +0000243 <target name="test.remoteweb" depends="test.web.remote">
244 <echo message="DEPRECATED: test.remoteweb has been renamed test.web.remote"/>
245 </target>
246
247 <target name="test.web.remote"
jat@google.com57b69402009-10-14 18:08:29 +0000248 description="Run web test with remote browsers"
jlabanca@google.comf780b7a2009-10-16 16:36:03 +0000249 if="gwt.hosts.web.remote"
250 unless="test.web.remote.disable">
jat@google.combf79ddb2009-10-14 07:44:30 +0000251 <echo message="Performing web remote testing at ${gwt.hosts.web.remote}" />
jlabanca@google.com4c4d76d2009-11-01 16:30:34 +0000252 <property name="test.web.remote.args" value="${test.args.web.remote}" />
jat@google.com3d3977f2009-10-16 04:52:05 +0000253 <fileset id="test.web.remote.tests" dir="${javac.junit.out}"
254 includes="${gwt.junit.testcase.web.includes}"
255 excludes="${gwt.junit.testcase.web.excludes}" />
jlabanca@google.com2707b142009-11-04 17:47:36 +0000256 <gwt.junit test.name="test.web.remote"
kjin@google.combdabce32010-09-08 22:25:08 +0000257 test.args="${test.web.remote.args}"
258 test.jvmargs="${test.jvmargs}"
jat@google.com3d3977f2009-10-16 04:52:05 +0000259 test.out="${junit.out}/web-remote"
260 test.cases="test.web.remote.tests" >
fabbott@google.com0e2dc6282008-08-22 16:09:01 +0000261 <extraclasspaths>
fabbott@google.com25305472009-06-10 21:39:00 +0000262 <path refid="test.extraclasspath" />
fabbott@google.com0e2dc6282008-08-22 16:09:01 +0000263 </extraclasspaths>
264 </gwt.junit>
265 </target>
zundel@google.com29666c82008-06-04 16:07:53 +0000266
jat@google.combf79ddb2009-10-14 07:44:30 +0000267 <target name="test.dev.remote"
jlabanca@google.com66eac842009-10-14 19:48:54 +0000268 depends="compile, compile.tests"
jat@google.com57b69402009-10-14 18:08:29 +0000269 description="Run dev-mode tests with remote browsers"
jlabanca@google.comf780b7a2009-10-16 16:36:03 +0000270 if="gwt.hosts.dev.remote"
271 unless="test.dev.remote.disable">
jat@google.combf79ddb2009-10-14 07:44:30 +0000272 <echo message="Performing dev-mode remote testing at ${gwt.remote.browsers}" />
jlabanca@google.com4c4d76d2009-11-01 16:30:34 +0000273 <property name="test.dev.remote.args" value="${test.args.dev.remote}" />
jat@google.com57b69402009-10-14 18:08:29 +0000274 <fileset id="test.dev.remote.tests" dir="${javac.junit.out}"
275 includes="${gwt.junit.testcase.dev.includes}"
276 excludes="${gwt.junit.testcase.dev.excludes}" />
jlabanca@google.com2707b142009-11-04 17:47:36 +0000277 <gwt.junit test.name="test.dev.remote"
kjin@google.combdabce32010-09-08 22:25:08 +0000278 test.args="${test.dev.remote.args}"
279 test.jvmargs="${test.jvmargs}"
jat@google.com57b69402009-10-14 18:08:29 +0000280 test.out="${junit.out}/dev-remote" test.cases="test.dev.remote.tests" >
fabbott@google.com0e2dc6282008-08-22 16:09:01 +0000281 <extraclasspaths>
fabbott@google.com25305472009-06-10 21:39:00 +0000282 <path refid="test.extraclasspath" />
fabbott@google.com0e2dc6282008-08-22 16:09:01 +0000283 </extraclasspaths>
284 </gwt.junit>
285 </target>
gwt.team.mmendez99f280b2006-12-08 23:11:29 +0000286
jat@google.combf79ddb2009-10-14 07:44:30 +0000287 <target name="test.emma.remote"
jlabanca@google.com66eac842009-10-14 19:48:54 +0000288 depends="compile, compile.tests"
jat@google.com57b69402009-10-14 18:08:29 +0000289 description="Run emma tests with remote browsers"
jlabanca@google.comf780b7a2009-10-16 16:36:03 +0000290 if="gwt.hosts.dev.remote"
291 unless="test.emma.remote.disable">
jat@google.combf79ddb2009-10-14 07:44:30 +0000292 <echo message="Performing emma remote testing at ${gwt.hosts.dev.remote}" />
jlabanca@google.com4c4d76d2009-11-01 16:30:34 +0000293 <property name="test.emma.remote.args" value="${test.args.dev.remote}" />
jat@google.com57b69402009-10-14 18:08:29 +0000294 <fileset id="test.emma.remote.tests" dir="${javac.junit.out}"
jlabanca@google.com66eac842009-10-14 19:48:54 +0000295 includes="${gwt.junit.testcase.dev.includes}"
296 excludes="${gwt.junit.testcase.dev.excludes}" />
jlabanca@google.com2707b142009-11-04 17:47:36 +0000297 <gwt.junit test.name="test.emma.remote"
kjin@google.combdabce32010-09-08 22:25:08 +0000298 test.args="${test.emma.remote.args}"
299 test.jvmargs="${test.jvmargs}"
jat@google.com57b69402009-10-14 18:08:29 +0000300 test.out="${junit.out}/emma-remote"
301 test.cases="test.emma.remote.tests" >
jgw@google.coma3509e22009-02-06 21:06:24 +0000302 <extraclasspaths>
fabbott@google.com25305472009-06-10 21:39:00 +0000303 <path refid="test.extraclasspath" />
jgw@google.coma3509e22009-02-06 21:06:24 +0000304 <pathelement location="${gwt.tools.redist}/emma/emma.jar" />
305 </extraclasspaths>
306 </gwt.junit>
307 </target>
308
jat@google.combf79ddb2009-10-14 07:44:30 +0000309 <target name="test.emma.selenium"
jlabanca@google.com66eac842009-10-14 19:48:54 +0000310 depends="compile, compile.tests"
jat@google.com57b69402009-10-14 18:08:29 +0000311 description="Run emma tests with Selenium-RC servers"
jlabanca@google.comf780b7a2009-10-16 16:36:03 +0000312 if="gwt.hosts.dev.selenium"
313 unless="test.emma.selenium.disable">
jat@google.combf79ddb2009-10-14 07:44:30 +0000314 <echo message="Performing emma selenium testing at ${gwt.hosts.dev.selenium}" />
jlabanca@google.com4c4d76d2009-11-01 16:30:34 +0000315 <property name="test.emma.selenium.args" value="${test.args.dev.selenium}" />
jat@google.com57b69402009-10-14 18:08:29 +0000316 <fileset id="test.emma.selenium.tests" dir="${javac.junit.out}"
jlabanca@google.com66eac842009-10-14 19:48:54 +0000317 includes="${gwt.junit.testcase.dev.includes}"
318 excludes="${gwt.junit.testcase.dev.excludes}" />
jlabanca@google.com2707b142009-11-04 17:47:36 +0000319 <gwt.junit test.name="test.emma.selenium"
kjin@google.combdabce32010-09-08 22:25:08 +0000320 test.args='${test.emma.selenium.args}'
321 test.jvmargs="${test.jvmargs}"
jat@google.com57b69402009-10-14 18:08:29 +0000322 test.out="${junit.out}/emma-selenium"
323 test.cases="test.emma.selenium.tests" >
jat@google.combf79ddb2009-10-14 07:44:30 +0000324 <extraclasspaths>
325 <path refid="test.extraclasspath" />
326 <pathelement location="${gwt.tools.redist}/emma/emma.jar" />
327 </extraclasspaths>
328 </gwt.junit>
329 </target>
330
331 <target name="test.draft.remote"
332 depends="compile, compile.tests"
jat@google.com57b69402009-10-14 18:08:29 +0000333 description="Run draft compiled tests with remote browsers"
jlabanca@google.comf780b7a2009-10-16 16:36:03 +0000334 if="gwt.hosts.web.remote"
335 unless="test.draft.remote.disable">
jat@google.combf79ddb2009-10-14 07:44:30 +0000336 <echo message="Performing draft remote testing at ${gwt.hosts.web.remote}" />
kjin@google.combdabce32010-09-08 22:25:08 +0000337 <property name="test.draft.remote.args" value="${test.args.web.remote} -draftCompile" />
jat@google.com57b69402009-10-14 18:08:29 +0000338 <fileset id="test.draft.remote.tests" dir="${javac.junit.out}"
339 includes="${gwt.junit.testcase.web.includes}"
340 excludes="${gwt.junit.testcase.web.excludes}" />
jlabanca@google.com2707b142009-11-04 17:47:36 +0000341 <gwt.junit test.name="test.draft.remote"
kjin@google.combdabce32010-09-08 22:25:08 +0000342 test.args="${test.draft.remote.args}"
343 test.jvmargs="${test.jvmargs}"
jlabanca@google.com4c4d76d2009-11-01 16:30:34 +0000344 test.out="${junit.out}/draft-remote"
345 test.cases="test.draft.remote.tests" >
fabbott@google.com0e2dc6282008-08-22 16:09:01 +0000346 <extraclasspaths>
fabbott@google.com25305472009-06-10 21:39:00 +0000347 <path refid="test.extraclasspath" />
fabbott@google.com0e2dc6282008-08-22 16:09:01 +0000348 </extraclasspaths>
349 </gwt.junit>
spoon@google.comd0b00f82009-03-27 14:58:53 +0000350 </target>
351
jat@google.combf79ddb2009-10-14 07:44:30 +0000352 <target name="test.nometa.remote"
jat@google.com57b69402009-10-14 18:08:29 +0000353 description="Run -XdisableClassMetadata tests with remote browsers"
jlabanca@google.comf780b7a2009-10-16 16:36:03 +0000354 if="gwt.hosts.web.remote"
355 unless="test.nometa.remote.disable">
jat@google.combf79ddb2009-10-14 07:44:30 +0000356 <echo message="Performing nometa remote testing at ${gwt.hosts.web.remote}" />
kjin@google.combdabce32010-09-08 22:25:08 +0000357 <property name="test.nometa.remote.args" value="${test.args.web.remote} -XdisableClassMetadata" />
jat@google.com3d3977f2009-10-16 04:52:05 +0000358 <fileset id="test.nometa.remote.tests" dir="${javac.junit.out}"
jat@google.com57b69402009-10-14 18:08:29 +0000359 includes="${gwt.junit.testcase.web.includes}"
360 excludes="${gwt.junit.testcase.web.excludes}" />
jlabanca@google.com2707b142009-11-04 17:47:36 +0000361 <gwt.junit test.name="test.nometa.remote"
kjin@google.combdabce32010-09-08 22:25:08 +0000362 test.args="${test.nometa.remote.args}"
363 test.jvmargs="${test.jvmargs}"
jlabanca@google.com4c4d76d2009-11-01 16:30:34 +0000364 test.out="${junit.out}/nometa-remote"
365 test.cases="test.nometa.remote.tests" >
jat@google.combf79ddb2009-10-14 07:44:30 +0000366 <extraclasspaths>
367 <path refid="test.extraclasspath" />
368 </extraclasspaths>
369 </gwt.junit>
370 </target>
371
372 <target name="test.selenium" depends="test.web.selenium">
373 <echo message="DEPRECATED: test.selenium has been renamed test.web.selenium"/>
374 </target>
375
376 <target name="test.web.selenium"
377 depends="compile, compile.tests"
378 description="Run web tests using Selenium RC"
jlabanca@google.comf780b7a2009-10-16 16:36:03 +0000379 if="gwt.hosts.web.selenium"
380 unless="test.web.selenium.disable">
jat@google.combf79ddb2009-10-14 07:44:30 +0000381 <echo message="Performing web testing using Selenium RC at ${gwt.hosts.web.selenium}" />
jlabanca@google.com4c4d76d2009-11-01 16:30:34 +0000382 <property name="test.web.selenium.args" value="${test.args.web.selenium}" />
jat@google.com57b69402009-10-14 18:08:29 +0000383 <fileset id="test.web.selenium.tests" dir="${javac.junit.out}"
384 includes="${gwt.junit.testcase.web.includes}"
385 excludes="${gwt.junit.testcase.web.excludes}" />
jlabanca@google.com2707b142009-11-04 17:47:36 +0000386 <gwt.junit test.name="test.web.selenium"
kjin@google.combdabce32010-09-08 22:25:08 +0000387 test.args='${test.web.selenium.args}'
388 test.jvmargs="${test.jvmargs}"
jat@google.com57b69402009-10-14 18:08:29 +0000389 test.out="${junit.out}/web-selenium"
390 test.cases="test.web.selenium.tests" >
jat@google.combf79ddb2009-10-14 07:44:30 +0000391 <extraclasspaths>
392 <path refid="test.extraclasspath" />
393 </extraclasspaths>
394 </gwt.junit>
395 </target>
396
397 <target name="test.dev.selenium"
jlabanca@google.com66eac842009-10-14 19:48:54 +0000398 depends="compile, compile.tests"
jat@google.com57b69402009-10-14 18:08:29 +0000399 description="Run dev-mode tests using Selenium RC servers"
jlabanca@google.comf780b7a2009-10-16 16:36:03 +0000400 if="gwt.hosts.dev.selenium"
401 unless="test.dev.selenium.disable">
jat@google.combf79ddb2009-10-14 07:44:30 +0000402 <echo message="Performing dev-mode testing using Selenium RC at ${gwt.hosts.dev.selenium}" />
jlabanca@google.com4c4d76d2009-11-01 16:30:34 +0000403 <property name="test.dev.selenium.args" value="${test.args.dev.selenium}" />
jat@google.com57b69402009-10-14 18:08:29 +0000404 <fileset id="test.dev.selenium.tests" dir="${javac.junit.out}"
405 includes="${gwt.junit.testcase.dev.includes}"
406 excludes="${gwt.junit.testcase.dev.excludes}" />
jlabanca@google.com2707b142009-11-04 17:47:36 +0000407 <gwt.junit test.name="test.dev.selenium"
kjin@google.combdabce32010-09-08 22:25:08 +0000408 test.args='${test.dev.selenium.args}'
409 test.jvmargs="${test.jvmargs}"
jat@google.com57b69402009-10-14 18:08:29 +0000410 test.out="${junit.out}/dev-selenium"
411 test.cases="test.dev.selenium.tests" >
jat@google.combf79ddb2009-10-14 07:44:30 +0000412 <extraclasspaths>
413 <path refid="test.extraclasspath" />
414 </extraclasspaths>
415 </gwt.junit>
416 </target>
417
418 <target name="test.nometa.selenium"
419 description="Run nometa tests using Selenium RC"
jlabanca@google.comf780b7a2009-10-16 16:36:03 +0000420 if="gwt.hosts.web.selenium"
421 unless="test.nometa.selenium.disable">
jat@google.combf79ddb2009-10-14 07:44:30 +0000422 <echo message="Performing nometa testing using Selenium RC at ${gwt.hosts.web.selenium}" />
jlabanca@google.com4c4d76d2009-11-01 16:30:34 +0000423 <property name="test.nometa.selenium.args"
kjin@google.combdabce32010-09-08 22:25:08 +0000424 value="${test.args.web.selenium} -XdisableClassMetadata" />
jat@google.com57b69402009-10-14 18:08:29 +0000425 <fileset id="test.nometa.selenium.tests" dir="${javac.junit.out}"
426 includes="${gwt.junit.testcase.web.includes}"
427 excludes="${gwt.junit.testcase.web.excludes}" />
jlabanca@google.com2707b142009-11-04 17:47:36 +0000428 <gwt.junit test.name="test.nometa.selenium"
kjin@google.combdabce32010-09-08 22:25:08 +0000429 test.args='${test.nometa.selenium.args}'
430 test.jvmargs="${test.jvmargs}"
jat@google.com57b69402009-10-14 18:08:29 +0000431 test.out="${junit.out}/nometa-selenium"
432 test.cases="test.nometa.selenium.tests" >
jat@google.combf79ddb2009-10-14 07:44:30 +0000433 <extraclasspaths>
434 <path refid="test.extraclasspath" />
435 </extraclasspaths>
436 </gwt.junit>
437 </target>
438
439 <target name="test.draft.selenium"
jat@google.com57b69402009-10-14 18:08:29 +0000440 description="Run draft compiled tests using Selenium RC"
jlabanca@google.comf780b7a2009-10-16 16:36:03 +0000441 if="gwt.hosts.web.selenium"
442 unless="test.draft.selenium.disable">
jat@google.combf79ddb2009-10-14 07:44:30 +0000443 <echo message="Performing draft testing using Selenium RC at ${gwt.hosts.web.selenium}" />
jlabanca@google.com4c4d76d2009-11-01 16:30:34 +0000444 <property name="test.draft.selenium.args"
kjin@google.combdabce32010-09-08 22:25:08 +0000445 value="${test.args.web.selenium} -draftCompile" />
jat@google.com57b69402009-10-14 18:08:29 +0000446 <fileset id="test.draft.selenium.tests" dir="${javac.junit.out}"
447 includes="${gwt.junit.testcase.web.includes}"
448 excludes="${gwt.junit.testcase.web.excludes}" />
jlabanca@google.com2707b142009-11-04 17:47:36 +0000449 <gwt.junit test.name="test.draft.selenium"
kjin@google.combdabce32010-09-08 22:25:08 +0000450 test.args='${test.draft.selenium.args}'
451 test.jvmargs="${test.jvmargs}"
jat@google.com57b69402009-10-14 18:08:29 +0000452 test.out="${junit.out}/draft-selenium"
453 test.cases="test.draft.selenium.tests" >
jat@google.combf79ddb2009-10-14 07:44:30 +0000454 <extraclasspaths>
455 <path refid="test.extraclasspath" />
456 </extraclasspaths>
457 </gwt.junit>
458 </target>
459
460 <target name="test.emma.htmlunit"
461 depends="compile, compile.tests"
jlabanca@google.comf780b7a2009-10-16 16:36:03 +0000462 description="Run emma tests with HtmlUnit"
463 unless="test.emma.htmlunit.disable">
jat@google.com57b69402009-10-14 18:08:29 +0000464 <fileset id="test.emma.htmlunit.tests" dir="${javac.junit.out}"
jlabanca@google.com66eac842009-10-14 19:48:54 +0000465 includes="${gwt.junit.testcase.dev.includes}"
466 excludes="${gwt.junit.testcase.dev.excludes}" />
jlabanca@google.comffb28bb2010-01-25 16:52:17 +0000467 <gwt.junit test.name="test.emma.htmlunit"
468 test.args="${test.args} -standardsMode "
kjin@google.combdabce32010-09-08 22:25:08 +0000469 test.jvmargs="${test.jvmargs}"
jat@google.com57b69402009-10-14 18:08:29 +0000470 test.out="${junit.out}/emma-htmlunit"
471 test.cases="test.emma.htmlunit.tests" >
jat@google.combf79ddb2009-10-14 07:44:30 +0000472 <extraclasspaths>
473 <path refid="test.extraclasspath" />
474 <pathelement location="${gwt.tools.redist}/emma/emma.jar" />
475 </extraclasspaths>
476 </gwt.junit>
477 </target>
478
479 <target name="test.dev.htmlunit"
jlabanca@google.com66eac842009-10-14 19:48:54 +0000480 depends="compile, compile.tests"
jlabanca@google.comf780b7a2009-10-16 16:36:03 +0000481 description="Run dev-mode tests with HtmlUnit."
482 unless="test.dev.htmlunit.disable">
jat@google.com57b69402009-10-14 18:08:29 +0000483 <fileset id="test.dev.htmlunit.tests" dir="${javac.junit.out}"
484 includes="${gwt.junit.testcase.dev.includes}"
485 excludes="${gwt.junit.testcase.dev.excludes}" />
jlabanca@google.comffb28bb2010-01-25 16:52:17 +0000486 <gwt.junit test.name="test.dev.htmlunit"
487 test.args="${test.args} -standardsMode "
kjin@google.combdabce32010-09-08 22:25:08 +0000488 test.jvmargs="${test.jvmargs}"
jlabanca@google.com2707b142009-11-04 17:47:36 +0000489 test.out="${junit.out}/dev-htmlunit"
jat@google.com57b69402009-10-14 18:08:29 +0000490 test.cases="test.dev.htmlunit.tests" >
jat@google.combf79ddb2009-10-14 07:44:30 +0000491 <extraclasspaths>
492 <path refid="test.extraclasspath" />
493 </extraclasspaths>
494 </gwt.junit>
495 </target>
496
497 <target name="test.hosted.emma" depends="test.emma">
498 <echo message="DEPRECATED: test.hosted.emma has been renamed test.emma"/>
499 </target>
500
501 <target name="test.hosted" depends="test.dev">
502 <echo message="DEPRECATED: test.hosted has been renamed test.dev"/>
503 </target>
504
jat@google.combf79ddb2009-10-14 07:44:30 +0000505 <target name="test.web.htmlunit"
506 depends="compile, compile.tests"
jlabanca@google.comf780b7a2009-10-16 16:36:03 +0000507 description="Run web-mode tests with HtmlUnit."
508 unless="test.web.htmlunit.disable">
jat@google.com57b69402009-10-14 18:08:29 +0000509 <fileset id="test.web.htmlunit.tests" dir="${javac.junit.out}"
510 includes="${gwt.junit.testcase.web.includes}"
511 excludes="${gwt.junit.testcase.web.excludes}" />
jlabanca@google.com2707b142009-11-04 17:47:36 +0000512 <gwt.junit test.name="test.web.htmlunit"
jlabanca@google.comffb28bb2010-01-25 16:52:17 +0000513 test.args="${test.args} -out www -prod -standardsMode"
kjin@google.combdabce32010-09-08 22:25:08 +0000514 test.jvmargs="${test.jvmargs}"
jat@google.com57b69402009-10-14 18:08:29 +0000515 test.out="${junit.out}/web-htmlunit"
516 test.cases="test.web.htmlunit.tests">
fabbott@google.com0e2dc6282008-08-22 16:09:01 +0000517 <extraclasspaths>
fabbott@google.com25305472009-06-10 21:39:00 +0000518 <path refid="test.extraclasspath" />
fabbott@google.com0e2dc6282008-08-22 16:09:01 +0000519 </extraclasspaths>
520 </gwt.junit>
521 </target>
gwt.team.scottb5b5e6342007-02-22 21:34:23 +0000522
jat@google.combf79ddb2009-10-14 07:44:30 +0000523 <target name="test.nometa.htmlunit"
524 depends="compile, compile.tests"
jlabanca@google.comf780b7a2009-10-16 16:36:03 +0000525 description="Run -XdisableClassMetadata tests with HtmlUnit."
526 unless="test.nometa.htmlunit.disable">
jat@google.com57b69402009-10-14 18:08:29 +0000527 <fileset id="test.nometa.htmlunit.tests" dir="${javac.junit.out}"
528 includes="${gwt.junit.testcase.web.includes}"
529 excludes="${gwt.junit.testcase.web.excludes}" />
jlabanca@google.com2707b142009-11-04 17:47:36 +0000530 <gwt.junit test.name="test.nometa.htmlunit"
jlabanca@google.comffb28bb2010-01-25 16:52:17 +0000531 test.args="${test.args} -XdisableClassMetadata -out www -prod -standardsMode"
kjin@google.combdabce32010-09-08 22:25:08 +0000532 test.jvmargs="${test.jvmargs}"
jat@google.com57b69402009-10-14 18:08:29 +0000533 test.out="${junit.out}/nometa-htmlunit"
534 test.cases="test.nometa.htmlunit.tests" >
bobv@google.comc0e308f2009-02-19 01:08:17 +0000535 <extraclasspaths>
fabbott@google.com25305472009-06-10 21:39:00 +0000536 <path refid="test.extraclasspath" />
bobv@google.comc0e308f2009-02-19 01:08:17 +0000537 </extraclasspaths>
538 </gwt.junit>
539 </target>
540
jat@google.combf79ddb2009-10-14 07:44:30 +0000541 <target name="test.draft.htmlunit"
542 depends="compile, compile.tests"
jlabanca@google.comf780b7a2009-10-16 16:36:03 +0000543 description="Run draft compiled HtmlUnit tests (no batching on purpose)"
544 unless="test.draft.htmlunit.disable">
jat@google.com57b69402009-10-14 18:08:29 +0000545 <fileset id="test.draft.htmlunit.tests" dir="${javac.junit.out}"
546 includes="${gwt.junit.testcase.web.includes}"
547 excludes="${gwt.junit.testcase.web.excludes}" />
jlabanca@google.com2707b142009-11-04 17:47:36 +0000548 <gwt.junit test.name="test.draft.htmlunit"
jlabanca@google.comffb28bb2010-01-25 16:52:17 +0000549 test.args="${test.args} -draftCompile -out www -prod -standardsMode"
kjin@google.combdabce32010-09-08 22:25:08 +0000550 test.jvmargs="${test.jvmargs}"
jat@google.com57b69402009-10-14 18:08:29 +0000551 test.out="${junit.out}/draft-htmlunit"
552 test.cases="test.draft.htmlunit.tests" >
bobv@google.com62773b12009-01-29 22:31:44 +0000553 <extraclasspaths>
fabbott@google.com25305472009-06-10 21:39:00 +0000554 <path refid="test.extraclasspath" />
bobv@google.com62773b12009-01-29 22:31:44 +0000555 </extraclasspaths>
556 </gwt.junit>
557 </target>
558
jat@google.combf79ddb2009-10-14 07:44:30 +0000559 <target name="test"
560 depends="compile, compile.tests"
jat@google.com57b69402009-10-14 18:08:29 +0000561 description="Run all tests for this project.">
jlabanca@google.comf780b7a2009-10-16 16:36:03 +0000562 <!-- Prevent compilation for every target. -->
563 <property name="compile.complete" value="true"/>
564 <property name="compile.tests.complete" value="true"/>
565
jat@google.com57b69402009-10-14 18:08:29 +0000566 <property.ensure name="distro.built" location="${gwt.dev.staging.jar}"
567 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 +0000568 <limit failonerror="true" hours="${test.timeout}">
jlabanca@google.com481db2d2009-10-19 17:28:15 +0000569 <parallel threadsPerProcessor="${gwt.threadsPerProcessor}"
570 threadCount="${gwt.threadCount}">
jlabanca@google.comf780b7a2009-10-16 16:36:03 +0000571 <!--
572 The remote targets must be run sequentially or BrowserManager will queue
573 requests, which will cause some tests to timeout while waiting.
574 -->
575 <sequential>
576 <antcall target="test.dev.remote"/>
577 <antcall target="test.emma.remote"/>
578 <antcall target="test.web.remote"/>
579 <antcall target="test.draft.remote"/>
580 <antcall target="test.nometa.remote"/>
581 </sequential>
582 <antcall target="test.dev.selenium"/>
583 <antcall target="test.emma.selenium"/>
584 <antcall target="test.web.selenium"/>
585 <antcall target="test.draft.selenium"/>
586 <antcall target="test.nometa.selenium"/>
amitmanjhi@google.coma7c82b02010-03-25 14:19:13 +0000587 <antcall target="test.dev.htmlunit"/>
588 <antcall target="test.emma.htmlunit"/>
589 <antcall target="test.web.htmlunit"/>
590 <antcall target="test.draft.htmlunit"/>
591 <antcall target="test.nometa.htmlunit"/>
scottb@google.com92dd9932011-03-11 17:50:44 +0000592 <antcall target="test.nongwt"/>
jlabanca@google.comf780b7a2009-10-16 16:36:03 +0000593 </parallel>
fabbott@google.com0e2dc6282008-08-22 16:09:01 +0000594 </limit>
595 </target>
gwt.team.scottb14c5b9d2006-12-10 06:06:08 +0000596
jat@google.com57b69402009-10-14 18:08:29 +0000597 <target name="test.htmlunit"
598 depends="compile, compile.tests"
599 description="Run all HtmlUnit tests">
jlabanca@google.com4af13062009-10-23 23:28:56 +0000600 <!-- Prevent compilation for every target. -->
601 <property name="compile.complete" value="true"/>
602 <property name="compile.tests.complete" value="true"/>
nchalko@google.com90f14a02010-07-28 19:08:32 +0000603
jat@google.com57b69402009-10-14 18:08:29 +0000604 <property.ensure name="distro.built" location="${gwt.dev.staging.jar}"
605 message="GWT must be built before performing any tests. This can be fixed by running ant in the ${gwt.root} directory." />
606 <limit failonerror="true" hours="${test.timeout}">
jlabanca@google.com481db2d2009-10-19 17:28:15 +0000607 <parallel threadsPerProcessor="${gwt.threadsPerProcessor}"
608 threadCount="${gwt.threadCount}">
jat@google.com57b69402009-10-14 18:08:29 +0000609 <antcall target="test.dev.htmlunit"/>
610 <antcall target="test.emma.htmlunit"/>
611 <antcall target="test.web.htmlunit"/>
612 <antcall target="test.draft.htmlunit"/>
613 <antcall target="test.nometa.htmlunit"/>
jat@google.com57b69402009-10-14 18:08:29 +0000614 </parallel>
615 </limit>
616 </target>
617
scottb@google.com92dd9932011-03-11 17:50:44 +0000618 <target name="test.nongwt"
619 depends="compile, compile.tests"
620 description="Run JRE-only tests."
621 unless="test.nongwt.disable">
622 <fileset id="test.nongwt.tests" dir="${javac.junit.out}"
623 includes="${gwt.nongwt.testcase.includes}"
624 excludes="${gwt.nongwt.testcase.excludes}" />
625 <gwt.junit test.name="test.nongwt"
626 test.args="${test.args}"
627 test.jvmargs="${test.jvmargs}"
628 test.out="${junit.out}/nongwt"
629 test.cases="test.nongwt.tests" >
630 <extraclasspaths>
631 <path refid="test.extraclasspath" />
632 </extraclasspaths>
633 </gwt.junit>
634 </target>
635
jat@google.combf79ddb2009-10-14 07:44:30 +0000636 <target name="test.dev"
637 depends="compile, compile.tests"
638 description="Run dev-mode tests for this project.">
jlabanca@google.com4af13062009-10-23 23:28:56 +0000639 <!-- Prevent compilation for every target. -->
640 <property name="compile.complete" value="true"/>
641 <property name="compile.tests.complete" value="true"/>
642
jat@google.combf79ddb2009-10-14 07:44:30 +0000643 <limit failonerror="true" hours="${test.timeout}">
jlabanca@google.com481db2d2009-10-19 17:28:15 +0000644 <parallel threadsPerProcessor="${gwt.threadsPerProcessor}"
645 threadCount="${gwt.threadCount}">
jat@google.combf79ddb2009-10-14 07:44:30 +0000646 <antcall target="test.dev.htmlunit"/>
jat@google.combf79ddb2009-10-14 07:44:30 +0000647 <!-- no-op unless gwt.hosts.dev.remote is defined -->
648 <antcall target="test.dev.remote"/>
649 <!-- no-op unless gwt.hosts.dev.selenium is defined -->
650 <antcall target="test.dev.selenium"/>
651 </parallel>
652 </limit>
653 </target>
654
655 <target name="test.web"
656 depends="compile, compile.tests"
jat@google.com57b69402009-10-14 18:08:29 +0000657 description="Run web-mode tests for this project.">
jlabanca@google.com4af13062009-10-23 23:28:56 +0000658 <!-- Prevent compilation for every target. -->
659 <property name="compile.complete" value="true"/>
660 <property name="compile.tests.complete" value="true"/>
661
jat@google.combf79ddb2009-10-14 07:44:30 +0000662 <limit failonerror="true" hours="${test.timeout}">
jlabanca@google.com481db2d2009-10-19 17:28:15 +0000663 <parallel threadsPerProcessor="${gwt.threadsPerProcessor}"
664 threadCount="${gwt.threadCount}">
jat@google.combf79ddb2009-10-14 07:44:30 +0000665 <antcall target="test.web.htmlunit"/>
jat@google.combf79ddb2009-10-14 07:44:30 +0000666 <!-- no-op unless gwt.hosts.web.remote is defined -->
667 <antcall target="test.web.remote"/>
668 <!-- no-op unless gwt.hosts.web.selenium is defined -->
669 <antcall target="test.web.selenium"/>
670 </parallel>
671 </limit>
672 </target>
673
674 <target name="test.emma"
675 depends="compile, compile.tests"
jat@google.com57b69402009-10-14 18:08:29 +0000676 description="Run emma tests for this project.">
jlabanca@google.com4af13062009-10-23 23:28:56 +0000677 <!-- Prevent compilation for every target. -->
678 <property name="compile.complete" value="true"/>
679 <property name="compile.tests.complete" value="true"/>
680
jat@google.combf79ddb2009-10-14 07:44:30 +0000681 <limit failonerror="true" hours="${test.timeout}">
jlabanca@google.com481db2d2009-10-19 17:28:15 +0000682 <parallel threadsPerProcessor="${gwt.threadsPerProcessor}"
683 threadCount="${gwt.threadCount}">
jat@google.combf79ddb2009-10-14 07:44:30 +0000684 <antcall target="test.emma.htmlunit"/>
jat@google.combf79ddb2009-10-14 07:44:30 +0000685 <!-- no-op unless gwt.hosts.dev.remote is defined -->
686 <antcall target="test.emma.remote"/>
687 <!-- no-op unless gwt.hosts.dev.selenium is defined -->
688 <antcall target="test.emma.selenium"/>
689 </parallel>
690 </limit>
691 </target>
692
693 <target name="test.draft"
694 depends="compile, compile.tests"
jat@google.com57b69402009-10-14 18:08:29 +0000695 description="Run draft compiled tests for this project.">
jlabanca@google.com4af13062009-10-23 23:28:56 +0000696 <!-- Prevent compilation for every target. -->
697 <property name="compile.complete" value="true"/>
698 <property name="compile.tests.complete" value="true"/>
699
jat@google.combf79ddb2009-10-14 07:44:30 +0000700 <limit failonerror="true" hours="${test.timeout}">
jlabanca@google.com481db2d2009-10-19 17:28:15 +0000701 <parallel threadsPerProcessor="${gwt.threadsPerProcessor}"
702 threadCount="${gwt.threadCount}">
jat@google.combf79ddb2009-10-14 07:44:30 +0000703 <antcall target="test.draft.htmlunit"/>
jat@google.combf79ddb2009-10-14 07:44:30 +0000704 <!-- no-op unless gwt.hosts.web.remote is defined -->
705 <antcall target="test.draft.remote"/>
706 <!-- no-op unless gwt.hosts.web.selenium is defined -->
707 <antcall target="test.draft.selenium"/>
708 </parallel>
709 </limit>
710 </target>
711
712 <target name="test.nometa"
713 depends="compile, compile.tests"
jat@google.com57b69402009-10-14 18:08:29 +0000714 description="Run -XdisableClassMetadata tests for this project.">
jlabanca@google.com4af13062009-10-23 23:28:56 +0000715 <!-- Prevent compilation for every target. -->
716 <property name="compile.complete" value="true"/>
717 <property name="compile.tests.complete" value="true"/>
718
jat@google.combf79ddb2009-10-14 07:44:30 +0000719 <limit failonerror="true" hours="${test.timeout}">
jlabanca@google.com481db2d2009-10-19 17:28:15 +0000720 <parallel threadsPerProcessor="${gwt.threadsPerProcessor}"
721 threadCount="${gwt.threadCount}">
jat@google.combf79ddb2009-10-14 07:44:30 +0000722 <antcall target="test.web.htmlunit"/>
jat@google.combf79ddb2009-10-14 07:44:30 +0000723 <!-- no-op unless gwt.hosts.web.remote is defined -->
724 <antcall target="test.nometa.remote"/>
725 <!-- no-op unless gwt.hosts.web.selenium is defined -->
726 <antcall target="test.nometa.selenium"/>
727 </parallel>
728 </limit>
729 </target>
nchalko@google.comad61f1d2011-01-17 17:08:08 +0000730
731
732 <!-- Validation TCK test and reports -->
733
734 <!-- TODO(nchalko) move the tck target to user/build.xml and then delete
735 all of samples/validaitontck -->
736 <target name="tck"
737 depends="tck.run,tck.report"
738 description="Run all tests for this project.">
739 <fail
740 message="One or more junit tests failed for target: @{test.name} @{test.args}"
741 if="junit.failure" status="2" />
742 </target>
jat@google.combf79ddb2009-10-14 07:44:30 +0000743
nchalko@google.comad61f1d2011-01-17 17:08:08 +0000744 <target name="tck.run"
745 depends="compile, compile.tests"
746 description="Run all tests for this project.">
747 <!-- Prevent compilation for every target. -->
748 <property name="compile.complete" value="true"/>
749 <property name="compile.tests.complete" value="true"/>
750
751 <property.ensure name="distro.built" location="${gwt.dev.staging.jar}"
752 message="GWT must be built before performing any tests. This can be fixed by running ant in the ${gwt.root} directory." />
753 <limit failonerror="true" hours="${test.timeout}">
754
755 <antcall target="tck.dev.htmlunit"/>
756 </limit>
757
758 <fail
759 message="One or more tck tests failed for target: @{test.name} @{test.args}"
760 if="junit.failure" status="2" />
761 </target>
762
763 <macrodef name="countMarkedTests">
764 <attribute name="annotation" default="NOT SET" />
765 <attribute name="outputproperty" default="jsr303.marked.@{annotation}" />
766 <sequential>
767
768 </sequential>
769 </macrodef>
770
zundel@google.comc0a2ce32011-06-08 23:44:32 +0000771 <macrodef name="compileModule">
772 <element name="module" />
773 <sequential>
774 <gwt.timer name="Pre-compile module">
775 <java classname="com.google.gwt.dev.CompileModule" fork="yes" failonerror="true">
776 <classpath>
777 <pathelement location="${gwt.root}/user/src" />
778 <pathelement location="${gwt.root}/user/super" />
779 <pathelement location="${gwt.root}/dev/core/src" />
780 <pathelement location="${gwt.root}/dev/core/super" />
781 <pathelement location="${gwt.tools.lib}/javax/validation/validation-api-1.0.0.GA.jar" />
782 <pathelement location="${gwt.tools.lib}/javax/validation/validation-api-1.0.0.GA-sources.jar" />
783 <pathelement location="${gwt.root}/build/out/user/bin" />
784 <pathelement location="${gwt.dev.jar}" />
785 </classpath>
786 <jvmarg value="-Xmx512M" />
787 <module />
788 <arg value="-strict" />
789 <arg value="-out" />
790 <arg value="${project.build}/bin" />
791 </java>
792 </gwt.timer>
793 </sequential>
794 </macrodef>
795
nchalko@google.comad61f1d2011-01-17 17:08:08 +0000796 <target name="tck.report">
797 <mkdir dir="${junit.out}/tck-report" />
798 <mkdir dir="${junit.out}/tck-report/text" />
799
800 <scan>
801 <fileset dir="test/org/hibernate/jsr303/tck/tests" id="id"/>
802 <filterchain>
803 <countfilter match="@Failing" property="jsr303.marked.Failing" init="0"/>
804 <countfilter match="@NonTckTest" property="jsr303.marked.NonTckTest" init="0"/>
805 <countfilter match="@NotSupported" property="jsr303.marked.NotSupported" init="0"/>
nchalko@google.com4c81c392011-01-17 23:51:59 +0000806 <countfilter match="@TestNotCompatible" property="jsr303.marked.NotSupported" init="0"/>
nchalko@google.comad61f1d2011-01-17 17:08:08 +0000807 </filterchain>
808 </scan>
809
810 <!-- force to zero if not set above -->
811 <property name="jsr303.marked.Failing" value="0"/>
812 <property name="jsr303.marked.NonTckTest" value="0"/>
nchalko@google.com4c81c392011-01-17 23:51:59 +0000813 <property name="jsr303.marked.TestNotCompatible" value="0"/>
nchalko@google.comad61f1d2011-01-17 17:08:08 +0000814
815 <echo message="Marked Failing = ${jsr303.marked.Failing}" />
816 <echo message="Marked NonTckTest = ${jsr303.marked.NonTckTest}" />
817 <echo message="Marked NotSupported = ${jsr303.marked.NotSupported}" />
nchalko@google.com4c81c392011-01-17 23:51:59 +0000818 <echo message="Marked TestNotCompatible = ${jsr303.marked.TestNotCompatible}" />
nchalko@google.comad61f1d2011-01-17 17:08:08 +0000819
820 <junitreport todir="${junit.out}/tck-report">
821 <fileset dir="${junit.out}/tck-dev-htmlunit">
822 <include name="reports/TEST-*.xml" />
823 </fileset>
824 <report format="noframes" todir="${junit.out}/tck-report" styledir="style/html">
825 <param name="markedFailing" expression="${jsr303.marked.Failing}" />
826 <param name="markedNonTckTest" expression="${jsr303.marked.NonTckTest}" />
827 <param name="markedNotSupported" expression="${jsr303.marked.NotSupported}" />
nchalko@google.com4c81c392011-01-17 23:51:59 +0000828 <param name="markedTestNotCompatible" expression="${jsr303.marked.TestNotCompatible}" />
nchalko@google.comad61f1d2011-01-17 17:08:08 +0000829 </report>
830 <report format="noframes" todir="${junit.out}/tck-report/text" styledir="style/text">
831 <param name="markedFailing" expression="${jsr303.marked.Failing}" />
832 <param name="markedNonTckTest" expression="${jsr303.marked.NonTckTest}" />
833 <param name="markedNotSupported" expression="${jsr303.marked.NotSupported}" />
nchalko@google.com4c81c392011-01-17 23:51:59 +0000834 <param name="markedTestNotCompatible" expression="${jsr303.marked.TestNotCompatible}" />
nchalko@google.comad61f1d2011-01-17 17:08:08 +0000835 </report>
836 </junitreport>
837
838 <concat taskname="JSR 303 TCK Result">
839 <filelist>
840 <file name="${junit.out}/tck-report/text/junit-noframes.html" />
841 </filelist>
842 </concat>
843
844 </target>
845
846 <target name="tck.dev.htmlunit"
847 depends="compile, compile.tests"
848 description="Run dev-mode tests with HtmlUnit."
849 unless="test.dev.htmlunit.disable">
850 <fileset id="tck.dev.htmlunit.tests" dir="${javac.junit.out}"
851 includes="${gwt.tck.testcase.dev.includes}"
852 excludes="${gwt.tck.testcase.dev.excludes}" />
853 <gwt.junit test.name="test.dev.htmlunit"
854 test.args="${test.args} -standardsMode "
855 test.jvmargs="-ea -Dcom.google.gwt.sample.validationtck.util.Failing.include=true -Dcom.google.gwt.sample.validationtck.util.NonTckTest.exclude=true"
856 test.out="${junit.out}/tck-dev-htmlunit"
857 test.cases="tck.dev.htmlunit.tests"
858 haltonfailure="false"
859 >
860 <extraclasspaths>
861 <path refid="test.extraclasspath" />
862 </extraclasspaths>
863 </gwt.junit>
864 </target>
865
gwt.mirrorbot@gmail.comd54a4bd2010-06-07 19:20:31 +0000866 <target name="benchmark"
867 description="Run all benchmarks for this project.">
868
869 <property.ensure name="distro.built" location="${gwt.dev.staging.jar}"
870 message="GWT must be built before performing any tests. This can be fixed by running ant in the ${gwt.root} directory." />
871 <limit failonerror="true" hours="${benchmark.timeout}">
872 <!-- no-op unless gwt.hosts.web.remote is defined -->
873 <antcall target="benchmark.web.remote"/>
874 <!-- no-op unless gwt.hosts.web.selenium is defined -->
875 <antcall target="benchmark.web.selenium"/>
876 <antcall target="benchmark.web.htmlunit"/>
877 </limit>
878 </target>
879
880 <target name="benchmark.web.htmlunit"
881 depends="compile, compile.tests"
882 description="Run web-mode benchmarks with HtmlUnit."
883 unless="benchmark.web.htmlunit.disable">
884 <fileset id="benchmark.web.htmlunit.tests" dir="${javac.junit.out}"
885 includes="${gwt.benchmark.testcase.web.includes}"
886 excludes="${gwt.benchmark.testcase.web.excludes}" />
887 <gwt.junit test.name="benchmark.web.htmlunit"
888 test.args="${test.args} -testMethodTimeout ${benchmark.timeout} -out www -prod -standardsMode"
kjin@google.combdabce32010-09-08 22:25:08 +0000889 test.jvmargs="${test.jvmargs}"
gwt.mirrorbot@gmail.comd54a4bd2010-06-07 19:20:31 +0000890 test.out="${junit.out}/web-htmlunit-benchmark"
891 test.cases="benchmark.web.htmlunit.tests" >
892 <extraclasspaths>
893 <path refid="test.extraclasspath" />
894 </extraclasspaths>
895 </gwt.junit>
896 </target>
897
898 <target name="benchmark.web.selenium"
899 depends="compile, compile.tests"
900 description="Run web benchmark using Selenium RC"
901 if="gwt.hosts.web.selenium"
902 unless="benchmark.web.selenium.disable">
903 <echo message="Performing web benchmarking using Selenium RC at ${gwt.hosts.web.selenium}" />
904 <property name="test.web.selenium.args" value="${test.args.web.selenium}" />
905 <fileset id="benchmark.web.selenium.tests" dir="${javac.junit.out}"
906 includes="${gwt.benchmark.testcase.web.includes}"
907 excludes="${gwt.benchmark.testcase.web.excludes}" />
908 <gwt.junit test.name="benchmark.web.selenium"
kjin@google.combdabce32010-09-08 22:25:08 +0000909 test.args='${test.web.selenium.args} -testMethodTimeout ${benchmark.timeout}'
910 test.jvmargs="${test.jvmargs}"
gwt.mirrorbot@gmail.comd54a4bd2010-06-07 19:20:31 +0000911 test.out="${junit.out}/web-selenium-benchmark"
912 test.cases="benchmark.web.selenium.tests" >
913 <extraclasspaths>
914 <path refid="test.extraclasspath" />
915 </extraclasspaths>
916 </gwt.junit>
917 </target>
918
919 <target name="benchmark.web.remote"
920 depends="compile, compile.tests"
921 description="Run web benchmarks with remote browsers"
922 if="gwt.hosts.web.remote"
923 unless="benchmark.web.remote.disable">
924 <echo message="Performing web remote benchmarking at ${gwt.hosts.web.remote}" />
925 <property name="test.web.remote.args" value="${test.args.web.remote}" />
926 <fileset id="benchmark.web.remote.tests" dir="${javac.junit.out}"
927 includes="${gwt.benchmark.testcase.web.includes}"
928 excludes="${gwt.benchmark.testcase.web.excludes}" />
929 <gwt.junit test.name="benchmark.web.remote"
kjin@google.combdabce32010-09-08 22:25:08 +0000930 test.args="${test.web.remote.args} -testMethodTimeout ${benchmark.timeout}"
931 test.jvmargs="${test.jvmargs}"
gwt.mirrorbot@gmail.comd54a4bd2010-06-07 19:20:31 +0000932 test.out="${junit.out}/web-remote-benchmark"
933 test.cases="benchmark.web.remote.tests" >
934 <extraclasspaths>
935 <path refid="test.extraclasspath" />
936 </extraclasspaths>
937 </gwt.junit>
938 </target>
939
jat@google.com57b69402009-10-14 18:08:29 +0000940 <!--
941 Merges coverage data for the entire project
942 -->
943 <target name="emma.merge">
jlabanca@google.com81244562009-08-05 19:55:36 +0000944 <delete dir="${emma.merged.out}" />
945 <mkdir dir="${emma.merged.out}" />
946 <emma>
947 <merge outfile="${emma.merged.out}/merged.emma" >
948 <fileset dir="${junit.out}" >
949 <include name="**/*.emma" />
950 <exclude name="${emma.merged.out}/merged.emma" />
951 </fileset>
952 </merge>
953 </emma>
954 <emma>
955 <report sourcepath="${project.classpath.src}">
956 <fileset file="${javac.emma.out}/metadata.emma" />
957 <fileset file="${emma.merged.out}/merged.emma" />
958 <txt outfile="${emma.merged.out}/coverage.txt" />
959 <html outfile="${emma.merged.out}/coverage.html" />
960 <xml outfile="${emma.merged.out}/coverage.xml" />
961 </report>
962 </emma>
963 </target>
964
jat@google.combf79ddb2009-10-14 07:44:30 +0000965 <target name="clean"
966 description="Cleans this project's intermediate and output files">
fabbott@google.com0e2dc6282008-08-22 16:09:01 +0000967 <delete dir="${project.build}" />
968 <delete file="${project.lib}" />
969 </target>
jat@google.com57b69402009-10-14 18:08:29 +0000970
971 <target name="presubmit" depends="test, checkstyle"
972 description="runs the gwt api checker, user checkstyle, and user tests">
spoon@google.comd0b00f82009-03-27 14:58:53 +0000973 <gwt.ant dir=".." target="apicheck-nobuild"/>
jgw@google.coma3509e22009-02-06 21:06:24 +0000974 </target>
gwt.team.scottb14c5b9d2006-12-10 06:06:08 +0000975</project>