blob: 3a179ef1c60f075e234fa6002bedbdc518ff34b4 [file] [log] [blame]
gwt.team.scottb14c5b9d2006-12-10 06:06:08 +00001<project name="user" default="build" basedir=".">
2 <property name="gwt.root" location=".." />
3 <property name="project.tail" value="user" />
4 <import file="${gwt.root}/common.ant.xml" />
5
gwt.team.mmendez99f280b2006-12-08 23:11:29 +00006 <!--
7 Default hosted mode test cases
8 -->
9 <fileset id="default.hosted.tests" dir="${javac.junit.out}">
10 <!--
11 Causes a security dialog to popup and subsequently blocks testing
12 -->
13 <exclude name="com/google/gwt/user/client/ui/FormPanelTest.class" />
14
15 <!--
16 Need to confirm with JGW if this should still be disabled
17 -->
18 <exclude name="com/google/gwt/user/client/ui/HistoryTest.class" />
19
20 <include name="**/*Test.class" />
21 </fileset>
22
23 <!--
24 Default web mode test cases
25 -->
26 <fileset id="default.web.tests" dir="${javac.junit.out}">
27 <!--
28 Need to confirm with JGW if this should still be disabled
29 -->
30 <exclude name="com/google/gwt/user/client/ui/HistoryTest.class" />
31
32 <!--
33 Safari Failures:
34 Testcase: testFunctionCaching took 0.112 sec
35 Caused an ERROR
36 JavaScript RangeError exception: Maximum call stack size exceeded.
37 com.google.gwt.core.client.JavaScriptException: JavaScript RangeError exception: Maximum call stack size exceeded.
38
39 Linux Web Mode Failures:
40 Testcase: testFunctionCaching took 1.004 sec
41 Caused an ERROR
42 JavaScript InternalError exception: too much recursion
43 com.google.gwt.core.client.JavaScriptException: JavaScript InternalError exception: too much recursion
44 -->
45 <exclude name="com/google/gwt/dev/jjs/test/HostedTest.class" />
46
47 <!--
48 Safari Failures:
49 Testcase: testRecursion took 1.003 sec
50 Caused an ERROR
51 JavaScript RangeError exception: Maximum call stack size exceeded.
52 com.google.gwt.core.client.JavaScriptException: JavaScript RangeError exception: Maximum call stack size exceeded.
53 -->
54 <exclude name="com/google/gwt/dev/jjs/test/MethodCallTest.class" />
55
56 <!--
57 Safari Failures:
58 Testcase: testJso took 1.005 sec
59 Caused an ERROR
60 JavaScript RangeError exception: Maximum call stack size exceeded.
61 com.google.gwt.core.client.JavaScriptException: JavaScript RangeError exception: Maximum call stack size exceeded.
62 -->
63 <exclude name="com/google/gwt/dev/jjs/test/MiscellaneousTest.class" />
64
65 <include name="**/*Test.class" />
66 </fileset>
67
gwt.team.scottb14c5b9d2006-12-10 06:06:08 +000068 <!-- Platform shouldn't matter here, just picking one -->
69 <property.ensure name="gwt.dev.jar" location="${gwt.build.lib}/gwt-dev-linux.jar" />
70
71 <target name="compile" description="Compile all class files">
72 <mkdir dir="${javac.out}" />
73 <gwt.javac>
74 <classpath>
75 <pathelement location="${gwt.tools.lib}/junit/junit-3.8.1.jar" />
76 <pathelement location="${gwt.dev.jar}" />
77 </classpath>
gwt.team.mmendez99f280b2006-12-08 23:11:29 +000078 </gwt.javac>
79
80 <!-- Build the BrowserManagerServer_Stub to allow remote browser testing -->
81 <rmic base="${javac.out}" classname="com.google.gwt.junit.remote.BrowserManagerServer">
82 <compilerarg value="-v1.2"/>
83 </rmic>
gwt.team.scottb14c5b9d2006-12-10 06:06:08 +000084 </target>
gwt.team.mmendez99f280b2006-12-08 23:11:29 +000085
86 <target name="compile.tests"
87 description="Compiles the test code for this project">
88 <mkdir dir="${javac.junit.out}" />
89 <gwt.javac srcdir="test" destdir="${javac.junit.out}">
90 <classpath>
91 <pathelement location="${javac.out}" />
92 <pathelement location="${gwt.dev.staging.jar}" />
93 </classpath>
94 </gwt.javac>
95 </target>
gwt.team.scottb14c5b9d2006-12-10 06:06:08 +000096
97 <target name="build" depends="compile" description="Build and package this project">
98 <mkdir dir="${gwt.build.lib}" />
99 <gwt.jar>
100 <fileset dir="src" />
101 <fileset dir="super" />
102 <fileset dir="${javac.out}" />
103 </gwt.jar>
104 </target>
105
106 <target name="checkstyle" description="Static analysis of source">
107 <gwt.checkstyle>
108 <fileset dir="super/com/google/gwt/emul" />
109 <fileset dir="super/com/google/gwt/junit/translatable" />
110 </gwt.checkstyle>
111 </target>
gwt.team.mmendez99f280b2006-12-08 23:11:29 +0000112
113 <target name="remoteweb-test"
114 description="Run a remoteweb test at the given host and path">
115 <echo message="Performing remote browser testing at rmi://${gwt.remote.browser}" />
116 <gwt.junit test.args="-port ${gwt.junit.port} -out www -web -remoteweb rmi://${gwt.remote.browser}"
117 test.out="${junit.out}/${gwt.remote.browser}"
118 test.cases="default.web.tests" />
119 </target>
120
121 <target name="test"
122 depends="compile, compile.tests"
123 description="Run hosted-mode, web-mode and remoteweb tests for this project.">
124 <property.ensure name="distro.built"
125 location="${gwt.dev.staging.jar}"
126 message="GWT must be built before performing any tests. This can be fixed by running ant in the ${gwt.root} directory." />
127
128 <!--
129 Run hosted and web mode tests for the platform on which this build
130 is executing
131 -->
132 <parallel threadcount="1">
133 <gwt.junit test.args="-port ${gwt.junit.port}"
134 test.out="${junit.out}/${build.host.platform}-hosted-mode"
135 test.cases="default.hosted.tests" />
136
137 <gwt.junit test.args="-port ${gwt.junit.port} -out www -web"
138 test.out="${junit.out}/${build.host.platform}-web-mode"
139 test.cases="default.web.tests" />
140
141 <!--
142 Run remote browser testing for the comma delimited list of remote browsers
143 -->
144 <foreach list="${gwt.remote.browsers}"
145 delimiter=","
146 parallel="true"
147 maxThreads="1"
148 target="remoteweb-test"
149 param="gwt.remote.browser" />
150 </parallel>
151 </target>
gwt.team.scottb14c5b9d2006-12-10 06:06:08 +0000152
153 <target name="clean" description="Cleans this project's intermediate and output files">
154 <delete dir="${project.build}" />
155 <delete file="${project.lib}" />
156 </target>
157
158</project>