blob: bb1d8ddab6bccbfc3b7756df949c90d9b265dc62 [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" />
fabbott@google.com0e2dc6282008-08-22 16:09:01 +0000109 <pathelement location="${gwt.dev.jar}" />
110 </classpath>
111 </gwt.javac>
gwt.team.mmendez99f280b2006-12-08 23:11:29 +0000112
fabbott@google.com0e2dc6282008-08-22 16:09:01 +0000113 <!-- Build the BrowserManagerServer_Stub to allow remote browser testing -->
114 <rmic base="${javac.out}"
jat@google.com57b69402009-10-14 18:08:29 +0000115 classname="com.google.gwt.junit.remote.BrowserManagerServer"
116 stubversion="1.2"/>
fabbott@google.com0e2dc6282008-08-22 16:09:01 +0000117 </target>
gwt.team.mmendez99f280b2006-12-08 23:11:29 +0000118
fabbott@google.com0e2dc6282008-08-22 16:09:01 +0000119 <!--
jat@google.comacf97d32009-09-21 22:06:15 +0000120 Compile test code for dev to pick up TypeOracleTestUtils and others.
jat@google.com57b69402009-10-14 18:08:29 +0000121 Compiles test dependencies in dev/core
spoon@google.comd0b00f82009-03-27 14:58:53 +0000122 -->
jat@google.com57b69402009-10-14 18:08:29 +0000123 <target name="compile.dev.tests">
jat@google.comc090a072009-09-21 17:39:53 +0000124 <gwt.ant dir="../dev" target="compile.tests" />
fabbott@google.com0e2dc6282008-08-22 16:09:01 +0000125 </target>
spoon@google.comd0b00f82009-03-27 14:58:53 +0000126
jat@google.com57b69402009-10-14 18:08:29 +0000127 <!--
128 Compiles the test code for this project
129 -->
jat@google.come0fa5b12009-10-13 23:57:19 +0000130 <target name="compile.tests"
jlabanca@google.comf780b7a2009-10-16 16:36:03 +0000131 depends="compile.dev.tests, compile.emma.if.enabled"
132 unless="compile.tests.complete">
fabbott@google.com0e2dc6282008-08-22 16:09:01 +0000133 <mkdir dir="${javac.junit.out}" />
nchalko@google.com00457012011-01-11 22:19:47 +0000134 <gwt.javac srcdir="test" excludes="com/google/gwt/langtest/**" destdir="${javac.junit.out}">
fabbott@google.com0e2dc6282008-08-22 16:09:01 +0000135 <classpath>
136 <pathelement location="${javac.out}" />
fabbott@google.com618aafc2011-03-08 16:22:05 +0000137 <pathelement location="${gwt.tools.lib}/junit/junit-4.8.2.jar" />
fabbott@google.com0e2dc6282008-08-22 16:09:01 +0000138 <pathelement location="${gwt.tools.lib}/selenium/selenium-java-client-driver.jar" />
spoon@google.com11b85e12010-05-28 15:44:36 +0000139 <path refid="test.extraclasspath" />
fabbott@google.com0e2dc6282008-08-22 16:09:01 +0000140 </classpath>
141 </gwt.javac>
142 </target>
gwt.team.scottb14c5b9d2006-12-10 06:06:08 +0000143
jat@google.combf79ddb2009-10-14 07:44:30 +0000144 <target name="build" depends="compile"
145 description="Build and package this project">
fabbott@google.com0e2dc6282008-08-22 16:09:01 +0000146 <mkdir dir="${gwt.build.lib}" />
147 <gwt.jar>
148 <fileset dir="src" excludes="**/package.html" />
149 <fileset dir="super" excludes="**/package.html" />
150 <fileset dir="${javac.out}" />
scottb@google.com171f3f52009-08-11 19:50:31 +0000151 <zipfileset src="${gwt.tools.lib}/tomcat/servlet-api-2.5.jar" excludes="**/*.java"/>
bobv@google.coma933c8b2009-03-26 02:12:25 +0000152 <zipfileset src="${gwt.tools.lib}/w3c/sac/sac-1.3.jar" />
unnurg@google.com48d73ec2011-05-05 15:11:08 +0000153 <zipfileset src="${gwt.tools.lib}/w3c/flute/flute-1.3-gg2.jar" />
fabbott@google.com0e2dc6282008-08-22 16:09:01 +0000154 </gwt.jar>
155 </target>
gwt.team.scottb14c5b9d2006-12-10 06:06:08 +0000156
fabbott@google.com0e2dc6282008-08-22 16:09:01 +0000157 <target name="checkstyle" description="Static analysis of source">
158 <gwt.checkstyle>
nchalko@google.comeb3e87a2010-08-05 20:48:12 +0000159 <fileset dir="src" >
160 <exclude name="javax/validation/super/javax/validation/constraints/Pattern.java"/>
nchalko@google.comb1077dc2010-08-13 13:36:43 +0000161 <exclude name="javax/validation/super/javax/validation/spi/ConfigurationState.java"/>
162 <exclude name="javax/validation/super/javax/validation/MessageInterpolator.java"/>
163 <exclude name="javax/validation/super/javax/validation/Configuration.java"/>
164 <exclude name="javax/validation/super/javax/validation/Validation.java"/>
nchalko@google.com49735242010-10-22 15:52:03 +0000165 <exclude name="org/hibernate/validator/super/org/hibernate/validator/**/*.java"/>
nchalko@google.coma648abd2010-12-20 19:43:41 +0000166 <exclude name="org/hibernate/validator/ValidationMessages.java"/>
nchalko@google.comb1077dc2010-08-13 13:36:43 +0000167 </fileset>
fabbott@google.com0e2dc6282008-08-22 16:09:01 +0000168 <fileset dir="super/com/google/gwt/emul" />
169 <fileset dir="super/com/google/gwt/junit/translatable" />
170 </gwt.checkstyle>
scottb@google.com6de97562009-11-03 21:04:24 +0000171 <gwt.checkstyle.tests>
172 <fileset dir="test">
scottb@google.com391ffa02009-11-03 22:04:04 +0000173 <include name="com/google/**/*.java" />
174 <include name="test/**" />
scottb@google.com6de97562009-11-03 21:04:24 +0000175 </fileset>
176 </gwt.checkstyle.tests>
fabbott@google.com0e2dc6282008-08-22 16:09:01 +0000177 </target>
gwt.team.mmendez99f280b2006-12-08 23:11:29 +0000178
jat@google.combf79ddb2009-10-14 07:44:30 +0000179 <target name="test.remoteweb" depends="test.web.remote">
180 <echo message="DEPRECATED: test.remoteweb has been renamed test.web.remote"/>
181 </target>
182
183 <target name="test.web.remote"
jat@google.com57b69402009-10-14 18:08:29 +0000184 description="Run web test with remote browsers"
jlabanca@google.comf780b7a2009-10-16 16:36:03 +0000185 if="gwt.hosts.web.remote"
186 unless="test.web.remote.disable">
jat@google.combf79ddb2009-10-14 07:44:30 +0000187 <echo message="Performing web remote testing at ${gwt.hosts.web.remote}" />
jlabanca@google.com4c4d76d2009-11-01 16:30:34 +0000188 <property name="test.web.remote.args" value="${test.args.web.remote}" />
jat@google.com3d3977f2009-10-16 04:52:05 +0000189 <fileset id="test.web.remote.tests" dir="${javac.junit.out}"
190 includes="${gwt.junit.testcase.web.includes}"
191 excludes="${gwt.junit.testcase.web.excludes}" />
jlabanca@google.com2707b142009-11-04 17:47:36 +0000192 <gwt.junit test.name="test.web.remote"
kjin@google.combdabce32010-09-08 22:25:08 +0000193 test.args="${test.web.remote.args}"
194 test.jvmargs="${test.jvmargs}"
jat@google.com3d3977f2009-10-16 04:52:05 +0000195 test.out="${junit.out}/web-remote"
196 test.cases="test.web.remote.tests" >
fabbott@google.com0e2dc6282008-08-22 16:09:01 +0000197 <extraclasspaths>
fabbott@google.com25305472009-06-10 21:39:00 +0000198 <path refid="test.extraclasspath" />
fabbott@google.com0e2dc6282008-08-22 16:09:01 +0000199 </extraclasspaths>
200 </gwt.junit>
201 </target>
zundel@google.com29666c82008-06-04 16:07:53 +0000202
jat@google.combf79ddb2009-10-14 07:44:30 +0000203 <target name="test.dev.remote"
jlabanca@google.com66eac842009-10-14 19:48:54 +0000204 depends="compile, compile.tests"
jat@google.com57b69402009-10-14 18:08:29 +0000205 description="Run dev-mode tests with remote browsers"
jlabanca@google.comf780b7a2009-10-16 16:36:03 +0000206 if="gwt.hosts.dev.remote"
207 unless="test.dev.remote.disable">
jat@google.combf79ddb2009-10-14 07:44:30 +0000208 <echo message="Performing dev-mode remote testing at ${gwt.remote.browsers}" />
jlabanca@google.com4c4d76d2009-11-01 16:30:34 +0000209 <property name="test.dev.remote.args" value="${test.args.dev.remote}" />
jat@google.com57b69402009-10-14 18:08:29 +0000210 <fileset id="test.dev.remote.tests" dir="${javac.junit.out}"
211 includes="${gwt.junit.testcase.dev.includes}"
212 excludes="${gwt.junit.testcase.dev.excludes}" />
jlabanca@google.com2707b142009-11-04 17:47:36 +0000213 <gwt.junit test.name="test.dev.remote"
kjin@google.combdabce32010-09-08 22:25:08 +0000214 test.args="${test.dev.remote.args}"
215 test.jvmargs="${test.jvmargs}"
jat@google.com57b69402009-10-14 18:08:29 +0000216 test.out="${junit.out}/dev-remote" test.cases="test.dev.remote.tests" >
fabbott@google.com0e2dc6282008-08-22 16:09:01 +0000217 <extraclasspaths>
fabbott@google.com25305472009-06-10 21:39:00 +0000218 <path refid="test.extraclasspath" />
fabbott@google.com0e2dc6282008-08-22 16:09:01 +0000219 </extraclasspaths>
220 </gwt.junit>
221 </target>
gwt.team.mmendez99f280b2006-12-08 23:11:29 +0000222
jat@google.combf79ddb2009-10-14 07:44:30 +0000223 <target name="test.emma.remote"
jlabanca@google.com66eac842009-10-14 19:48:54 +0000224 depends="compile, compile.tests"
jat@google.com57b69402009-10-14 18:08:29 +0000225 description="Run emma tests with remote browsers"
jlabanca@google.comf780b7a2009-10-16 16:36:03 +0000226 if="gwt.hosts.dev.remote"
227 unless="test.emma.remote.disable">
jat@google.combf79ddb2009-10-14 07:44:30 +0000228 <echo message="Performing emma remote testing at ${gwt.hosts.dev.remote}" />
jlabanca@google.com4c4d76d2009-11-01 16:30:34 +0000229 <property name="test.emma.remote.args" value="${test.args.dev.remote}" />
jat@google.com57b69402009-10-14 18:08:29 +0000230 <fileset id="test.emma.remote.tests" dir="${javac.junit.out}"
jlabanca@google.com66eac842009-10-14 19:48:54 +0000231 includes="${gwt.junit.testcase.dev.includes}"
232 excludes="${gwt.junit.testcase.dev.excludes}" />
jlabanca@google.com2707b142009-11-04 17:47:36 +0000233 <gwt.junit test.name="test.emma.remote"
kjin@google.combdabce32010-09-08 22:25:08 +0000234 test.args="${test.emma.remote.args}"
235 test.jvmargs="${test.jvmargs}"
jat@google.com57b69402009-10-14 18:08:29 +0000236 test.out="${junit.out}/emma-remote"
237 test.cases="test.emma.remote.tests" >
jgw@google.coma3509e22009-02-06 21:06:24 +0000238 <extraclasspaths>
fabbott@google.com25305472009-06-10 21:39:00 +0000239 <path refid="test.extraclasspath" />
jgw@google.coma3509e22009-02-06 21:06:24 +0000240 <pathelement location="${gwt.tools.redist}/emma/emma.jar" />
241 </extraclasspaths>
242 </gwt.junit>
243 </target>
244
jat@google.combf79ddb2009-10-14 07:44:30 +0000245 <target name="test.emma.selenium"
jlabanca@google.com66eac842009-10-14 19:48:54 +0000246 depends="compile, compile.tests"
jat@google.com57b69402009-10-14 18:08:29 +0000247 description="Run emma tests with Selenium-RC servers"
jlabanca@google.comf780b7a2009-10-16 16:36:03 +0000248 if="gwt.hosts.dev.selenium"
249 unless="test.emma.selenium.disable">
jat@google.combf79ddb2009-10-14 07:44:30 +0000250 <echo message="Performing emma selenium testing at ${gwt.hosts.dev.selenium}" />
jlabanca@google.com4c4d76d2009-11-01 16:30:34 +0000251 <property name="test.emma.selenium.args" value="${test.args.dev.selenium}" />
jat@google.com57b69402009-10-14 18:08:29 +0000252 <fileset id="test.emma.selenium.tests" dir="${javac.junit.out}"
jlabanca@google.com66eac842009-10-14 19:48:54 +0000253 includes="${gwt.junit.testcase.dev.includes}"
254 excludes="${gwt.junit.testcase.dev.excludes}" />
jlabanca@google.com2707b142009-11-04 17:47:36 +0000255 <gwt.junit test.name="test.emma.selenium"
kjin@google.combdabce32010-09-08 22:25:08 +0000256 test.args='${test.emma.selenium.args}'
257 test.jvmargs="${test.jvmargs}"
jat@google.com57b69402009-10-14 18:08:29 +0000258 test.out="${junit.out}/emma-selenium"
259 test.cases="test.emma.selenium.tests" >
jat@google.combf79ddb2009-10-14 07:44:30 +0000260 <extraclasspaths>
261 <path refid="test.extraclasspath" />
262 <pathelement location="${gwt.tools.redist}/emma/emma.jar" />
263 </extraclasspaths>
264 </gwt.junit>
265 </target>
266
267 <target name="test.draft.remote"
268 depends="compile, compile.tests"
jat@google.com57b69402009-10-14 18:08:29 +0000269 description="Run draft compiled tests with remote browsers"
jlabanca@google.comf780b7a2009-10-16 16:36:03 +0000270 if="gwt.hosts.web.remote"
271 unless="test.draft.remote.disable">
jat@google.combf79ddb2009-10-14 07:44:30 +0000272 <echo message="Performing draft remote testing at ${gwt.hosts.web.remote}" />
kjin@google.combdabce32010-09-08 22:25:08 +0000273 <property name="test.draft.remote.args" value="${test.args.web.remote} -draftCompile" />
jat@google.com57b69402009-10-14 18:08:29 +0000274 <fileset id="test.draft.remote.tests" dir="${javac.junit.out}"
275 includes="${gwt.junit.testcase.web.includes}"
276 excludes="${gwt.junit.testcase.web.excludes}" />
jlabanca@google.com2707b142009-11-04 17:47:36 +0000277 <gwt.junit test.name="test.draft.remote"
kjin@google.combdabce32010-09-08 22:25:08 +0000278 test.args="${test.draft.remote.args}"
279 test.jvmargs="${test.jvmargs}"
jlabanca@google.com4c4d76d2009-11-01 16:30:34 +0000280 test.out="${junit.out}/draft-remote"
281 test.cases="test.draft.remote.tests" >
fabbott@google.com0e2dc6282008-08-22 16:09:01 +0000282 <extraclasspaths>
fabbott@google.com25305472009-06-10 21:39:00 +0000283 <path refid="test.extraclasspath" />
fabbott@google.com0e2dc6282008-08-22 16:09:01 +0000284 </extraclasspaths>
285 </gwt.junit>
spoon@google.comd0b00f82009-03-27 14:58:53 +0000286 </target>
287
jat@google.combf79ddb2009-10-14 07:44:30 +0000288 <target name="test.nometa.remote"
jat@google.com57b69402009-10-14 18:08:29 +0000289 description="Run -XdisableClassMetadata tests with remote browsers"
jlabanca@google.comf780b7a2009-10-16 16:36:03 +0000290 if="gwt.hosts.web.remote"
291 unless="test.nometa.remote.disable">
jat@google.combf79ddb2009-10-14 07:44:30 +0000292 <echo message="Performing nometa remote testing at ${gwt.hosts.web.remote}" />
kjin@google.combdabce32010-09-08 22:25:08 +0000293 <property name="test.nometa.remote.args" value="${test.args.web.remote} -XdisableClassMetadata" />
jat@google.com3d3977f2009-10-16 04:52:05 +0000294 <fileset id="test.nometa.remote.tests" dir="${javac.junit.out}"
jat@google.com57b69402009-10-14 18:08:29 +0000295 includes="${gwt.junit.testcase.web.includes}"
296 excludes="${gwt.junit.testcase.web.excludes}" />
jlabanca@google.com2707b142009-11-04 17:47:36 +0000297 <gwt.junit test.name="test.nometa.remote"
kjin@google.combdabce32010-09-08 22:25:08 +0000298 test.args="${test.nometa.remote.args}"
299 test.jvmargs="${test.jvmargs}"
jlabanca@google.com4c4d76d2009-11-01 16:30:34 +0000300 test.out="${junit.out}/nometa-remote"
301 test.cases="test.nometa.remote.tests" >
jat@google.combf79ddb2009-10-14 07:44:30 +0000302 <extraclasspaths>
303 <path refid="test.extraclasspath" />
304 </extraclasspaths>
305 </gwt.junit>
306 </target>
307
308 <target name="test.selenium" depends="test.web.selenium">
309 <echo message="DEPRECATED: test.selenium has been renamed test.web.selenium"/>
310 </target>
311
312 <target name="test.web.selenium"
313 depends="compile, compile.tests"
314 description="Run web tests using Selenium RC"
jlabanca@google.comf780b7a2009-10-16 16:36:03 +0000315 if="gwt.hosts.web.selenium"
316 unless="test.web.selenium.disable">
jat@google.combf79ddb2009-10-14 07:44:30 +0000317 <echo message="Performing web testing using Selenium RC at ${gwt.hosts.web.selenium}" />
jlabanca@google.com4c4d76d2009-11-01 16:30:34 +0000318 <property name="test.web.selenium.args" value="${test.args.web.selenium}" />
jat@google.com57b69402009-10-14 18:08:29 +0000319 <fileset id="test.web.selenium.tests" dir="${javac.junit.out}"
320 includes="${gwt.junit.testcase.web.includes}"
321 excludes="${gwt.junit.testcase.web.excludes}" />
jlabanca@google.com2707b142009-11-04 17:47:36 +0000322 <gwt.junit test.name="test.web.selenium"
kjin@google.combdabce32010-09-08 22:25:08 +0000323 test.args='${test.web.selenium.args}'
324 test.jvmargs="${test.jvmargs}"
jat@google.com57b69402009-10-14 18:08:29 +0000325 test.out="${junit.out}/web-selenium"
326 test.cases="test.web.selenium.tests" >
jat@google.combf79ddb2009-10-14 07:44:30 +0000327 <extraclasspaths>
328 <path refid="test.extraclasspath" />
329 </extraclasspaths>
330 </gwt.junit>
331 </target>
332
333 <target name="test.dev.selenium"
jlabanca@google.com66eac842009-10-14 19:48:54 +0000334 depends="compile, compile.tests"
jat@google.com57b69402009-10-14 18:08:29 +0000335 description="Run dev-mode tests using Selenium RC servers"
jlabanca@google.comf780b7a2009-10-16 16:36:03 +0000336 if="gwt.hosts.dev.selenium"
337 unless="test.dev.selenium.disable">
jat@google.combf79ddb2009-10-14 07:44:30 +0000338 <echo message="Performing dev-mode testing using Selenium RC at ${gwt.hosts.dev.selenium}" />
jlabanca@google.com4c4d76d2009-11-01 16:30:34 +0000339 <property name="test.dev.selenium.args" value="${test.args.dev.selenium}" />
jat@google.com57b69402009-10-14 18:08:29 +0000340 <fileset id="test.dev.selenium.tests" dir="${javac.junit.out}"
341 includes="${gwt.junit.testcase.dev.includes}"
342 excludes="${gwt.junit.testcase.dev.excludes}" />
jlabanca@google.com2707b142009-11-04 17:47:36 +0000343 <gwt.junit test.name="test.dev.selenium"
kjin@google.combdabce32010-09-08 22:25:08 +0000344 test.args='${test.dev.selenium.args}'
345 test.jvmargs="${test.jvmargs}"
jat@google.com57b69402009-10-14 18:08:29 +0000346 test.out="${junit.out}/dev-selenium"
347 test.cases="test.dev.selenium.tests" >
jat@google.combf79ddb2009-10-14 07:44:30 +0000348 <extraclasspaths>
349 <path refid="test.extraclasspath" />
350 </extraclasspaths>
351 </gwt.junit>
352 </target>
353
354 <target name="test.nometa.selenium"
355 description="Run nometa tests using Selenium RC"
jlabanca@google.comf780b7a2009-10-16 16:36:03 +0000356 if="gwt.hosts.web.selenium"
357 unless="test.nometa.selenium.disable">
jat@google.combf79ddb2009-10-14 07:44:30 +0000358 <echo message="Performing nometa testing using Selenium RC at ${gwt.hosts.web.selenium}" />
jlabanca@google.com4c4d76d2009-11-01 16:30:34 +0000359 <property name="test.nometa.selenium.args"
kjin@google.combdabce32010-09-08 22:25:08 +0000360 value="${test.args.web.selenium} -XdisableClassMetadata" />
jat@google.com57b69402009-10-14 18:08:29 +0000361 <fileset id="test.nometa.selenium.tests" dir="${javac.junit.out}"
362 includes="${gwt.junit.testcase.web.includes}"
363 excludes="${gwt.junit.testcase.web.excludes}" />
jlabanca@google.com2707b142009-11-04 17:47:36 +0000364 <gwt.junit test.name="test.nometa.selenium"
kjin@google.combdabce32010-09-08 22:25:08 +0000365 test.args='${test.nometa.selenium.args}'
366 test.jvmargs="${test.jvmargs}"
jat@google.com57b69402009-10-14 18:08:29 +0000367 test.out="${junit.out}/nometa-selenium"
368 test.cases="test.nometa.selenium.tests" >
jat@google.combf79ddb2009-10-14 07:44:30 +0000369 <extraclasspaths>
370 <path refid="test.extraclasspath" />
371 </extraclasspaths>
372 </gwt.junit>
373 </target>
374
375 <target name="test.draft.selenium"
jat@google.com57b69402009-10-14 18:08:29 +0000376 description="Run draft compiled tests using Selenium RC"
jlabanca@google.comf780b7a2009-10-16 16:36:03 +0000377 if="gwt.hosts.web.selenium"
378 unless="test.draft.selenium.disable">
jat@google.combf79ddb2009-10-14 07:44:30 +0000379 <echo message="Performing draft testing using Selenium RC at ${gwt.hosts.web.selenium}" />
jlabanca@google.com4c4d76d2009-11-01 16:30:34 +0000380 <property name="test.draft.selenium.args"
kjin@google.combdabce32010-09-08 22:25:08 +0000381 value="${test.args.web.selenium} -draftCompile" />
jat@google.com57b69402009-10-14 18:08:29 +0000382 <fileset id="test.draft.selenium.tests" dir="${javac.junit.out}"
383 includes="${gwt.junit.testcase.web.includes}"
384 excludes="${gwt.junit.testcase.web.excludes}" />
jlabanca@google.com2707b142009-11-04 17:47:36 +0000385 <gwt.junit test.name="test.draft.selenium"
kjin@google.combdabce32010-09-08 22:25:08 +0000386 test.args='${test.draft.selenium.args}'
387 test.jvmargs="${test.jvmargs}"
jat@google.com57b69402009-10-14 18:08:29 +0000388 test.out="${junit.out}/draft-selenium"
389 test.cases="test.draft.selenium.tests" >
jat@google.combf79ddb2009-10-14 07:44:30 +0000390 <extraclasspaths>
391 <path refid="test.extraclasspath" />
392 </extraclasspaths>
393 </gwt.junit>
394 </target>
395
396 <target name="test.emma.htmlunit"
397 depends="compile, compile.tests"
jlabanca@google.comf780b7a2009-10-16 16:36:03 +0000398 description="Run emma tests with HtmlUnit"
399 unless="test.emma.htmlunit.disable">
jat@google.com57b69402009-10-14 18:08:29 +0000400 <fileset id="test.emma.htmlunit.tests" dir="${javac.junit.out}"
jlabanca@google.com66eac842009-10-14 19:48:54 +0000401 includes="${gwt.junit.testcase.dev.includes}"
402 excludes="${gwt.junit.testcase.dev.excludes}" />
jlabanca@google.comffb28bb2010-01-25 16:52:17 +0000403 <gwt.junit test.name="test.emma.htmlunit"
404 test.args="${test.args} -standardsMode "
kjin@google.combdabce32010-09-08 22:25:08 +0000405 test.jvmargs="${test.jvmargs}"
jat@google.com57b69402009-10-14 18:08:29 +0000406 test.out="${junit.out}/emma-htmlunit"
407 test.cases="test.emma.htmlunit.tests" >
jat@google.combf79ddb2009-10-14 07:44:30 +0000408 <extraclasspaths>
409 <path refid="test.extraclasspath" />
410 <pathelement location="${gwt.tools.redist}/emma/emma.jar" />
411 </extraclasspaths>
412 </gwt.junit>
413 </target>
414
415 <target name="test.dev.htmlunit"
jlabanca@google.com66eac842009-10-14 19:48:54 +0000416 depends="compile, compile.tests"
jlabanca@google.comf780b7a2009-10-16 16:36:03 +0000417 description="Run dev-mode tests with HtmlUnit."
418 unless="test.dev.htmlunit.disable">
jat@google.com57b69402009-10-14 18:08:29 +0000419 <fileset id="test.dev.htmlunit.tests" dir="${javac.junit.out}"
420 includes="${gwt.junit.testcase.dev.includes}"
421 excludes="${gwt.junit.testcase.dev.excludes}" />
jlabanca@google.comffb28bb2010-01-25 16:52:17 +0000422 <gwt.junit test.name="test.dev.htmlunit"
423 test.args="${test.args} -standardsMode "
kjin@google.combdabce32010-09-08 22:25:08 +0000424 test.jvmargs="${test.jvmargs}"
jlabanca@google.com2707b142009-11-04 17:47:36 +0000425 test.out="${junit.out}/dev-htmlunit"
jat@google.com57b69402009-10-14 18:08:29 +0000426 test.cases="test.dev.htmlunit.tests" >
jat@google.combf79ddb2009-10-14 07:44:30 +0000427 <extraclasspaths>
428 <path refid="test.extraclasspath" />
429 </extraclasspaths>
430 </gwt.junit>
431 </target>
432
433 <target name="test.hosted.emma" depends="test.emma">
434 <echo message="DEPRECATED: test.hosted.emma has been renamed test.emma"/>
435 </target>
436
437 <target name="test.hosted" depends="test.dev">
438 <echo message="DEPRECATED: test.hosted has been renamed test.dev"/>
439 </target>
440
jat@google.combf79ddb2009-10-14 07:44:30 +0000441 <target name="test.web.htmlunit"
442 depends="compile, compile.tests"
jlabanca@google.comf780b7a2009-10-16 16:36:03 +0000443 description="Run web-mode tests with HtmlUnit."
444 unless="test.web.htmlunit.disable">
jat@google.com57b69402009-10-14 18:08:29 +0000445 <fileset id="test.web.htmlunit.tests" dir="${javac.junit.out}"
446 includes="${gwt.junit.testcase.web.includes}"
447 excludes="${gwt.junit.testcase.web.excludes}" />
jlabanca@google.com2707b142009-11-04 17:47:36 +0000448 <gwt.junit test.name="test.web.htmlunit"
jlabanca@google.comffb28bb2010-01-25 16:52:17 +0000449 test.args="${test.args} -out www -prod -standardsMode"
kjin@google.combdabce32010-09-08 22:25:08 +0000450 test.jvmargs="${test.jvmargs}"
jat@google.com57b69402009-10-14 18:08:29 +0000451 test.out="${junit.out}/web-htmlunit"
452 test.cases="test.web.htmlunit.tests">
fabbott@google.com0e2dc6282008-08-22 16:09:01 +0000453 <extraclasspaths>
fabbott@google.com25305472009-06-10 21:39:00 +0000454 <path refid="test.extraclasspath" />
fabbott@google.com0e2dc6282008-08-22 16:09:01 +0000455 </extraclasspaths>
456 </gwt.junit>
457 </target>
gwt.team.scottb5b5e6342007-02-22 21:34:23 +0000458
jat@google.combf79ddb2009-10-14 07:44:30 +0000459 <target name="test.nometa.htmlunit"
460 depends="compile, compile.tests"
jlabanca@google.comf780b7a2009-10-16 16:36:03 +0000461 description="Run -XdisableClassMetadata tests with HtmlUnit."
462 unless="test.nometa.htmlunit.disable">
jat@google.com57b69402009-10-14 18:08:29 +0000463 <fileset id="test.nometa.htmlunit.tests" dir="${javac.junit.out}"
464 includes="${gwt.junit.testcase.web.includes}"
465 excludes="${gwt.junit.testcase.web.excludes}" />
jlabanca@google.com2707b142009-11-04 17:47:36 +0000466 <gwt.junit test.name="test.nometa.htmlunit"
jlabanca@google.comffb28bb2010-01-25 16:52:17 +0000467 test.args="${test.args} -XdisableClassMetadata -out www -prod -standardsMode"
kjin@google.combdabce32010-09-08 22:25:08 +0000468 test.jvmargs="${test.jvmargs}"
jat@google.com57b69402009-10-14 18:08:29 +0000469 test.out="${junit.out}/nometa-htmlunit"
470 test.cases="test.nometa.htmlunit.tests" >
bobv@google.comc0e308f2009-02-19 01:08:17 +0000471 <extraclasspaths>
fabbott@google.com25305472009-06-10 21:39:00 +0000472 <path refid="test.extraclasspath" />
bobv@google.comc0e308f2009-02-19 01:08:17 +0000473 </extraclasspaths>
474 </gwt.junit>
475 </target>
476
jat@google.combf79ddb2009-10-14 07:44:30 +0000477 <target name="test.draft.htmlunit"
478 depends="compile, compile.tests"
jlabanca@google.comf780b7a2009-10-16 16:36:03 +0000479 description="Run draft compiled HtmlUnit tests (no batching on purpose)"
480 unless="test.draft.htmlunit.disable">
jat@google.com57b69402009-10-14 18:08:29 +0000481 <fileset id="test.draft.htmlunit.tests" dir="${javac.junit.out}"
482 includes="${gwt.junit.testcase.web.includes}"
483 excludes="${gwt.junit.testcase.web.excludes}" />
jlabanca@google.com2707b142009-11-04 17:47:36 +0000484 <gwt.junit test.name="test.draft.htmlunit"
jlabanca@google.comffb28bb2010-01-25 16:52:17 +0000485 test.args="${test.args} -draftCompile -out www -prod -standardsMode"
kjin@google.combdabce32010-09-08 22:25:08 +0000486 test.jvmargs="${test.jvmargs}"
jat@google.com57b69402009-10-14 18:08:29 +0000487 test.out="${junit.out}/draft-htmlunit"
488 test.cases="test.draft.htmlunit.tests" >
bobv@google.com62773b12009-01-29 22:31:44 +0000489 <extraclasspaths>
fabbott@google.com25305472009-06-10 21:39:00 +0000490 <path refid="test.extraclasspath" />
bobv@google.com62773b12009-01-29 22:31:44 +0000491 </extraclasspaths>
492 </gwt.junit>
493 </target>
494
jat@google.combf79ddb2009-10-14 07:44:30 +0000495 <target name="test"
496 depends="compile, compile.tests"
jat@google.com57b69402009-10-14 18:08:29 +0000497 description="Run all tests for this project.">
jlabanca@google.comf780b7a2009-10-16 16:36:03 +0000498 <!-- Prevent compilation for every target. -->
499 <property name="compile.complete" value="true"/>
500 <property name="compile.tests.complete" value="true"/>
501
jat@google.com57b69402009-10-14 18:08:29 +0000502 <property.ensure name="distro.built" location="${gwt.dev.staging.jar}"
503 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 +0000504 <limit failonerror="true" hours="${test.timeout}">
jlabanca@google.com481db2d2009-10-19 17:28:15 +0000505 <parallel threadsPerProcessor="${gwt.threadsPerProcessor}"
506 threadCount="${gwt.threadCount}">
jlabanca@google.comf780b7a2009-10-16 16:36:03 +0000507 <!--
508 The remote targets must be run sequentially or BrowserManager will queue
509 requests, which will cause some tests to timeout while waiting.
510 -->
511 <sequential>
512 <antcall target="test.dev.remote"/>
513 <antcall target="test.emma.remote"/>
514 <antcall target="test.web.remote"/>
515 <antcall target="test.draft.remote"/>
516 <antcall target="test.nometa.remote"/>
517 </sequential>
518 <antcall target="test.dev.selenium"/>
519 <antcall target="test.emma.selenium"/>
520 <antcall target="test.web.selenium"/>
521 <antcall target="test.draft.selenium"/>
522 <antcall target="test.nometa.selenium"/>
amitmanjhi@google.coma7c82b02010-03-25 14:19:13 +0000523 <antcall target="test.dev.htmlunit"/>
524 <antcall target="test.emma.htmlunit"/>
525 <antcall target="test.web.htmlunit"/>
526 <antcall target="test.draft.htmlunit"/>
527 <antcall target="test.nometa.htmlunit"/>
scottb@google.com92dd9932011-03-11 17:50:44 +0000528 <antcall target="test.nongwt"/>
jlabanca@google.comf780b7a2009-10-16 16:36:03 +0000529 </parallel>
fabbott@google.com0e2dc6282008-08-22 16:09:01 +0000530 </limit>
531 </target>
gwt.team.scottb14c5b9d2006-12-10 06:06:08 +0000532
jat@google.com57b69402009-10-14 18:08:29 +0000533 <target name="test.htmlunit"
534 depends="compile, compile.tests"
535 description="Run all HtmlUnit tests">
jlabanca@google.com4af13062009-10-23 23:28:56 +0000536 <!-- Prevent compilation for every target. -->
537 <property name="compile.complete" value="true"/>
538 <property name="compile.tests.complete" value="true"/>
nchalko@google.com90f14a02010-07-28 19:08:32 +0000539
jat@google.com57b69402009-10-14 18:08:29 +0000540 <property.ensure name="distro.built" location="${gwt.dev.staging.jar}"
541 message="GWT must be built before performing any tests. This can be fixed by running ant in the ${gwt.root} directory." />
542 <limit failonerror="true" hours="${test.timeout}">
jlabanca@google.com481db2d2009-10-19 17:28:15 +0000543 <parallel threadsPerProcessor="${gwt.threadsPerProcessor}"
544 threadCount="${gwt.threadCount}">
jat@google.com57b69402009-10-14 18:08:29 +0000545 <antcall target="test.dev.htmlunit"/>
546 <antcall target="test.emma.htmlunit"/>
547 <antcall target="test.web.htmlunit"/>
548 <antcall target="test.draft.htmlunit"/>
549 <antcall target="test.nometa.htmlunit"/>
jat@google.com57b69402009-10-14 18:08:29 +0000550 </parallel>
551 </limit>
552 </target>
553
scottb@google.com92dd9932011-03-11 17:50:44 +0000554 <target name="test.nongwt"
555 depends="compile, compile.tests"
556 description="Run JRE-only tests."
557 unless="test.nongwt.disable">
558 <fileset id="test.nongwt.tests" dir="${javac.junit.out}"
559 includes="${gwt.nongwt.testcase.includes}"
560 excludes="${gwt.nongwt.testcase.excludes}" />
561 <gwt.junit test.name="test.nongwt"
562 test.args="${test.args}"
563 test.jvmargs="${test.jvmargs}"
564 test.out="${junit.out}/nongwt"
565 test.cases="test.nongwt.tests" >
566 <extraclasspaths>
567 <path refid="test.extraclasspath" />
568 </extraclasspaths>
569 </gwt.junit>
570 </target>
571
jat@google.combf79ddb2009-10-14 07:44:30 +0000572 <target name="test.dev"
573 depends="compile, compile.tests"
574 description="Run dev-mode tests for this project.">
jlabanca@google.com4af13062009-10-23 23:28:56 +0000575 <!-- Prevent compilation for every target. -->
576 <property name="compile.complete" value="true"/>
577 <property name="compile.tests.complete" value="true"/>
578
jat@google.combf79ddb2009-10-14 07:44:30 +0000579 <limit failonerror="true" hours="${test.timeout}">
jlabanca@google.com481db2d2009-10-19 17:28:15 +0000580 <parallel threadsPerProcessor="${gwt.threadsPerProcessor}"
581 threadCount="${gwt.threadCount}">
jat@google.combf79ddb2009-10-14 07:44:30 +0000582 <antcall target="test.dev.htmlunit"/>
jat@google.combf79ddb2009-10-14 07:44:30 +0000583 <!-- no-op unless gwt.hosts.dev.remote is defined -->
584 <antcall target="test.dev.remote"/>
585 <!-- no-op unless gwt.hosts.dev.selenium is defined -->
586 <antcall target="test.dev.selenium"/>
587 </parallel>
588 </limit>
589 </target>
590
591 <target name="test.web"
592 depends="compile, compile.tests"
jat@google.com57b69402009-10-14 18:08:29 +0000593 description="Run web-mode tests for this project.">
jlabanca@google.com4af13062009-10-23 23:28:56 +0000594 <!-- Prevent compilation for every target. -->
595 <property name="compile.complete" value="true"/>
596 <property name="compile.tests.complete" value="true"/>
597
jat@google.combf79ddb2009-10-14 07:44:30 +0000598 <limit failonerror="true" hours="${test.timeout}">
jlabanca@google.com481db2d2009-10-19 17:28:15 +0000599 <parallel threadsPerProcessor="${gwt.threadsPerProcessor}"
600 threadCount="${gwt.threadCount}">
jat@google.combf79ddb2009-10-14 07:44:30 +0000601 <antcall target="test.web.htmlunit"/>
jat@google.combf79ddb2009-10-14 07:44:30 +0000602 <!-- no-op unless gwt.hosts.web.remote is defined -->
603 <antcall target="test.web.remote"/>
604 <!-- no-op unless gwt.hosts.web.selenium is defined -->
605 <antcall target="test.web.selenium"/>
606 </parallel>
607 </limit>
608 </target>
609
610 <target name="test.emma"
611 depends="compile, compile.tests"
jat@google.com57b69402009-10-14 18:08:29 +0000612 description="Run emma tests for this project.">
jlabanca@google.com4af13062009-10-23 23:28:56 +0000613 <!-- Prevent compilation for every target. -->
614 <property name="compile.complete" value="true"/>
615 <property name="compile.tests.complete" value="true"/>
616
jat@google.combf79ddb2009-10-14 07:44:30 +0000617 <limit failonerror="true" hours="${test.timeout}">
jlabanca@google.com481db2d2009-10-19 17:28:15 +0000618 <parallel threadsPerProcessor="${gwt.threadsPerProcessor}"
619 threadCount="${gwt.threadCount}">
jat@google.combf79ddb2009-10-14 07:44:30 +0000620 <antcall target="test.emma.htmlunit"/>
jat@google.combf79ddb2009-10-14 07:44:30 +0000621 <!-- no-op unless gwt.hosts.dev.remote is defined -->
622 <antcall target="test.emma.remote"/>
623 <!-- no-op unless gwt.hosts.dev.selenium is defined -->
624 <antcall target="test.emma.selenium"/>
625 </parallel>
626 </limit>
627 </target>
628
629 <target name="test.draft"
630 depends="compile, compile.tests"
jat@google.com57b69402009-10-14 18:08:29 +0000631 description="Run draft compiled tests for this project.">
jlabanca@google.com4af13062009-10-23 23:28:56 +0000632 <!-- Prevent compilation for every target. -->
633 <property name="compile.complete" value="true"/>
634 <property name="compile.tests.complete" value="true"/>
635
jat@google.combf79ddb2009-10-14 07:44:30 +0000636 <limit failonerror="true" hours="${test.timeout}">
jlabanca@google.com481db2d2009-10-19 17:28:15 +0000637 <parallel threadsPerProcessor="${gwt.threadsPerProcessor}"
638 threadCount="${gwt.threadCount}">
jat@google.combf79ddb2009-10-14 07:44:30 +0000639 <antcall target="test.draft.htmlunit"/>
jat@google.combf79ddb2009-10-14 07:44:30 +0000640 <!-- no-op unless gwt.hosts.web.remote is defined -->
641 <antcall target="test.draft.remote"/>
642 <!-- no-op unless gwt.hosts.web.selenium is defined -->
643 <antcall target="test.draft.selenium"/>
644 </parallel>
645 </limit>
646 </target>
647
648 <target name="test.nometa"
649 depends="compile, compile.tests"
jat@google.com57b69402009-10-14 18:08:29 +0000650 description="Run -XdisableClassMetadata tests for this project.">
jlabanca@google.com4af13062009-10-23 23:28:56 +0000651 <!-- Prevent compilation for every target. -->
652 <property name="compile.complete" value="true"/>
653 <property name="compile.tests.complete" value="true"/>
654
jat@google.combf79ddb2009-10-14 07:44:30 +0000655 <limit failonerror="true" hours="${test.timeout}">
jlabanca@google.com481db2d2009-10-19 17:28:15 +0000656 <parallel threadsPerProcessor="${gwt.threadsPerProcessor}"
657 threadCount="${gwt.threadCount}">
jat@google.combf79ddb2009-10-14 07:44:30 +0000658 <antcall target="test.web.htmlunit"/>
jat@google.combf79ddb2009-10-14 07:44:30 +0000659 <!-- no-op unless gwt.hosts.web.remote is defined -->
660 <antcall target="test.nometa.remote"/>
661 <!-- no-op unless gwt.hosts.web.selenium is defined -->
662 <antcall target="test.nometa.selenium"/>
663 </parallel>
664 </limit>
665 </target>
nchalko@google.comad61f1d2011-01-17 17:08:08 +0000666
667
668 <!-- Validation TCK test and reports -->
669
670 <!-- TODO(nchalko) move the tck target to user/build.xml and then delete
671 all of samples/validaitontck -->
672 <target name="tck"
673 depends="tck.run,tck.report"
674 description="Run all tests for this project.">
675 <fail
676 message="One or more junit tests failed for target: @{test.name} @{test.args}"
677 if="junit.failure" status="2" />
678 </target>
jat@google.combf79ddb2009-10-14 07:44:30 +0000679
nchalko@google.comad61f1d2011-01-17 17:08:08 +0000680 <target name="tck.run"
681 depends="compile, compile.tests"
682 description="Run all tests for this project.">
683 <!-- Prevent compilation for every target. -->
684 <property name="compile.complete" value="true"/>
685 <property name="compile.tests.complete" value="true"/>
686
687 <property.ensure name="distro.built" location="${gwt.dev.staging.jar}"
688 message="GWT must be built before performing any tests. This can be fixed by running ant in the ${gwt.root} directory." />
689 <limit failonerror="true" hours="${test.timeout}">
690
691 <antcall target="tck.dev.htmlunit"/>
692 </limit>
693
694 <fail
695 message="One or more tck tests failed for target: @{test.name} @{test.args}"
696 if="junit.failure" status="2" />
697 </target>
698
699 <macrodef name="countMarkedTests">
700 <attribute name="annotation" default="NOT SET" />
701 <attribute name="outputproperty" default="jsr303.marked.@{annotation}" />
702 <sequential>
703
704 </sequential>
705 </macrodef>
706
707 <target name="tck.report">
708 <mkdir dir="${junit.out}/tck-report" />
709 <mkdir dir="${junit.out}/tck-report/text" />
710
711 <scan>
712 <fileset dir="test/org/hibernate/jsr303/tck/tests" id="id"/>
713 <filterchain>
714 <countfilter match="@Failing" property="jsr303.marked.Failing" init="0"/>
715 <countfilter match="@NonTckTest" property="jsr303.marked.NonTckTest" init="0"/>
716 <countfilter match="@NotSupported" property="jsr303.marked.NotSupported" init="0"/>
nchalko@google.com4c81c392011-01-17 23:51:59 +0000717 <countfilter match="@TestNotCompatible" property="jsr303.marked.NotSupported" init="0"/>
nchalko@google.comad61f1d2011-01-17 17:08:08 +0000718 </filterchain>
719 </scan>
720
721 <!-- force to zero if not set above -->
722 <property name="jsr303.marked.Failing" value="0"/>
723 <property name="jsr303.marked.NonTckTest" value="0"/>
nchalko@google.com4c81c392011-01-17 23:51:59 +0000724 <property name="jsr303.marked.TestNotCompatible" value="0"/>
nchalko@google.comad61f1d2011-01-17 17:08:08 +0000725
726 <echo message="Marked Failing = ${jsr303.marked.Failing}" />
727 <echo message="Marked NonTckTest = ${jsr303.marked.NonTckTest}" />
728 <echo message="Marked NotSupported = ${jsr303.marked.NotSupported}" />
nchalko@google.com4c81c392011-01-17 23:51:59 +0000729 <echo message="Marked TestNotCompatible = ${jsr303.marked.TestNotCompatible}" />
nchalko@google.comad61f1d2011-01-17 17:08:08 +0000730
731 <junitreport todir="${junit.out}/tck-report">
732 <fileset dir="${junit.out}/tck-dev-htmlunit">
733 <include name="reports/TEST-*.xml" />
734 </fileset>
735 <report format="noframes" todir="${junit.out}/tck-report" styledir="style/html">
736 <param name="markedFailing" expression="${jsr303.marked.Failing}" />
737 <param name="markedNonTckTest" expression="${jsr303.marked.NonTckTest}" />
738 <param name="markedNotSupported" expression="${jsr303.marked.NotSupported}" />
nchalko@google.com4c81c392011-01-17 23:51:59 +0000739 <param name="markedTestNotCompatible" expression="${jsr303.marked.TestNotCompatible}" />
nchalko@google.comad61f1d2011-01-17 17:08:08 +0000740 </report>
741 <report format="noframes" todir="${junit.out}/tck-report/text" styledir="style/text">
742 <param name="markedFailing" expression="${jsr303.marked.Failing}" />
743 <param name="markedNonTckTest" expression="${jsr303.marked.NonTckTest}" />
744 <param name="markedNotSupported" expression="${jsr303.marked.NotSupported}" />
nchalko@google.com4c81c392011-01-17 23:51:59 +0000745 <param name="markedTestNotCompatible" expression="${jsr303.marked.TestNotCompatible}" />
nchalko@google.comad61f1d2011-01-17 17:08:08 +0000746 </report>
747 </junitreport>
748
749 <concat taskname="JSR 303 TCK Result">
750 <filelist>
751 <file name="${junit.out}/tck-report/text/junit-noframes.html" />
752 </filelist>
753 </concat>
754
755 </target>
756
757 <target name="tck.dev.htmlunit"
758 depends="compile, compile.tests"
759 description="Run dev-mode tests with HtmlUnit."
760 unless="test.dev.htmlunit.disable">
761 <fileset id="tck.dev.htmlunit.tests" dir="${javac.junit.out}"
762 includes="${gwt.tck.testcase.dev.includes}"
763 excludes="${gwt.tck.testcase.dev.excludes}" />
764 <gwt.junit test.name="test.dev.htmlunit"
765 test.args="${test.args} -standardsMode "
766 test.jvmargs="-ea -Dcom.google.gwt.sample.validationtck.util.Failing.include=true -Dcom.google.gwt.sample.validationtck.util.NonTckTest.exclude=true"
767 test.out="${junit.out}/tck-dev-htmlunit"
768 test.cases="tck.dev.htmlunit.tests"
769 haltonfailure="false"
770 >
771 <extraclasspaths>
772 <path refid="test.extraclasspath" />
773 </extraclasspaths>
774 </gwt.junit>
775 </target>
776
gwt.mirrorbot@gmail.comd54a4bd2010-06-07 19:20:31 +0000777 <target name="benchmark"
778 description="Run all benchmarks for this project.">
779
780 <property.ensure name="distro.built" location="${gwt.dev.staging.jar}"
781 message="GWT must be built before performing any tests. This can be fixed by running ant in the ${gwt.root} directory." />
782 <limit failonerror="true" hours="${benchmark.timeout}">
783 <!-- no-op unless gwt.hosts.web.remote is defined -->
784 <antcall target="benchmark.web.remote"/>
785 <!-- no-op unless gwt.hosts.web.selenium is defined -->
786 <antcall target="benchmark.web.selenium"/>
787 <antcall target="benchmark.web.htmlunit"/>
788 </limit>
789 </target>
790
791 <target name="benchmark.web.htmlunit"
792 depends="compile, compile.tests"
793 description="Run web-mode benchmarks with HtmlUnit."
794 unless="benchmark.web.htmlunit.disable">
795 <fileset id="benchmark.web.htmlunit.tests" dir="${javac.junit.out}"
796 includes="${gwt.benchmark.testcase.web.includes}"
797 excludes="${gwt.benchmark.testcase.web.excludes}" />
798 <gwt.junit test.name="benchmark.web.htmlunit"
799 test.args="${test.args} -testMethodTimeout ${benchmark.timeout} -out www -prod -standardsMode"
kjin@google.combdabce32010-09-08 22:25:08 +0000800 test.jvmargs="${test.jvmargs}"
gwt.mirrorbot@gmail.comd54a4bd2010-06-07 19:20:31 +0000801 test.out="${junit.out}/web-htmlunit-benchmark"
802 test.cases="benchmark.web.htmlunit.tests" >
803 <extraclasspaths>
804 <path refid="test.extraclasspath" />
805 </extraclasspaths>
806 </gwt.junit>
807 </target>
808
809 <target name="benchmark.web.selenium"
810 depends="compile, compile.tests"
811 description="Run web benchmark using Selenium RC"
812 if="gwt.hosts.web.selenium"
813 unless="benchmark.web.selenium.disable">
814 <echo message="Performing web benchmarking using Selenium RC at ${gwt.hosts.web.selenium}" />
815 <property name="test.web.selenium.args" value="${test.args.web.selenium}" />
816 <fileset id="benchmark.web.selenium.tests" dir="${javac.junit.out}"
817 includes="${gwt.benchmark.testcase.web.includes}"
818 excludes="${gwt.benchmark.testcase.web.excludes}" />
819 <gwt.junit test.name="benchmark.web.selenium"
kjin@google.combdabce32010-09-08 22:25:08 +0000820 test.args='${test.web.selenium.args} -testMethodTimeout ${benchmark.timeout}'
821 test.jvmargs="${test.jvmargs}"
gwt.mirrorbot@gmail.comd54a4bd2010-06-07 19:20:31 +0000822 test.out="${junit.out}/web-selenium-benchmark"
823 test.cases="benchmark.web.selenium.tests" >
824 <extraclasspaths>
825 <path refid="test.extraclasspath" />
826 </extraclasspaths>
827 </gwt.junit>
828 </target>
829
830 <target name="benchmark.web.remote"
831 depends="compile, compile.tests"
832 description="Run web benchmarks with remote browsers"
833 if="gwt.hosts.web.remote"
834 unless="benchmark.web.remote.disable">
835 <echo message="Performing web remote benchmarking at ${gwt.hosts.web.remote}" />
836 <property name="test.web.remote.args" value="${test.args.web.remote}" />
837 <fileset id="benchmark.web.remote.tests" dir="${javac.junit.out}"
838 includes="${gwt.benchmark.testcase.web.includes}"
839 excludes="${gwt.benchmark.testcase.web.excludes}" />
840 <gwt.junit test.name="benchmark.web.remote"
kjin@google.combdabce32010-09-08 22:25:08 +0000841 test.args="${test.web.remote.args} -testMethodTimeout ${benchmark.timeout}"
842 test.jvmargs="${test.jvmargs}"
gwt.mirrorbot@gmail.comd54a4bd2010-06-07 19:20:31 +0000843 test.out="${junit.out}/web-remote-benchmark"
844 test.cases="benchmark.web.remote.tests" >
845 <extraclasspaths>
846 <path refid="test.extraclasspath" />
847 </extraclasspaths>
848 </gwt.junit>
849 </target>
850
jat@google.com57b69402009-10-14 18:08:29 +0000851 <!--
852 Merges coverage data for the entire project
853 -->
854 <target name="emma.merge">
jlabanca@google.com81244562009-08-05 19:55:36 +0000855 <delete dir="${emma.merged.out}" />
856 <mkdir dir="${emma.merged.out}" />
857 <emma>
858 <merge outfile="${emma.merged.out}/merged.emma" >
859 <fileset dir="${junit.out}" >
860 <include name="**/*.emma" />
861 <exclude name="${emma.merged.out}/merged.emma" />
862 </fileset>
863 </merge>
864 </emma>
865 <emma>
866 <report sourcepath="${project.classpath.src}">
867 <fileset file="${javac.emma.out}/metadata.emma" />
868 <fileset file="${emma.merged.out}/merged.emma" />
869 <txt outfile="${emma.merged.out}/coverage.txt" />
870 <html outfile="${emma.merged.out}/coverage.html" />
871 <xml outfile="${emma.merged.out}/coverage.xml" />
872 </report>
873 </emma>
874 </target>
875
jat@google.combf79ddb2009-10-14 07:44:30 +0000876 <target name="clean"
877 description="Cleans this project's intermediate and output files">
fabbott@google.com0e2dc6282008-08-22 16:09:01 +0000878 <delete dir="${project.build}" />
879 <delete file="${project.lib}" />
880 </target>
jat@google.com57b69402009-10-14 18:08:29 +0000881
882 <target name="presubmit" depends="test, checkstyle"
883 description="runs the gwt api checker, user checkstyle, and user tests">
spoon@google.comd0b00f82009-03-27 14:58:53 +0000884 <gwt.ant dir=".." target="apicheck-nobuild"/>
jgw@google.coma3509e22009-02-06 21:06:24 +0000885 </target>
gwt.team.scottb14c5b9d2006-12-10 06:06:08 +0000886</project>