gwt.team.scottb | 14c5b9d | 2006-12-10 06:06:08 +0000 | [diff] [blame] | 1 | <project name="user" default="build" basedir="."> |
| 2 | <property name="gwt.root" location=".." /> |
| 3 | <property name="project.tail" value="user" /> |
gwt.team.bobv | 799633f | 2008-02-29 23:58:24 +0000 | [diff] [blame] | 4 | <property name="test.args" value="" /> |
gwt.team.scottb | 14c5b9d | 2006-12-10 06:06:08 +0000 | [diff] [blame] | 5 | <import file="${gwt.root}/common.ant.xml" /> |
| 6 | |
gwt.team.mmendez | 99f280b | 2006-12-08 23:11:29 +0000 | [diff] [blame] | 7 | <!-- |
| 8 | Default hosted mode test cases |
| 9 | --> |
gwt.team.mmendez | 764ec74 | 2007-03-20 19:36:54 +0000 | [diff] [blame] | 10 | <fileset id="default.hosted.tests" dir="${javac.junit.out}" |
gwt.team.bobv | 799633f | 2008-02-29 23:58:24 +0000 | [diff] [blame] | 11 | includes="${gwt.junit.testcase.includes}" /> |
gwt.team.mmendez | 99f280b | 2006-12-08 23:11:29 +0000 | [diff] [blame] | 12 | |
| 13 | <!-- |
| 14 | Default web mode test cases |
| 15 | --> |
gwt.team.mmendez | 764ec74 | 2007-03-20 19:36:54 +0000 | [diff] [blame] | 16 | <fileset id="default.web.tests" dir="${javac.junit.out}" |
gwt.team.bobv | 799633f | 2008-02-29 23:58:24 +0000 | [diff] [blame] | 17 | includes="${gwt.junit.testcase.includes}" /> |
gwt.team.mmendez | 99f280b | 2006-12-08 23:11:29 +0000 | [diff] [blame] | 18 | |
gwt.team.scottb | 14c5b9d | 2006-12-10 06:06:08 +0000 | [diff] [blame] | 19 | <!-- 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.scottb | c4700b8 | 2006-12-12 11:23:41 +0000 | [diff] [blame] | 22 | <target name="compile" description="Compile all class files"> |
gwt.team.scottb | 14c5b9d | 2006-12-10 06:06:08 +0000 | [diff] [blame] | 23 | <mkdir dir="${javac.out}" /> |
| 24 | <gwt.javac> |
| 25 | <classpath> |
gwt.team.scottb | c4700b8 | 2006-12-12 11:23:41 +0000 | [diff] [blame] | 26 | <pathelement location="${gwt.tools.lib}/tomcat/servlet-api-2.4.jar" /> |
gwt.team.scottb | 14c5b9d | 2006-12-10 06:06:08 +0000 | [diff] [blame] | 27 | <pathelement location="${gwt.tools.lib}/junit/junit-3.8.1.jar" /> |
gwt.team.mmendez | 4449b34 | 2007-04-10 19:41:44 +0000 | [diff] [blame] | 28 | <pathelement location="${gwt.tools.lib}/jfreechart/jfreechart-1.0.3.jar" /> |
gwt.team.scottb | 14c5b9d | 2006-12-10 06:06:08 +0000 | [diff] [blame] | 29 | <pathelement location="${gwt.dev.jar}" /> |
| 30 | </classpath> |
gwt.team.mmendez | 99f280b | 2006-12-08 23:11:29 +0000 | [diff] [blame] | 31 | </gwt.javac> |
| 32 | |
| 33 | <!-- Build the BrowserManagerServer_Stub to allow remote browser testing --> |
gwt.team.jat | f0a06d0 | 2007-01-03 18:51:15 +0000 | [diff] [blame] | 34 | <rmic base="${javac.out}" |
| 35 | classname="com.google.gwt.junit.remote.BrowserManagerServer" |
| 36 | stubversion="1.2"/> |
gwt.team.scottb | 14c5b9d | 2006-12-10 06:06:08 +0000 | [diff] [blame] | 37 | </target> |
gwt.team.mmendez | 99f280b | 2006-12-08 23:11:29 +0000 | [diff] [blame] | 38 | |
gwt.team.scottb | 9fba66c | 2006-12-11 18:50:42 +0000 | [diff] [blame] | 39 | <target name="compile.tests" description="Compiles the test code for this project"> |
gwt.team.mmendez | 99f280b | 2006-12-08 23:11:29 +0000 | [diff] [blame] | 40 | <mkdir dir="${javac.junit.out}" /> |
| 41 | <gwt.javac srcdir="test" destdir="${javac.junit.out}"> |
| 42 | <classpath> |
| 43 | <pathelement location="${javac.out}" /> |
gwt.team.scottb | e18b95c | 2006-12-21 22:35:49 +0000 | [diff] [blame] | 44 | <pathelement location="${gwt.tools.lib}/junit/junit-3.8.1.jar" /> |
gwt.team.mmendez | 99f280b | 2006-12-08 23:11:29 +0000 | [diff] [blame] | 45 | <pathelement location="${gwt.dev.staging.jar}" /> |
| 46 | </classpath> |
| 47 | </gwt.javac> |
| 48 | </target> |
gwt.team.scottb | 14c5b9d | 2006-12-10 06:06:08 +0000 | [diff] [blame] | 49 | |
| 50 | <target name="build" depends="compile" description="Build and package this project"> |
| 51 | <mkdir dir="${gwt.build.lib}" /> |
| 52 | <gwt.jar> |
gwt.team.scottb | b8fc337 | 2006-12-11 19:30:10 +0000 | [diff] [blame] | 53 | <fileset dir="src" excludes="**/package.html" /> |
| 54 | <fileset dir="super" excludes="**/package.html" /> |
gwt.team.scottb | 14c5b9d | 2006-12-10 06:06:08 +0000 | [diff] [blame] | 55 | <fileset dir="${javac.out}" /> |
gwt.team.scottb | c4700b8 | 2006-12-12 11:23:41 +0000 | [diff] [blame] | 56 | <zipfileset src="${gwt.tools.lib}/tomcat/servlet-api-2.4.jar" /> |
gwt.team.scottb | 14c5b9d | 2006-12-10 06:06:08 +0000 | [diff] [blame] | 57 | </gwt.jar> |
| 58 | </target> |
| 59 | |
| 60 | <target name="checkstyle" description="Static analysis of source"> |
| 61 | <gwt.checkstyle> |
gwt.team.scottb | 0ddceab | 2007-05-01 20:37:24 +0000 | [diff] [blame] | 62 | <fileset dir="src" /> |
gwt.team.scottb | 14c5b9d | 2006-12-10 06:06:08 +0000 | [diff] [blame] | 63 | <fileset dir="super/com/google/gwt/emul" /> |
| 64 | <fileset dir="super/com/google/gwt/junit/translatable" /> |
| 65 | </gwt.checkstyle> |
| 66 | </target> |
gwt.team.mmendez | 99f280b | 2006-12-08 23:11:29 +0000 | [diff] [blame] | 67 | |
gwt.team.bobv | 7704291 | 2008-03-01 02:06:01 +0000 | [diff] [blame] | 68 | <target name="remoteweb-test" description="Run a remoteweb test at the given host and path" if="gwt.remote.browsers"> |
gwt.team.bobv | 7704291 | 2008-03-01 02:06:01 +0000 | [diff] [blame] | 69 | <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.mmendez | 99f280b | 2006-12-08 23:11:29 +0000 | [diff] [blame] | 71 | </target> |
| 72 | |
gwt.team.scottb | 5b5e634 | 2007-02-22 21:34:23 +0000 | [diff] [blame] | 73 | <target name="test.hosted" depends="compile, compile.tests" description="Run only hosted-mode tests for this project."> |
gwt.team.bobv | 799633f | 2008-02-29 23:58:24 +0000 | [diff] [blame] | 74 | <gwt.junit test.args="${test.args}" test.out="${junit.out}/${build.host.platform}-hosted-mode" test.cases="default.hosted.tests" /> |
gwt.team.scottb | 5b5e634 | 2007-02-22 21:34:23 +0000 | [diff] [blame] | 75 | </target> |
| 76 | |
| 77 | <target name="test.web" depends="compile, compile.tests" description="Run only web-mode tests for this project."> |
gwt.team.bobv | 799633f | 2008-02-29 23:58:24 +0000 | [diff] [blame] | 78 | <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.scottb | 5b5e634 | 2007-02-22 21:34:23 +0000 | [diff] [blame] | 79 | </target> |
| 80 | |
gwt.team.scottb | 9fba66c | 2006-12-11 18:50:42 +0000 | [diff] [blame] | 81 | <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.mmendez | 99f280b | 2006-12-08 23:11:29 +0000 | [diff] [blame] | 83 | |
| 84 | <!-- |
| 85 | Run hosted and web mode tests for the platform on which this build |
| 86 | is executing |
| 87 | --> |
gwt.team.bobv | 799633f | 2008-02-29 23:58:24 +0000 | [diff] [blame] | 88 | <limit failonerror="true" hours="1"> |
| 89 | <parallel threadsPerProcessor="1"> |
gwt.team.bobv | 7704291 | 2008-03-01 02:06:01 +0000 | [diff] [blame] | 90 | <!-- remoteweb-test is a no-op unless gwt.remote.browsers is defined --> |
| 91 | <antcall target="remoteweb-test"/> |
gwt.team.scottb | 5b5e634 | 2007-02-22 21:34:23 +0000 | [diff] [blame] | 92 | <antcall target="test.hosted"/> |
gwt.team.scottb | 5b5e634 | 2007-02-22 21:34:23 +0000 | [diff] [blame] | 93 | <antcall target="test.web"/> |
gwt.team.mmendez | 99f280b | 2006-12-08 23:11:29 +0000 | [diff] [blame] | 94 | </parallel> |
gwt.team.bobv | 799633f | 2008-02-29 23:58:24 +0000 | [diff] [blame] | 95 | </limit> |
gwt.team.mmendez | 99f280b | 2006-12-08 23:11:29 +0000 | [diff] [blame] | 96 | </target> |
gwt.team.scottb | 14c5b9d | 2006-12-10 06:06:08 +0000 | [diff] [blame] | 97 | |
| 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> |