blob: fb08c64bac316c97e6eeec7ae736b6447f0973ed [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" />
gwt.team.bobv799633f2008-02-29 23:58:24 +00004 <property name="test.args" value="" />
gwt.team.scottb14c5b9d2006-12-10 06:06:08 +00005 <import file="${gwt.root}/common.ant.xml" />
6
gwt.team.mmendez99f280b2006-12-08 23:11:29 +00007 <!--
8 Default hosted mode test cases
9 -->
gwt.team.mmendez764ec742007-03-20 19:36:54 +000010 <fileset id="default.hosted.tests" dir="${javac.junit.out}"
gwt.team.bobv799633f2008-02-29 23:58:24 +000011 includes="${gwt.junit.testcase.includes}" />
gwt.team.mmendez99f280b2006-12-08 23:11:29 +000012
13 <!--
14 Default web mode test cases
15 -->
gwt.team.mmendez764ec742007-03-20 19:36:54 +000016 <fileset id="default.web.tests" dir="${javac.junit.out}"
gwt.team.bobv799633f2008-02-29 23:58:24 +000017 includes="${gwt.junit.testcase.includes}" />
gwt.team.mmendez99f280b2006-12-08 23:11:29 +000018
gwt.team.scottb14c5b9d2006-12-10 06:06:08 +000019 <!-- Platform shouldn't matter here, just picking one -->
20 <property.ensure name="gwt.dev.jar" location="${gwt.build.lib}/gwt-dev-linux.jar" />
21
gwt.team.scottbc4700b82006-12-12 11:23:41 +000022 <target name="compile" description="Compile all class files">
gwt.team.scottb14c5b9d2006-12-10 06:06:08 +000023 <mkdir dir="${javac.out}" />
24 <gwt.javac>
25 <classpath>
gwt.team.scottbc4700b82006-12-12 11:23:41 +000026 <pathelement location="${gwt.tools.lib}/tomcat/servlet-api-2.4.jar" />
gwt.team.scottb14c5b9d2006-12-10 06:06:08 +000027 <pathelement location="${gwt.tools.lib}/junit/junit-3.8.1.jar" />
gwt.team.mmendez4449b342007-04-10 19:41:44 +000028 <pathelement location="${gwt.tools.lib}/jfreechart/jfreechart-1.0.3.jar" />
gwt.team.scottb14c5b9d2006-12-10 06:06:08 +000029 <pathelement location="${gwt.dev.jar}" />
30 </classpath>
gwt.team.mmendez99f280b2006-12-08 23:11:29 +000031 </gwt.javac>
32
33 <!-- Build the BrowserManagerServer_Stub to allow remote browser testing -->
gwt.team.jatf0a06d02007-01-03 18:51:15 +000034 <rmic base="${javac.out}"
35 classname="com.google.gwt.junit.remote.BrowserManagerServer"
36 stubversion="1.2"/>
gwt.team.scottb14c5b9d2006-12-10 06:06:08 +000037 </target>
gwt.team.mmendez99f280b2006-12-08 23:11:29 +000038
gwt.team.scottb9fba66c2006-12-11 18:50:42 +000039 <target name="compile.tests" description="Compiles the test code for this project">
gwt.team.mmendez99f280b2006-12-08 23:11:29 +000040 <mkdir dir="${javac.junit.out}" />
scottb@google.com9ddb1f12008-03-19 02:17:40 +000041 <gwt.javac srcdir="test" excludes="com/google/gwt/langtest/**" destdir="${javac.junit.out}">
gwt.team.mmendez99f280b2006-12-08 23:11:29 +000042 <classpath>
43 <pathelement location="${javac.out}" />
gwt.team.scottbe18b95c2006-12-21 22:35:49 +000044 <pathelement location="${gwt.tools.lib}/junit/junit-3.8.1.jar" />
gwt.team.mmendez99f280b2006-12-08 23:11:29 +000045 <pathelement location="${gwt.dev.staging.jar}" />
46 </classpath>
47 </gwt.javac>
48 </target>
gwt.team.scottb14c5b9d2006-12-10 06:06:08 +000049
50 <target name="build" depends="compile" description="Build and package this project">
51 <mkdir dir="${gwt.build.lib}" />
52 <gwt.jar>
gwt.team.scottbb8fc3372006-12-11 19:30:10 +000053 <fileset dir="src" excludes="**/package.html" />
54 <fileset dir="super" excludes="**/package.html" />
gwt.team.scottb14c5b9d2006-12-10 06:06:08 +000055 <fileset dir="${javac.out}" />
gwt.team.scottbc4700b82006-12-12 11:23:41 +000056 <zipfileset src="${gwt.tools.lib}/tomcat/servlet-api-2.4.jar" />
gwt.team.scottb14c5b9d2006-12-10 06:06:08 +000057 </gwt.jar>
58 </target>
59
60 <target name="checkstyle" description="Static analysis of source">
61 <gwt.checkstyle>
gwt.team.scottb0ddceab2007-05-01 20:37:24 +000062 <fileset dir="src" />
gwt.team.scottb14c5b9d2006-12-10 06:06:08 +000063 <fileset dir="super/com/google/gwt/emul" />
64 <fileset dir="super/com/google/gwt/junit/translatable" />
65 </gwt.checkstyle>
66 </target>
gwt.team.mmendez99f280b2006-12-08 23:11:29 +000067
gwt.team.bobv77042912008-03-01 02:06:01 +000068 <target name="remoteweb-test" description="Run a remoteweb test at the given host and path" if="gwt.remote.browsers">
gwt.team.bobv77042912008-03-01 02:06:01 +000069 <echo message="Performing remote browser testing at ${gwt.remote.browsers}" />
70 <gwt.junit test.args="${test.args} -out www -web -remoteweb ${gwt.remote.browsers}" test.out="${junit.out}/remoteweb" test.cases="default.web.tests" />
gwt.team.mmendez99f280b2006-12-08 23:11:29 +000071 </target>
72
gwt.team.scottb5b5e6342007-02-22 21:34:23 +000073 <target name="test.hosted" depends="compile, compile.tests" description="Run only hosted-mode tests for this project.">
gwt.team.bobv799633f2008-02-29 23:58:24 +000074 <gwt.junit test.args="${test.args}" test.out="${junit.out}/${build.host.platform}-hosted-mode" test.cases="default.hosted.tests" />
gwt.team.scottb5b5e6342007-02-22 21:34:23 +000075 </target>
76
77 <target name="test.web" depends="compile, compile.tests" description="Run only web-mode tests for this project.">
gwt.team.bobv799633f2008-02-29 23:58:24 +000078 <gwt.junit test.args="${test.args} -out www -web" test.out="${junit.out}/${build.host.platform}-web-mode" test.cases="default.web.tests" />
gwt.team.scottb5b5e6342007-02-22 21:34:23 +000079 </target>
80
gwt.team.scottb9fba66c2006-12-11 18:50:42 +000081 <target name="test" depends="compile, compile.tests" description="Run hosted-mode, web-mode and remoteweb tests for this project.">
82 <property.ensure name="distro.built" location="${gwt.dev.staging.jar}" message="GWT must be built before performing any tests. This can be fixed by running ant in the ${gwt.root} directory." />
gwt.team.mmendez99f280b2006-12-08 23:11:29 +000083
84 <!--
85 Run hosted and web mode tests for the platform on which this build
86 is executing
87 -->
gwt.team.bobv799633f2008-02-29 23:58:24 +000088 <limit failonerror="true" hours="1">
89 <parallel threadsPerProcessor="1">
gwt.team.bobv77042912008-03-01 02:06:01 +000090 <!-- remoteweb-test is a no-op unless gwt.remote.browsers is defined -->
91 <antcall target="remoteweb-test"/>
gwt.team.scottb5b5e6342007-02-22 21:34:23 +000092 <antcall target="test.hosted"/>
gwt.team.scottb5b5e6342007-02-22 21:34:23 +000093 <antcall target="test.web"/>
gwt.team.mmendez99f280b2006-12-08 23:11:29 +000094 </parallel>
gwt.team.bobv799633f2008-02-29 23:58:24 +000095 </limit>
gwt.team.mmendez99f280b2006-12-08 23:11:29 +000096 </target>
gwt.team.scottb14c5b9d2006-12-10 06:06:08 +000097
98 <target name="clean" description="Cleans this project's intermediate and output files">
99 <delete dir="${project.build}" />
100 <delete file="${project.lib}" />
101 </target>
102
103</project>