blob: 5b5060e671eee21207636f066f62b5f4b6595d9a [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
jat@google.com8cf77ce2009-10-16 01:47:08 +000023 <property name="test.timeout" value="4" />
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
jat@google.com57b69402009-10-14 18:08:29 +000038 <!--
jlabanca@google.com4c4d76d2009-11-01 16:30:34 +000039 Test args can be specified per test target type.
40 -->
kjin@google.combdabce32010-09-08 22:25:08 +000041 <property name="test.args.dev.remote" value="${test.args} -out www -standardsMode -runStyle RemoteWeb:${gwt.hosts.dev.remote}" />
42 <property name="test.args.dev.selenium" value='${test.args} -out www -standardsMode -runStyle "Selenium:${gwt.hosts.dev.selenium}"' />
43 <property name="test.args.web.remote" value="${test.args} -out www -prod -standardsMode -runStyle RemoteWeb:${gwt.hosts.web.remote}" />
44 <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 +000045
46 <!--
fabbott@google.com25305472009-06-10 21:39:00 +000047 Whether I18NSuite should test e.g. Foo$InnerMsgs_fr.properties (if the
48 value is "dollar") or Foo_Inner_fr.properties (for "bar")
49 -->
50 <property name="gwt.i18n.test.InnerClassChar" value="dollar"/>
51
spoon@google.com11b85e12010-05-28 15:44:36 +000052 <!-- Platform shouldn't matter here, just picking one -->
53 <property.ensure name="gwt.dev.jar" location="${gwt.build.lib}/gwt-dev.jar" />
54
fabbott@google.com0e2dc6282008-08-22 16:09:01 +000055 <!--
fabbott@google.com25305472009-06-10 21:39:00 +000056 Classpaths added for test cases
57 -->
58 <path id="test.extraclasspath">
jat@google.comacf97d32009-09-21 22:06:15 +000059 <pathelement location="${gwt.build}/out/dev/bin-test" />
bobv@google.comb39b79c2009-06-18 15:58:28 +000060 <pathelement location="test-super" />
fabbott@google.com25305472009-06-10 21:39:00 +000061 <pathelement location="test_i18n_${gwt.i18n.test.InnerClassChar}" />
nchalko@google.com69da43f2010-10-06 13:53:06 +000062 <pathelement location="${gwt.tools.lib}/apache/log4j/log4j-1.2.16.jar" />
jat@google.combf79ddb2009-10-14 07:44:30 +000063 <pathelement location="${gwt.tools.lib}/cglib/cglib-2.2.jar"/>
yaxin@google.come7a13602010-10-28 01:53:17 +000064 <pathelement location="${gwt.tools.lib}/objenesis/objenesis-1.2.jar"/>
65 <pathelement location="${gwt.tools.lib}/easymock/easymock-3.0.jar"/>
jat@google.combf79ddb2009-10-14 07:44:30 +000066 <pathelement location="${gwt.tools.lib}/objectweb/asm-3.1.jar"/>
kjin@google.comb289ff42010-08-20 14:59:07 +000067 <pathelement location="${gwt.tools.lib}/javax/validation/validation-api-1.0.0.GA.jar" />
68 <pathelement location="${gwt.tools.lib}/javax/validation/validation-api-1.0.0.GA-sources.jar" />
amitmanjhi@google.comd241b1d2010-09-03 05:25:06 +000069 <pathelement location="${gwt.tools.lib}/hibernate/validator/hibernate-validator-4.1.0.Final.jar" />
nchalko@google.com69da43f2010-10-06 13:53:06 +000070 <pathelement location="${gwt.tools.lib}/hibernate/validator/hibernate-validator-4.1.0.Final-sources.jar" />
amitmanjhi@google.comd241b1d2010-09-03 05:25:06 +000071 <pathelement location="${gwt.tools.lib}/slf4j/slf4j-api/slf4j-api-1.6.1.jar" />
72 <pathelement location="${gwt.tools.lib}/slf4j/slf4j-log4j12/slf4j-log4j12-1.6.1.jar" />
kjin@google.comb289ff42010-08-20 14:59:07 +000073 <pathelement location="${gwt.tools}/redist/json/r2_20080312/json-1.5.jar" />
nchalko@google.com00457012011-01-11 22:19:47 +000074 <!-- TCK jars -->
75 <pathelement location="${gwt.tools.lib}/hibernate/validator/tck/jsr303-tck-1.0.3.GA-sources.jar" />
76 <pathelement location="${gwt.tools.lib}/hibernate/validator/tck/jsr303-tck-1.0.3.GA.jar" />
77 <pathelement location="${gwt.tools.lib}/jboss/test-audit/jboss-test-audit-api-1.0.0-sources.jar" />
78 <pathelement location="${gwt.tools.lib}/jboss/test-audit/jboss-test-audit-api-1.0.0.jar" />
79 <pathelement location="${gwt.tools.lib}/jboss/test-harness/jboss-test-harness-1.0.0-sources.jar" />
80 <pathelement location="${gwt.tools.lib}/jboss/test-harness/jboss-test-harness-1.0.0.jar" />
81 <pathelement location="${gwt.tools.lib}/jboss/test-harness/jboss-test-harness-api-1.0.0-sources.jar" />
82 <pathelement location="${gwt.tools.lib}/jboss/test-harness/jboss-test-harness-api-1.0.0.jar" />
83 <pathelement location="${gwt.tools.lib}/testng/testng-5.14.1-sources.jar" />
84 <pathelement location="${gwt.tools.lib}/testng/testng-5.14.1.jar" />
spoon@google.com11b85e12010-05-28 15:44:36 +000085 <pathelement location="${gwt.dev.jar}" />
fabbott@google.com25305472009-06-10 21:39:00 +000086 </path>
87
jlabanca@google.comf780b7a2009-10-16 16:36:03 +000088 <target name="compile" description="Compile all class files"
89 unless="compile.complete">
fabbott@google.com0e2dc6282008-08-22 16:09:01 +000090 <mkdir dir="${javac.out}" />
tomerigo@google.comc2163e62010-02-01 16:08:26 +000091 <gwt.javac excludes="**/super/**">
fabbott@google.com0e2dc6282008-08-22 16:09:01 +000092 <classpath>
scottb@google.com4f57bc22009-01-16 22:46:42 +000093 <pathelement location="${gwt.tools.lib}/tomcat/servlet-api-2.5.jar" />
fabbott@google.com0e2dc6282008-08-22 16:09:01 +000094 <pathelement location="${gwt.tools.lib}/junit/junit-3.8.1.jar" />
95 <pathelement location="${gwt.tools.lib}/jfreechart/jfreechart-1.0.3.jar" />
96 <pathelement location="${gwt.tools.lib}/selenium/selenium-java-client-driver.jar" />
bobv@google.coma933c8b2009-03-26 02:12:25 +000097 <pathelement location="${gwt.tools.lib}/w3c/sac/sac-1.3.jar" />
bobv@google.com93569172010-01-15 19:17:28 +000098 <pathelement location="${gwt.tools.lib}/w3c/flute/flute-1.3-gg1.jar" />
amitmanjhi@google.comc278ce82010-06-28 15:45:45 +000099 <pathelement location="${gwt.tools}/redist/json/r2_20080312/json-1.5.jar" />
amitmanjhi@google.coma2d73122010-06-24 21:48:00 +0000100 <pathelement location="${gwt.tools.lib}/javax/validation/validation-api-1.0.0.GA.jar" />
nchalko@google.com90f14a02010-07-28 19:08:32 +0000101 <!-- The source is included so validation is available from client code -->
102 <pathelement location="${gwt.tools.lib}/javax/validation/validation-api-1.0.0.GA-sources.jar" />
nchalko@google.com69da43f2010-10-06 13:53:06 +0000103 <!-- Hibernate is included until we can provide the super source as an third party jar" -->
104 <pathelement location="${gwt.tools.lib}/hibernate/validator/hibernate-validator-4.1.0.Final.jar" />
105 <pathelement location="${gwt.tools.lib}/hibernate/validator/hibernate-validator-4.1.0.Final-sources.jar" />
fabbott@google.com0e2dc6282008-08-22 16:09:01 +0000106 <pathelement location="${gwt.dev.jar}" />
107 </classpath>
108 </gwt.javac>
gwt.team.mmendez99f280b2006-12-08 23:11:29 +0000109
fabbott@google.com0e2dc6282008-08-22 16:09:01 +0000110 <!-- Build the BrowserManagerServer_Stub to allow remote browser testing -->
111 <rmic base="${javac.out}"
jat@google.com57b69402009-10-14 18:08:29 +0000112 classname="com.google.gwt.junit.remote.BrowserManagerServer"
113 stubversion="1.2"/>
fabbott@google.com0e2dc6282008-08-22 16:09:01 +0000114 </target>
gwt.team.mmendez99f280b2006-12-08 23:11:29 +0000115
fabbott@google.com0e2dc6282008-08-22 16:09:01 +0000116 <!--
jat@google.comacf97d32009-09-21 22:06:15 +0000117 Compile test code for dev to pick up TypeOracleTestUtils and others.
jat@google.com57b69402009-10-14 18:08:29 +0000118 Compiles test dependencies in dev/core
spoon@google.comd0b00f82009-03-27 14:58:53 +0000119 -->
jat@google.com57b69402009-10-14 18:08:29 +0000120 <target name="compile.dev.tests">
jat@google.comc090a072009-09-21 17:39:53 +0000121 <gwt.ant dir="../dev" target="compile.tests" />
fabbott@google.com0e2dc6282008-08-22 16:09:01 +0000122 </target>
spoon@google.comd0b00f82009-03-27 14:58:53 +0000123
jat@google.com57b69402009-10-14 18:08:29 +0000124 <!--
125 Compiles the test code for this project
126 -->
jat@google.come0fa5b12009-10-13 23:57:19 +0000127 <target name="compile.tests"
jlabanca@google.comf780b7a2009-10-16 16:36:03 +0000128 depends="compile.dev.tests, compile.emma.if.enabled"
129 unless="compile.tests.complete">
fabbott@google.com0e2dc6282008-08-22 16:09:01 +0000130 <mkdir dir="${javac.junit.out}" />
nchalko@google.com00457012011-01-11 22:19:47 +0000131 <gwt.javac srcdir="test" excludes="com/google/gwt/langtest/**" destdir="${javac.junit.out}">
fabbott@google.com0e2dc6282008-08-22 16:09:01 +0000132 <classpath>
133 <pathelement location="${javac.out}" />
fabbott@google.com0e2dc6282008-08-22 16:09:01 +0000134 <pathelement location="${gwt.tools.lib}/junit/junit-3.8.1.jar" />
135 <pathelement location="${gwt.tools.lib}/selenium/selenium-java-client-driver.jar" />
spoon@google.com11b85e12010-05-28 15:44:36 +0000136 <path refid="test.extraclasspath" />
fabbott@google.com0e2dc6282008-08-22 16:09:01 +0000137 </classpath>
138 </gwt.javac>
139 </target>
gwt.team.scottb14c5b9d2006-12-10 06:06:08 +0000140
jat@google.combf79ddb2009-10-14 07:44:30 +0000141 <target name="build" depends="compile"
142 description="Build and package this project">
fabbott@google.com0e2dc6282008-08-22 16:09:01 +0000143 <mkdir dir="${gwt.build.lib}" />
144 <gwt.jar>
145 <fileset dir="src" excludes="**/package.html" />
146 <fileset dir="super" excludes="**/package.html" />
147 <fileset dir="${javac.out}" />
scottb@google.com171f3f52009-08-11 19:50:31 +0000148 <zipfileset src="${gwt.tools.lib}/tomcat/servlet-api-2.5.jar" excludes="**/*.java"/>
bobv@google.coma933c8b2009-03-26 02:12:25 +0000149 <zipfileset src="${gwt.tools.lib}/w3c/sac/sac-1.3.jar" />
bobv@google.com93569172010-01-15 19:17:28 +0000150 <zipfileset src="${gwt.tools.lib}/w3c/flute/flute-1.3-gg1.jar" />
fabbott@google.com0e2dc6282008-08-22 16:09:01 +0000151 </gwt.jar>
152 </target>
gwt.team.scottb14c5b9d2006-12-10 06:06:08 +0000153
fabbott@google.com0e2dc6282008-08-22 16:09:01 +0000154 <target name="checkstyle" description="Static analysis of source">
155 <gwt.checkstyle>
nchalko@google.comeb3e87a2010-08-05 20:48:12 +0000156 <fileset dir="src" >
157 <exclude name="javax/validation/super/javax/validation/constraints/Pattern.java"/>
nchalko@google.comb1077dc2010-08-13 13:36:43 +0000158 <exclude name="javax/validation/super/javax/validation/spi/ConfigurationState.java"/>
159 <exclude name="javax/validation/super/javax/validation/MessageInterpolator.java"/>
160 <exclude name="javax/validation/super/javax/validation/Configuration.java"/>
161 <exclude name="javax/validation/super/javax/validation/Validation.java"/>
nchalko@google.com49735242010-10-22 15:52:03 +0000162 <exclude name="org/hibernate/validator/super/org/hibernate/validator/**/*.java"/>
nchalko@google.coma648abd2010-12-20 19:43:41 +0000163 <exclude name="org/hibernate/validator/ValidationMessages.java"/>
nchalko@google.comb1077dc2010-08-13 13:36:43 +0000164 </fileset>
fabbott@google.com0e2dc6282008-08-22 16:09:01 +0000165 <fileset dir="super/com/google/gwt/emul" />
166 <fileset dir="super/com/google/gwt/junit/translatable" />
167 </gwt.checkstyle>
scottb@google.com6de97562009-11-03 21:04:24 +0000168 <gwt.checkstyle.tests>
169 <fileset dir="test">
scottb@google.com391ffa02009-11-03 22:04:04 +0000170 <include name="com/google/**/*.java" />
171 <include name="test/**" />
scottb@google.com6de97562009-11-03 21:04:24 +0000172 </fileset>
173 </gwt.checkstyle.tests>
fabbott@google.com0e2dc6282008-08-22 16:09:01 +0000174 </target>
gwt.team.mmendez99f280b2006-12-08 23:11:29 +0000175
jat@google.combf79ddb2009-10-14 07:44:30 +0000176 <target name="test.remoteweb" depends="test.web.remote">
177 <echo message="DEPRECATED: test.remoteweb has been renamed test.web.remote"/>
178 </target>
179
180 <target name="test.web.remote"
jat@google.com57b69402009-10-14 18:08:29 +0000181 description="Run web test with remote browsers"
jlabanca@google.comf780b7a2009-10-16 16:36:03 +0000182 if="gwt.hosts.web.remote"
183 unless="test.web.remote.disable">
jat@google.combf79ddb2009-10-14 07:44:30 +0000184 <echo message="Performing web remote testing at ${gwt.hosts.web.remote}" />
jlabanca@google.com4c4d76d2009-11-01 16:30:34 +0000185 <property name="test.web.remote.args" value="${test.args.web.remote}" />
jat@google.com3d3977f2009-10-16 04:52:05 +0000186 <fileset id="test.web.remote.tests" dir="${javac.junit.out}"
187 includes="${gwt.junit.testcase.web.includes}"
188 excludes="${gwt.junit.testcase.web.excludes}" />
jlabanca@google.com2707b142009-11-04 17:47:36 +0000189 <gwt.junit test.name="test.web.remote"
kjin@google.combdabce32010-09-08 22:25:08 +0000190 test.args="${test.web.remote.args}"
191 test.jvmargs="${test.jvmargs}"
jat@google.com3d3977f2009-10-16 04:52:05 +0000192 test.out="${junit.out}/web-remote"
193 test.cases="test.web.remote.tests" >
fabbott@google.com0e2dc6282008-08-22 16:09:01 +0000194 <extraclasspaths>
fabbott@google.com25305472009-06-10 21:39:00 +0000195 <path refid="test.extraclasspath" />
fabbott@google.com0e2dc6282008-08-22 16:09:01 +0000196 </extraclasspaths>
197 </gwt.junit>
198 </target>
zundel@google.com29666c82008-06-04 16:07:53 +0000199
jat@google.combf79ddb2009-10-14 07:44:30 +0000200 <target name="test.dev.remote"
jlabanca@google.com66eac842009-10-14 19:48:54 +0000201 depends="compile, compile.tests"
jat@google.com57b69402009-10-14 18:08:29 +0000202 description="Run dev-mode tests with remote browsers"
jlabanca@google.comf780b7a2009-10-16 16:36:03 +0000203 if="gwt.hosts.dev.remote"
204 unless="test.dev.remote.disable">
jat@google.combf79ddb2009-10-14 07:44:30 +0000205 <echo message="Performing dev-mode remote testing at ${gwt.remote.browsers}" />
jlabanca@google.com4c4d76d2009-11-01 16:30:34 +0000206 <property name="test.dev.remote.args" value="${test.args.dev.remote}" />
jat@google.com57b69402009-10-14 18:08:29 +0000207 <fileset id="test.dev.remote.tests" dir="${javac.junit.out}"
208 includes="${gwt.junit.testcase.dev.includes}"
209 excludes="${gwt.junit.testcase.dev.excludes}" />
jlabanca@google.com2707b142009-11-04 17:47:36 +0000210 <gwt.junit test.name="test.dev.remote"
kjin@google.combdabce32010-09-08 22:25:08 +0000211 test.args="${test.dev.remote.args}"
212 test.jvmargs="${test.jvmargs}"
jat@google.com57b69402009-10-14 18:08:29 +0000213 test.out="${junit.out}/dev-remote" test.cases="test.dev.remote.tests" >
fabbott@google.com0e2dc6282008-08-22 16:09:01 +0000214 <extraclasspaths>
fabbott@google.com25305472009-06-10 21:39:00 +0000215 <path refid="test.extraclasspath" />
fabbott@google.com0e2dc6282008-08-22 16:09:01 +0000216 </extraclasspaths>
217 </gwt.junit>
218 </target>
gwt.team.mmendez99f280b2006-12-08 23:11:29 +0000219
jat@google.combf79ddb2009-10-14 07:44:30 +0000220 <target name="test.emma.remote"
jlabanca@google.com66eac842009-10-14 19:48:54 +0000221 depends="compile, compile.tests"
jat@google.com57b69402009-10-14 18:08:29 +0000222 description="Run emma tests with remote browsers"
jlabanca@google.comf780b7a2009-10-16 16:36:03 +0000223 if="gwt.hosts.dev.remote"
224 unless="test.emma.remote.disable">
jat@google.combf79ddb2009-10-14 07:44:30 +0000225 <echo message="Performing emma remote testing at ${gwt.hosts.dev.remote}" />
jlabanca@google.com4c4d76d2009-11-01 16:30:34 +0000226 <property name="test.emma.remote.args" value="${test.args.dev.remote}" />
jat@google.com57b69402009-10-14 18:08:29 +0000227 <fileset id="test.emma.remote.tests" dir="${javac.junit.out}"
jlabanca@google.com66eac842009-10-14 19:48:54 +0000228 includes="${gwt.junit.testcase.dev.includes}"
229 excludes="${gwt.junit.testcase.dev.excludes}" />
jlabanca@google.com2707b142009-11-04 17:47:36 +0000230 <gwt.junit test.name="test.emma.remote"
kjin@google.combdabce32010-09-08 22:25:08 +0000231 test.args="${test.emma.remote.args}"
232 test.jvmargs="${test.jvmargs}"
jat@google.com57b69402009-10-14 18:08:29 +0000233 test.out="${junit.out}/emma-remote"
234 test.cases="test.emma.remote.tests" >
jgw@google.coma3509e22009-02-06 21:06:24 +0000235 <extraclasspaths>
fabbott@google.com25305472009-06-10 21:39:00 +0000236 <path refid="test.extraclasspath" />
jgw@google.coma3509e22009-02-06 21:06:24 +0000237 <pathelement location="${gwt.tools.redist}/emma/emma.jar" />
238 </extraclasspaths>
239 </gwt.junit>
240 </target>
241
jat@google.combf79ddb2009-10-14 07:44:30 +0000242 <target name="test.emma.selenium"
jlabanca@google.com66eac842009-10-14 19:48:54 +0000243 depends="compile, compile.tests"
jat@google.com57b69402009-10-14 18:08:29 +0000244 description="Run emma tests with Selenium-RC servers"
jlabanca@google.comf780b7a2009-10-16 16:36:03 +0000245 if="gwt.hosts.dev.selenium"
246 unless="test.emma.selenium.disable">
jat@google.combf79ddb2009-10-14 07:44:30 +0000247 <echo message="Performing emma selenium testing at ${gwt.hosts.dev.selenium}" />
jlabanca@google.com4c4d76d2009-11-01 16:30:34 +0000248 <property name="test.emma.selenium.args" value="${test.args.dev.selenium}" />
jat@google.com57b69402009-10-14 18:08:29 +0000249 <fileset id="test.emma.selenium.tests" dir="${javac.junit.out}"
jlabanca@google.com66eac842009-10-14 19:48:54 +0000250 includes="${gwt.junit.testcase.dev.includes}"
251 excludes="${gwt.junit.testcase.dev.excludes}" />
jlabanca@google.com2707b142009-11-04 17:47:36 +0000252 <gwt.junit test.name="test.emma.selenium"
kjin@google.combdabce32010-09-08 22:25:08 +0000253 test.args='${test.emma.selenium.args}'
254 test.jvmargs="${test.jvmargs}"
jat@google.com57b69402009-10-14 18:08:29 +0000255 test.out="${junit.out}/emma-selenium"
256 test.cases="test.emma.selenium.tests" >
jat@google.combf79ddb2009-10-14 07:44:30 +0000257 <extraclasspaths>
258 <path refid="test.extraclasspath" />
259 <pathelement location="${gwt.tools.redist}/emma/emma.jar" />
260 </extraclasspaths>
261 </gwt.junit>
262 </target>
263
264 <target name="test.draft.remote"
265 depends="compile, compile.tests"
jat@google.com57b69402009-10-14 18:08:29 +0000266 description="Run draft compiled tests with remote browsers"
jlabanca@google.comf780b7a2009-10-16 16:36:03 +0000267 if="gwt.hosts.web.remote"
268 unless="test.draft.remote.disable">
jat@google.combf79ddb2009-10-14 07:44:30 +0000269 <echo message="Performing draft remote testing at ${gwt.hosts.web.remote}" />
kjin@google.combdabce32010-09-08 22:25:08 +0000270 <property name="test.draft.remote.args" value="${test.args.web.remote} -draftCompile" />
jat@google.com57b69402009-10-14 18:08:29 +0000271 <fileset id="test.draft.remote.tests" dir="${javac.junit.out}"
272 includes="${gwt.junit.testcase.web.includes}"
273 excludes="${gwt.junit.testcase.web.excludes}" />
jlabanca@google.com2707b142009-11-04 17:47:36 +0000274 <gwt.junit test.name="test.draft.remote"
kjin@google.combdabce32010-09-08 22:25:08 +0000275 test.args="${test.draft.remote.args}"
276 test.jvmargs="${test.jvmargs}"
jlabanca@google.com4c4d76d2009-11-01 16:30:34 +0000277 test.out="${junit.out}/draft-remote"
278 test.cases="test.draft.remote.tests" >
fabbott@google.com0e2dc6282008-08-22 16:09:01 +0000279 <extraclasspaths>
fabbott@google.com25305472009-06-10 21:39:00 +0000280 <path refid="test.extraclasspath" />
fabbott@google.com0e2dc6282008-08-22 16:09:01 +0000281 </extraclasspaths>
282 </gwt.junit>
spoon@google.comd0b00f82009-03-27 14:58:53 +0000283 </target>
284
jat@google.combf79ddb2009-10-14 07:44:30 +0000285 <target name="test.nometa.remote"
jat@google.com57b69402009-10-14 18:08:29 +0000286 description="Run -XdisableClassMetadata tests with remote browsers"
jlabanca@google.comf780b7a2009-10-16 16:36:03 +0000287 if="gwt.hosts.web.remote"
288 unless="test.nometa.remote.disable">
jat@google.combf79ddb2009-10-14 07:44:30 +0000289 <echo message="Performing nometa remote testing at ${gwt.hosts.web.remote}" />
kjin@google.combdabce32010-09-08 22:25:08 +0000290 <property name="test.nometa.remote.args" value="${test.args.web.remote} -XdisableClassMetadata" />
jat@google.com3d3977f2009-10-16 04:52:05 +0000291 <fileset id="test.nometa.remote.tests" dir="${javac.junit.out}"
jat@google.com57b69402009-10-14 18:08:29 +0000292 includes="${gwt.junit.testcase.web.includes}"
293 excludes="${gwt.junit.testcase.web.excludes}" />
jlabanca@google.com2707b142009-11-04 17:47:36 +0000294 <gwt.junit test.name="test.nometa.remote"
kjin@google.combdabce32010-09-08 22:25:08 +0000295 test.args="${test.nometa.remote.args}"
296 test.jvmargs="${test.jvmargs}"
jlabanca@google.com4c4d76d2009-11-01 16:30:34 +0000297 test.out="${junit.out}/nometa-remote"
298 test.cases="test.nometa.remote.tests" >
jat@google.combf79ddb2009-10-14 07:44:30 +0000299 <extraclasspaths>
300 <path refid="test.extraclasspath" />
301 </extraclasspaths>
302 </gwt.junit>
303 </target>
304
305 <target name="test.selenium" depends="test.web.selenium">
306 <echo message="DEPRECATED: test.selenium has been renamed test.web.selenium"/>
307 </target>
308
309 <target name="test.web.selenium"
310 depends="compile, compile.tests"
311 description="Run web tests using Selenium RC"
jlabanca@google.comf780b7a2009-10-16 16:36:03 +0000312 if="gwt.hosts.web.selenium"
313 unless="test.web.selenium.disable">
jat@google.combf79ddb2009-10-14 07:44:30 +0000314 <echo message="Performing web testing using Selenium RC at ${gwt.hosts.web.selenium}" />
jlabanca@google.com4c4d76d2009-11-01 16:30:34 +0000315 <property name="test.web.selenium.args" value="${test.args.web.selenium}" />
jat@google.com57b69402009-10-14 18:08:29 +0000316 <fileset id="test.web.selenium.tests" dir="${javac.junit.out}"
317 includes="${gwt.junit.testcase.web.includes}"
318 excludes="${gwt.junit.testcase.web.excludes}" />
jlabanca@google.com2707b142009-11-04 17:47:36 +0000319 <gwt.junit test.name="test.web.selenium"
kjin@google.combdabce32010-09-08 22:25:08 +0000320 test.args='${test.web.selenium.args}'
321 test.jvmargs="${test.jvmargs}"
jat@google.com57b69402009-10-14 18:08:29 +0000322 test.out="${junit.out}/web-selenium"
323 test.cases="test.web.selenium.tests" >
jat@google.combf79ddb2009-10-14 07:44:30 +0000324 <extraclasspaths>
325 <path refid="test.extraclasspath" />
326 </extraclasspaths>
327 </gwt.junit>
328 </target>
329
330 <target name="test.dev.selenium"
jlabanca@google.com66eac842009-10-14 19:48:54 +0000331 depends="compile, compile.tests"
jat@google.com57b69402009-10-14 18:08:29 +0000332 description="Run dev-mode tests using Selenium RC servers"
jlabanca@google.comf780b7a2009-10-16 16:36:03 +0000333 if="gwt.hosts.dev.selenium"
334 unless="test.dev.selenium.disable">
jat@google.combf79ddb2009-10-14 07:44:30 +0000335 <echo message="Performing dev-mode testing using Selenium RC at ${gwt.hosts.dev.selenium}" />
jlabanca@google.com4c4d76d2009-11-01 16:30:34 +0000336 <property name="test.dev.selenium.args" value="${test.args.dev.selenium}" />
jat@google.com57b69402009-10-14 18:08:29 +0000337 <fileset id="test.dev.selenium.tests" dir="${javac.junit.out}"
338 includes="${gwt.junit.testcase.dev.includes}"
339 excludes="${gwt.junit.testcase.dev.excludes}" />
jlabanca@google.com2707b142009-11-04 17:47:36 +0000340 <gwt.junit test.name="test.dev.selenium"
kjin@google.combdabce32010-09-08 22:25:08 +0000341 test.args='${test.dev.selenium.args}'
342 test.jvmargs="${test.jvmargs}"
jat@google.com57b69402009-10-14 18:08:29 +0000343 test.out="${junit.out}/dev-selenium"
344 test.cases="test.dev.selenium.tests" >
jat@google.combf79ddb2009-10-14 07:44:30 +0000345 <extraclasspaths>
346 <path refid="test.extraclasspath" />
347 </extraclasspaths>
348 </gwt.junit>
349 </target>
350
351 <target name="test.nometa.selenium"
352 description="Run nometa tests using Selenium RC"
jlabanca@google.comf780b7a2009-10-16 16:36:03 +0000353 if="gwt.hosts.web.selenium"
354 unless="test.nometa.selenium.disable">
jat@google.combf79ddb2009-10-14 07:44:30 +0000355 <echo message="Performing nometa testing using Selenium RC at ${gwt.hosts.web.selenium}" />
jlabanca@google.com4c4d76d2009-11-01 16:30:34 +0000356 <property name="test.nometa.selenium.args"
kjin@google.combdabce32010-09-08 22:25:08 +0000357 value="${test.args.web.selenium} -XdisableClassMetadata" />
jat@google.com57b69402009-10-14 18:08:29 +0000358 <fileset id="test.nometa.selenium.tests" dir="${javac.junit.out}"
359 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.selenium"
kjin@google.combdabce32010-09-08 22:25:08 +0000362 test.args='${test.nometa.selenium.args}'
363 test.jvmargs="${test.jvmargs}"
jat@google.com57b69402009-10-14 18:08:29 +0000364 test.out="${junit.out}/nometa-selenium"
365 test.cases="test.nometa.selenium.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.draft.selenium"
jat@google.com57b69402009-10-14 18:08:29 +0000373 description="Run draft compiled tests using Selenium RC"
jlabanca@google.comf780b7a2009-10-16 16:36:03 +0000374 if="gwt.hosts.web.selenium"
375 unless="test.draft.selenium.disable">
jat@google.combf79ddb2009-10-14 07:44:30 +0000376 <echo message="Performing draft testing using Selenium RC at ${gwt.hosts.web.selenium}" />
jlabanca@google.com4c4d76d2009-11-01 16:30:34 +0000377 <property name="test.draft.selenium.args"
kjin@google.combdabce32010-09-08 22:25:08 +0000378 value="${test.args.web.selenium} -draftCompile" />
jat@google.com57b69402009-10-14 18:08:29 +0000379 <fileset id="test.draft.selenium.tests" dir="${javac.junit.out}"
380 includes="${gwt.junit.testcase.web.includes}"
381 excludes="${gwt.junit.testcase.web.excludes}" />
jlabanca@google.com2707b142009-11-04 17:47:36 +0000382 <gwt.junit test.name="test.draft.selenium"
kjin@google.combdabce32010-09-08 22:25:08 +0000383 test.args='${test.draft.selenium.args}'
384 test.jvmargs="${test.jvmargs}"
jat@google.com57b69402009-10-14 18:08:29 +0000385 test.out="${junit.out}/draft-selenium"
386 test.cases="test.draft.selenium.tests" >
jat@google.combf79ddb2009-10-14 07:44:30 +0000387 <extraclasspaths>
388 <path refid="test.extraclasspath" />
389 </extraclasspaths>
390 </gwt.junit>
391 </target>
392
393 <target name="test.emma.htmlunit"
394 depends="compile, compile.tests"
jlabanca@google.comf780b7a2009-10-16 16:36:03 +0000395 description="Run emma tests with HtmlUnit"
396 unless="test.emma.htmlunit.disable">
jat@google.com57b69402009-10-14 18:08:29 +0000397 <fileset id="test.emma.htmlunit.tests" dir="${javac.junit.out}"
jlabanca@google.com66eac842009-10-14 19:48:54 +0000398 includes="${gwt.junit.testcase.dev.includes}"
399 excludes="${gwt.junit.testcase.dev.excludes}" />
jlabanca@google.comffb28bb2010-01-25 16:52:17 +0000400 <gwt.junit test.name="test.emma.htmlunit"
401 test.args="${test.args} -standardsMode "
kjin@google.combdabce32010-09-08 22:25:08 +0000402 test.jvmargs="${test.jvmargs}"
jat@google.com57b69402009-10-14 18:08:29 +0000403 test.out="${junit.out}/emma-htmlunit"
404 test.cases="test.emma.htmlunit.tests" >
jat@google.combf79ddb2009-10-14 07:44:30 +0000405 <extraclasspaths>
406 <path refid="test.extraclasspath" />
407 <pathelement location="${gwt.tools.redist}/emma/emma.jar" />
408 </extraclasspaths>
409 </gwt.junit>
410 </target>
411
412 <target name="test.dev.htmlunit"
jlabanca@google.com66eac842009-10-14 19:48:54 +0000413 depends="compile, compile.tests"
jlabanca@google.comf780b7a2009-10-16 16:36:03 +0000414 description="Run dev-mode tests with HtmlUnit."
415 unless="test.dev.htmlunit.disable">
jat@google.com57b69402009-10-14 18:08:29 +0000416 <fileset id="test.dev.htmlunit.tests" dir="${javac.junit.out}"
417 includes="${gwt.junit.testcase.dev.includes}"
418 excludes="${gwt.junit.testcase.dev.excludes}" />
jlabanca@google.comffb28bb2010-01-25 16:52:17 +0000419 <gwt.junit test.name="test.dev.htmlunit"
420 test.args="${test.args} -standardsMode "
kjin@google.combdabce32010-09-08 22:25:08 +0000421 test.jvmargs="${test.jvmargs}"
jlabanca@google.com2707b142009-11-04 17:47:36 +0000422 test.out="${junit.out}/dev-htmlunit"
jat@google.com57b69402009-10-14 18:08:29 +0000423 test.cases="test.dev.htmlunit.tests" >
jat@google.combf79ddb2009-10-14 07:44:30 +0000424 <extraclasspaths>
425 <path refid="test.extraclasspath" />
426 </extraclasspaths>
427 </gwt.junit>
428 </target>
429
430 <target name="test.hosted.emma" depends="test.emma">
431 <echo message="DEPRECATED: test.hosted.emma has been renamed test.emma"/>
432 </target>
433
434 <target name="test.hosted" depends="test.dev">
435 <echo message="DEPRECATED: test.hosted has been renamed test.dev"/>
436 </target>
437
jat@google.combf79ddb2009-10-14 07:44:30 +0000438 <target name="test.web.htmlunit"
439 depends="compile, compile.tests"
jlabanca@google.comf780b7a2009-10-16 16:36:03 +0000440 description="Run web-mode tests with HtmlUnit."
441 unless="test.web.htmlunit.disable">
jat@google.com57b69402009-10-14 18:08:29 +0000442 <fileset id="test.web.htmlunit.tests" dir="${javac.junit.out}"
443 includes="${gwt.junit.testcase.web.includes}"
444 excludes="${gwt.junit.testcase.web.excludes}" />
jlabanca@google.com2707b142009-11-04 17:47:36 +0000445 <gwt.junit test.name="test.web.htmlunit"
jlabanca@google.comffb28bb2010-01-25 16:52:17 +0000446 test.args="${test.args} -out www -prod -standardsMode"
kjin@google.combdabce32010-09-08 22:25:08 +0000447 test.jvmargs="${test.jvmargs}"
jat@google.com57b69402009-10-14 18:08:29 +0000448 test.out="${junit.out}/web-htmlunit"
449 test.cases="test.web.htmlunit.tests">
fabbott@google.com0e2dc6282008-08-22 16:09:01 +0000450 <extraclasspaths>
fabbott@google.com25305472009-06-10 21:39:00 +0000451 <path refid="test.extraclasspath" />
fabbott@google.com0e2dc6282008-08-22 16:09:01 +0000452 </extraclasspaths>
453 </gwt.junit>
454 </target>
gwt.team.scottb5b5e6342007-02-22 21:34:23 +0000455
jat@google.combf79ddb2009-10-14 07:44:30 +0000456 <target name="test.nometa.htmlunit"
457 depends="compile, compile.tests"
jlabanca@google.comf780b7a2009-10-16 16:36:03 +0000458 description="Run -XdisableClassMetadata tests with HtmlUnit."
459 unless="test.nometa.htmlunit.disable">
jat@google.com57b69402009-10-14 18:08:29 +0000460 <fileset id="test.nometa.htmlunit.tests" dir="${javac.junit.out}"
461 includes="${gwt.junit.testcase.web.includes}"
462 excludes="${gwt.junit.testcase.web.excludes}" />
jlabanca@google.com2707b142009-11-04 17:47:36 +0000463 <gwt.junit test.name="test.nometa.htmlunit"
jlabanca@google.comffb28bb2010-01-25 16:52:17 +0000464 test.args="${test.args} -XdisableClassMetadata -out www -prod -standardsMode"
kjin@google.combdabce32010-09-08 22:25:08 +0000465 test.jvmargs="${test.jvmargs}"
jat@google.com57b69402009-10-14 18:08:29 +0000466 test.out="${junit.out}/nometa-htmlunit"
467 test.cases="test.nometa.htmlunit.tests" >
bobv@google.comc0e308f2009-02-19 01:08:17 +0000468 <extraclasspaths>
fabbott@google.com25305472009-06-10 21:39:00 +0000469 <path refid="test.extraclasspath" />
bobv@google.comc0e308f2009-02-19 01:08:17 +0000470 </extraclasspaths>
471 </gwt.junit>
472 </target>
473
jat@google.combf79ddb2009-10-14 07:44:30 +0000474 <target name="test.draft.htmlunit"
475 depends="compile, compile.tests"
jlabanca@google.comf780b7a2009-10-16 16:36:03 +0000476 description="Run draft compiled HtmlUnit tests (no batching on purpose)"
477 unless="test.draft.htmlunit.disable">
jat@google.com57b69402009-10-14 18:08:29 +0000478 <fileset id="test.draft.htmlunit.tests" dir="${javac.junit.out}"
479 includes="${gwt.junit.testcase.web.includes}"
480 excludes="${gwt.junit.testcase.web.excludes}" />
jlabanca@google.com2707b142009-11-04 17:47:36 +0000481 <gwt.junit test.name="test.draft.htmlunit"
jlabanca@google.comffb28bb2010-01-25 16:52:17 +0000482 test.args="${test.args} -draftCompile -out www -prod -standardsMode"
kjin@google.combdabce32010-09-08 22:25:08 +0000483 test.jvmargs="${test.jvmargs}"
jat@google.com57b69402009-10-14 18:08:29 +0000484 test.out="${junit.out}/draft-htmlunit"
485 test.cases="test.draft.htmlunit.tests" >
bobv@google.com62773b12009-01-29 22:31:44 +0000486 <extraclasspaths>
fabbott@google.com25305472009-06-10 21:39:00 +0000487 <path refid="test.extraclasspath" />
bobv@google.com62773b12009-01-29 22:31:44 +0000488 </extraclasspaths>
489 </gwt.junit>
490 </target>
491
jat@google.combf79ddb2009-10-14 07:44:30 +0000492 <target name="test"
493 depends="compile, compile.tests"
jat@google.com57b69402009-10-14 18:08:29 +0000494 description="Run all tests for this project.">
jlabanca@google.comf780b7a2009-10-16 16:36:03 +0000495 <!-- Prevent compilation for every target. -->
496 <property name="compile.complete" value="true"/>
497 <property name="compile.tests.complete" value="true"/>
498
jat@google.com57b69402009-10-14 18:08:29 +0000499 <property.ensure name="distro.built" location="${gwt.dev.staging.jar}"
500 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 +0000501 <limit failonerror="true" hours="${test.timeout}">
jlabanca@google.com481db2d2009-10-19 17:28:15 +0000502 <parallel threadsPerProcessor="${gwt.threadsPerProcessor}"
503 threadCount="${gwt.threadCount}">
jlabanca@google.comf780b7a2009-10-16 16:36:03 +0000504 <!--
505 The remote targets must be run sequentially or BrowserManager will queue
506 requests, which will cause some tests to timeout while waiting.
507 -->
508 <sequential>
509 <antcall target="test.dev.remote"/>
510 <antcall target="test.emma.remote"/>
511 <antcall target="test.web.remote"/>
512 <antcall target="test.draft.remote"/>
513 <antcall target="test.nometa.remote"/>
514 </sequential>
515 <antcall target="test.dev.selenium"/>
516 <antcall target="test.emma.selenium"/>
517 <antcall target="test.web.selenium"/>
518 <antcall target="test.draft.selenium"/>
519 <antcall target="test.nometa.selenium"/>
amitmanjhi@google.coma7c82b02010-03-25 14:19:13 +0000520 <antcall target="test.dev.htmlunit"/>
521 <antcall target="test.emma.htmlunit"/>
522 <antcall target="test.web.htmlunit"/>
523 <antcall target="test.draft.htmlunit"/>
524 <antcall target="test.nometa.htmlunit"/>
jlabanca@google.comf780b7a2009-10-16 16:36:03 +0000525 </parallel>
fabbott@google.com0e2dc6282008-08-22 16:09:01 +0000526 </limit>
527 </target>
gwt.team.scottb14c5b9d2006-12-10 06:06:08 +0000528
jat@google.com57b69402009-10-14 18:08:29 +0000529 <target name="test.htmlunit"
530 depends="compile, compile.tests"
531 description="Run all HtmlUnit tests">
jlabanca@google.com4af13062009-10-23 23:28:56 +0000532 <!-- Prevent compilation for every target. -->
533 <property name="compile.complete" value="true"/>
534 <property name="compile.tests.complete" value="true"/>
nchalko@google.com90f14a02010-07-28 19:08:32 +0000535
jat@google.com57b69402009-10-14 18:08:29 +0000536 <property.ensure name="distro.built" location="${gwt.dev.staging.jar}"
537 message="GWT must be built before performing any tests. This can be fixed by running ant in the ${gwt.root} directory." />
538 <limit failonerror="true" hours="${test.timeout}">
jlabanca@google.com481db2d2009-10-19 17:28:15 +0000539 <parallel threadsPerProcessor="${gwt.threadsPerProcessor}"
540 threadCount="${gwt.threadCount}">
jat@google.com57b69402009-10-14 18:08:29 +0000541 <antcall target="test.dev.htmlunit"/>
542 <antcall target="test.emma.htmlunit"/>
543 <antcall target="test.web.htmlunit"/>
544 <antcall target="test.draft.htmlunit"/>
545 <antcall target="test.nometa.htmlunit"/>
jat@google.com57b69402009-10-14 18:08:29 +0000546 </parallel>
547 </limit>
548 </target>
549
jat@google.combf79ddb2009-10-14 07:44:30 +0000550 <target name="test.dev"
551 depends="compile, compile.tests"
552 description="Run dev-mode tests for this project.">
jlabanca@google.com4af13062009-10-23 23:28:56 +0000553 <!-- Prevent compilation for every target. -->
554 <property name="compile.complete" value="true"/>
555 <property name="compile.tests.complete" value="true"/>
556
jat@google.combf79ddb2009-10-14 07:44:30 +0000557 <limit failonerror="true" hours="${test.timeout}">
jlabanca@google.com481db2d2009-10-19 17:28:15 +0000558 <parallel threadsPerProcessor="${gwt.threadsPerProcessor}"
559 threadCount="${gwt.threadCount}">
jat@google.combf79ddb2009-10-14 07:44:30 +0000560 <antcall target="test.dev.htmlunit"/>
jat@google.combf79ddb2009-10-14 07:44:30 +0000561 <!-- no-op unless gwt.hosts.dev.remote is defined -->
562 <antcall target="test.dev.remote"/>
563 <!-- no-op unless gwt.hosts.dev.selenium is defined -->
564 <antcall target="test.dev.selenium"/>
565 </parallel>
566 </limit>
567 </target>
568
569 <target name="test.web"
570 depends="compile, compile.tests"
jat@google.com57b69402009-10-14 18:08:29 +0000571 description="Run web-mode tests for this project.">
jlabanca@google.com4af13062009-10-23 23:28:56 +0000572 <!-- Prevent compilation for every target. -->
573 <property name="compile.complete" value="true"/>
574 <property name="compile.tests.complete" value="true"/>
575
jat@google.combf79ddb2009-10-14 07:44:30 +0000576 <limit failonerror="true" hours="${test.timeout}">
jlabanca@google.com481db2d2009-10-19 17:28:15 +0000577 <parallel threadsPerProcessor="${gwt.threadsPerProcessor}"
578 threadCount="${gwt.threadCount}">
jat@google.combf79ddb2009-10-14 07:44:30 +0000579 <antcall target="test.web.htmlunit"/>
jat@google.combf79ddb2009-10-14 07:44:30 +0000580 <!-- no-op unless gwt.hosts.web.remote is defined -->
581 <antcall target="test.web.remote"/>
582 <!-- no-op unless gwt.hosts.web.selenium is defined -->
583 <antcall target="test.web.selenium"/>
584 </parallel>
585 </limit>
586 </target>
587
588 <target name="test.emma"
589 depends="compile, compile.tests"
jat@google.com57b69402009-10-14 18:08:29 +0000590 description="Run emma tests for this project.">
jlabanca@google.com4af13062009-10-23 23:28:56 +0000591 <!-- Prevent compilation for every target. -->
592 <property name="compile.complete" value="true"/>
593 <property name="compile.tests.complete" value="true"/>
594
jat@google.combf79ddb2009-10-14 07:44:30 +0000595 <limit failonerror="true" hours="${test.timeout}">
jlabanca@google.com481db2d2009-10-19 17:28:15 +0000596 <parallel threadsPerProcessor="${gwt.threadsPerProcessor}"
597 threadCount="${gwt.threadCount}">
jat@google.combf79ddb2009-10-14 07:44:30 +0000598 <antcall target="test.emma.htmlunit"/>
jat@google.combf79ddb2009-10-14 07:44:30 +0000599 <!-- no-op unless gwt.hosts.dev.remote is defined -->
600 <antcall target="test.emma.remote"/>
601 <!-- no-op unless gwt.hosts.dev.selenium is defined -->
602 <antcall target="test.emma.selenium"/>
603 </parallel>
604 </limit>
605 </target>
606
607 <target name="test.draft"
608 depends="compile, compile.tests"
jat@google.com57b69402009-10-14 18:08:29 +0000609 description="Run draft compiled tests for this project.">
jlabanca@google.com4af13062009-10-23 23:28:56 +0000610 <!-- Prevent compilation for every target. -->
611 <property name="compile.complete" value="true"/>
612 <property name="compile.tests.complete" value="true"/>
613
jat@google.combf79ddb2009-10-14 07:44:30 +0000614 <limit failonerror="true" hours="${test.timeout}">
jlabanca@google.com481db2d2009-10-19 17:28:15 +0000615 <parallel threadsPerProcessor="${gwt.threadsPerProcessor}"
616 threadCount="${gwt.threadCount}">
jat@google.combf79ddb2009-10-14 07:44:30 +0000617 <antcall target="test.draft.htmlunit"/>
jat@google.combf79ddb2009-10-14 07:44:30 +0000618 <!-- no-op unless gwt.hosts.web.remote is defined -->
619 <antcall target="test.draft.remote"/>
620 <!-- no-op unless gwt.hosts.web.selenium is defined -->
621 <antcall target="test.draft.selenium"/>
622 </parallel>
623 </limit>
624 </target>
625
626 <target name="test.nometa"
627 depends="compile, compile.tests"
jat@google.com57b69402009-10-14 18:08:29 +0000628 description="Run -XdisableClassMetadata tests for this project.">
jlabanca@google.com4af13062009-10-23 23:28:56 +0000629 <!-- Prevent compilation for every target. -->
630 <property name="compile.complete" value="true"/>
631 <property name="compile.tests.complete" value="true"/>
632
jat@google.combf79ddb2009-10-14 07:44:30 +0000633 <limit failonerror="true" hours="${test.timeout}">
jlabanca@google.com481db2d2009-10-19 17:28:15 +0000634 <parallel threadsPerProcessor="${gwt.threadsPerProcessor}"
635 threadCount="${gwt.threadCount}">
jat@google.combf79ddb2009-10-14 07:44:30 +0000636 <antcall target="test.web.htmlunit"/>
jat@google.combf79ddb2009-10-14 07:44:30 +0000637 <!-- no-op unless gwt.hosts.web.remote is defined -->
638 <antcall target="test.nometa.remote"/>
639 <!-- no-op unless gwt.hosts.web.selenium is defined -->
640 <antcall target="test.nometa.selenium"/>
641 </parallel>
642 </limit>
643 </target>
nchalko@google.comad61f1d2011-01-17 17:08:08 +0000644
645
646 <!-- Validation TCK test and reports -->
647
648 <!-- TODO(nchalko) move the tck target to user/build.xml and then delete
649 all of samples/validaitontck -->
650 <target name="tck"
651 depends="tck.run,tck.report"
652 description="Run all tests for this project.">
653 <fail
654 message="One or more junit tests failed for target: @{test.name} @{test.args}"
655 if="junit.failure" status="2" />
656 </target>
jat@google.combf79ddb2009-10-14 07:44:30 +0000657
nchalko@google.comad61f1d2011-01-17 17:08:08 +0000658 <target name="tck.run"
659 depends="compile, compile.tests"
660 description="Run all tests for this project.">
661 <!-- Prevent compilation for every target. -->
662 <property name="compile.complete" value="true"/>
663 <property name="compile.tests.complete" value="true"/>
664
665 <property.ensure name="distro.built" location="${gwt.dev.staging.jar}"
666 message="GWT must be built before performing any tests. This can be fixed by running ant in the ${gwt.root} directory." />
667 <limit failonerror="true" hours="${test.timeout}">
668
669 <antcall target="tck.dev.htmlunit"/>
670 </limit>
671
672 <fail
673 message="One or more tck tests failed for target: @{test.name} @{test.args}"
674 if="junit.failure" status="2" />
675 </target>
676
677 <macrodef name="countMarkedTests">
678 <attribute name="annotation" default="NOT SET" />
679 <attribute name="outputproperty" default="jsr303.marked.@{annotation}" />
680 <sequential>
681
682 </sequential>
683 </macrodef>
684
685 <target name="tck.report">
686 <mkdir dir="${junit.out}/tck-report" />
687 <mkdir dir="${junit.out}/tck-report/text" />
688
689 <scan>
690 <fileset dir="test/org/hibernate/jsr303/tck/tests" id="id"/>
691 <filterchain>
692 <countfilter match="@Failing" property="jsr303.marked.Failing" init="0"/>
693 <countfilter match="@NonTckTest" property="jsr303.marked.NonTckTest" init="0"/>
694 <countfilter match="@NotSupported" property="jsr303.marked.NotSupported" init="0"/>
nchalko@google.com4c81c392011-01-17 23:51:59 +0000695 <countfilter match="@TestNotCompatible" property="jsr303.marked.NotSupported" init="0"/>
nchalko@google.comad61f1d2011-01-17 17:08:08 +0000696 </filterchain>
697 </scan>
698
699 <!-- force to zero if not set above -->
700 <property name="jsr303.marked.Failing" value="0"/>
701 <property name="jsr303.marked.NonTckTest" value="0"/>
nchalko@google.com4c81c392011-01-17 23:51:59 +0000702 <property name="jsr303.marked.TestNotCompatible" value="0"/>
nchalko@google.comad61f1d2011-01-17 17:08:08 +0000703
704 <echo message="Marked Failing = ${jsr303.marked.Failing}" />
705 <echo message="Marked NonTckTest = ${jsr303.marked.NonTckTest}" />
706 <echo message="Marked NotSupported = ${jsr303.marked.NotSupported}" />
nchalko@google.com4c81c392011-01-17 23:51:59 +0000707 <echo message="Marked TestNotCompatible = ${jsr303.marked.TestNotCompatible}" />
nchalko@google.comad61f1d2011-01-17 17:08:08 +0000708
709 <junitreport todir="${junit.out}/tck-report">
710 <fileset dir="${junit.out}/tck-dev-htmlunit">
711 <include name="reports/TEST-*.xml" />
712 </fileset>
713 <report format="noframes" todir="${junit.out}/tck-report" styledir="style/html">
714 <param name="markedFailing" expression="${jsr303.marked.Failing}" />
715 <param name="markedNonTckTest" expression="${jsr303.marked.NonTckTest}" />
716 <param name="markedNotSupported" expression="${jsr303.marked.NotSupported}" />
nchalko@google.com4c81c392011-01-17 23:51:59 +0000717 <param name="markedTestNotCompatible" expression="${jsr303.marked.TestNotCompatible}" />
nchalko@google.comad61f1d2011-01-17 17:08:08 +0000718 </report>
719 <report format="noframes" todir="${junit.out}/tck-report/text" styledir="style/text">
720 <param name="markedFailing" expression="${jsr303.marked.Failing}" />
721 <param name="markedNonTckTest" expression="${jsr303.marked.NonTckTest}" />
722 <param name="markedNotSupported" expression="${jsr303.marked.NotSupported}" />
nchalko@google.com4c81c392011-01-17 23:51:59 +0000723 <param name="markedTestNotCompatible" expression="${jsr303.marked.TestNotCompatible}" />
nchalko@google.comad61f1d2011-01-17 17:08:08 +0000724 </report>
725 </junitreport>
726
727 <concat taskname="JSR 303 TCK Result">
728 <filelist>
729 <file name="${junit.out}/tck-report/text/junit-noframes.html" />
730 </filelist>
731 </concat>
732
733 </target>
734
735 <target name="tck.dev.htmlunit"
736 depends="compile, compile.tests"
737 description="Run dev-mode tests with HtmlUnit."
738 unless="test.dev.htmlunit.disable">
739 <fileset id="tck.dev.htmlunit.tests" dir="${javac.junit.out}"
740 includes="${gwt.tck.testcase.dev.includes}"
741 excludes="${gwt.tck.testcase.dev.excludes}" />
742 <gwt.junit test.name="test.dev.htmlunit"
743 test.args="${test.args} -standardsMode "
744 test.jvmargs="-ea -Dcom.google.gwt.sample.validationtck.util.Failing.include=true -Dcom.google.gwt.sample.validationtck.util.NonTckTest.exclude=true"
745 test.out="${junit.out}/tck-dev-htmlunit"
746 test.cases="tck.dev.htmlunit.tests"
747 haltonfailure="false"
748 >
749 <extraclasspaths>
750 <path refid="test.extraclasspath" />
751 </extraclasspaths>
752 </gwt.junit>
753 </target>
754
gwt.mirrorbot@gmail.comd54a4bd2010-06-07 19:20:31 +0000755 <target name="benchmark"
756 description="Run all benchmarks for this project.">
757
758 <property.ensure name="distro.built" location="${gwt.dev.staging.jar}"
759 message="GWT must be built before performing any tests. This can be fixed by running ant in the ${gwt.root} directory." />
760 <limit failonerror="true" hours="${benchmark.timeout}">
761 <!-- no-op unless gwt.hosts.web.remote is defined -->
762 <antcall target="benchmark.web.remote"/>
763 <!-- no-op unless gwt.hosts.web.selenium is defined -->
764 <antcall target="benchmark.web.selenium"/>
765 <antcall target="benchmark.web.htmlunit"/>
766 </limit>
767 </target>
768
769 <target name="benchmark.web.htmlunit"
770 depends="compile, compile.tests"
771 description="Run web-mode benchmarks with HtmlUnit."
772 unless="benchmark.web.htmlunit.disable">
773 <fileset id="benchmark.web.htmlunit.tests" dir="${javac.junit.out}"
774 includes="${gwt.benchmark.testcase.web.includes}"
775 excludes="${gwt.benchmark.testcase.web.excludes}" />
776 <gwt.junit test.name="benchmark.web.htmlunit"
777 test.args="${test.args} -testMethodTimeout ${benchmark.timeout} -out www -prod -standardsMode"
kjin@google.combdabce32010-09-08 22:25:08 +0000778 test.jvmargs="${test.jvmargs}"
gwt.mirrorbot@gmail.comd54a4bd2010-06-07 19:20:31 +0000779 test.out="${junit.out}/web-htmlunit-benchmark"
780 test.cases="benchmark.web.htmlunit.tests" >
781 <extraclasspaths>
782 <path refid="test.extraclasspath" />
783 </extraclasspaths>
784 </gwt.junit>
785 </target>
786
787 <target name="benchmark.web.selenium"
788 depends="compile, compile.tests"
789 description="Run web benchmark using Selenium RC"
790 if="gwt.hosts.web.selenium"
791 unless="benchmark.web.selenium.disable">
792 <echo message="Performing web benchmarking using Selenium RC at ${gwt.hosts.web.selenium}" />
793 <property name="test.web.selenium.args" value="${test.args.web.selenium}" />
794 <fileset id="benchmark.web.selenium.tests" dir="${javac.junit.out}"
795 includes="${gwt.benchmark.testcase.web.includes}"
796 excludes="${gwt.benchmark.testcase.web.excludes}" />
797 <gwt.junit test.name="benchmark.web.selenium"
kjin@google.combdabce32010-09-08 22:25:08 +0000798 test.args='${test.web.selenium.args} -testMethodTimeout ${benchmark.timeout}'
799 test.jvmargs="${test.jvmargs}"
gwt.mirrorbot@gmail.comd54a4bd2010-06-07 19:20:31 +0000800 test.out="${junit.out}/web-selenium-benchmark"
801 test.cases="benchmark.web.selenium.tests" >
802 <extraclasspaths>
803 <path refid="test.extraclasspath" />
804 </extraclasspaths>
805 </gwt.junit>
806 </target>
807
808 <target name="benchmark.web.remote"
809 depends="compile, compile.tests"
810 description="Run web benchmarks with remote browsers"
811 if="gwt.hosts.web.remote"
812 unless="benchmark.web.remote.disable">
813 <echo message="Performing web remote benchmarking at ${gwt.hosts.web.remote}" />
814 <property name="test.web.remote.args" value="${test.args.web.remote}" />
815 <fileset id="benchmark.web.remote.tests" dir="${javac.junit.out}"
816 includes="${gwt.benchmark.testcase.web.includes}"
817 excludes="${gwt.benchmark.testcase.web.excludes}" />
818 <gwt.junit test.name="benchmark.web.remote"
kjin@google.combdabce32010-09-08 22:25:08 +0000819 test.args="${test.web.remote.args} -testMethodTimeout ${benchmark.timeout}"
820 test.jvmargs="${test.jvmargs}"
gwt.mirrorbot@gmail.comd54a4bd2010-06-07 19:20:31 +0000821 test.out="${junit.out}/web-remote-benchmark"
822 test.cases="benchmark.web.remote.tests" >
823 <extraclasspaths>
824 <path refid="test.extraclasspath" />
825 </extraclasspaths>
826 </gwt.junit>
827 </target>
828
jat@google.com57b69402009-10-14 18:08:29 +0000829 <!--
830 Merges coverage data for the entire project
831 -->
832 <target name="emma.merge">
jlabanca@google.com81244562009-08-05 19:55:36 +0000833 <delete dir="${emma.merged.out}" />
834 <mkdir dir="${emma.merged.out}" />
835 <emma>
836 <merge outfile="${emma.merged.out}/merged.emma" >
837 <fileset dir="${junit.out}" >
838 <include name="**/*.emma" />
839 <exclude name="${emma.merged.out}/merged.emma" />
840 </fileset>
841 </merge>
842 </emma>
843 <emma>
844 <report sourcepath="${project.classpath.src}">
845 <fileset file="${javac.emma.out}/metadata.emma" />
846 <fileset file="${emma.merged.out}/merged.emma" />
847 <txt outfile="${emma.merged.out}/coverage.txt" />
848 <html outfile="${emma.merged.out}/coverage.html" />
849 <xml outfile="${emma.merged.out}/coverage.xml" />
850 </report>
851 </emma>
852 </target>
853
jat@google.combf79ddb2009-10-14 07:44:30 +0000854 <target name="clean"
855 description="Cleans this project's intermediate and output files">
fabbott@google.com0e2dc6282008-08-22 16:09:01 +0000856 <delete dir="${project.build}" />
857 <delete file="${project.lib}" />
858 </target>
jat@google.com57b69402009-10-14 18:08:29 +0000859
860 <target name="presubmit" depends="test, checkstyle"
861 description="runs the gwt api checker, user checkstyle, and user tests">
spoon@google.comd0b00f82009-03-27 14:58:53 +0000862 <gwt.ant dir=".." target="apicheck-nobuild"/>
jgw@google.coma3509e22009-02-06 21:06:24 +0000863 </target>
gwt.team.scottb14c5b9d2006-12-10 06:06:08 +0000864</project>