gwt.team.scottb | 14c5b9d | 2006-12-10 06:06:08 +0000 | [diff] [blame] | 1 | <project name="user" default="build" basedir="."> |
fabbott@google.com | 0e2dc628 | 2008-08-22 16:09:01 +0000 | [diff] [blame] | 2 | <property name="gwt.root" location=".." /> |
| 3 | <property name="project.tail" value="user" /> |
| 4 | <property name="test.args" value="" /> |
| 5 | <import file="${gwt.root}/common.ant.xml" /> |
gwt.team.scottb | 14c5b9d | 2006-12-10 06:06:08 +0000 | [diff] [blame] | 6 | |
fabbott@google.com | 0e2dc628 | 2008-08-22 16:09:01 +0000 | [diff] [blame] | 7 | <!-- |
| 8 | Default hosted mode test cases |
| 9 | --> |
| 10 | <fileset id="default.hosted.tests" dir="${javac.junit.out}" |
| 11 | includes="${gwt.junit.testcase.includes}" /> |
gwt.team.mmendez | 99f280b | 2006-12-08 23:11:29 +0000 | [diff] [blame] | 12 | |
scottb@google.com | 6cd61e9 | 2009-01-16 19:50:20 +0000 | [diff] [blame] | 13 | <fileset id="default.emma.tests" dir="${javac.junit.out}" |
| 14 | includes="**/EmmaClassLoadingTest.class" /> |
jgw@google.com | a3509e2 | 2009-02-06 21:06:24 +0000 | [diff] [blame] | 15 | |
| 16 | <fileset id="default.hosted.emma.tests" dir="${javac.junit.out}" |
| 17 | excludes="**/CoverageTest.class" includes="**/*Test.class" /> |
| 18 | <!-- everything succeeds except CoverageTest.java. It fails due to a javac bug in sun/OpenJDK's Java. See the file contents for details --> |
| 19 | |
fabbott@google.com | 0e2dc628 | 2008-08-22 16:09:01 +0000 | [diff] [blame] | 20 | <!-- |
| 21 | Default web mode test cases |
| 22 | --> |
| 23 | <fileset id="default.web.tests" dir="${javac.junit.out}" |
| 24 | includes="${gwt.junit.testcase.includes}" /> |
gwt.team.mmendez | 99f280b | 2006-12-08 23:11:29 +0000 | [diff] [blame] | 25 | |
fabbott@google.com | 0e2dc628 | 2008-08-22 16:09:01 +0000 | [diff] [blame] | 26 | <!-- Platform shouldn't matter here, just picking one --> |
| 27 | <property.ensure name="gwt.dev.jar" location="${gwt.build.lib}/gwt-dev-linux.jar" /> |
gwt.team.scottb | 14c5b9d | 2006-12-10 06:06:08 +0000 | [diff] [blame] | 28 | |
fabbott@google.com | 0e2dc628 | 2008-08-22 16:09:01 +0000 | [diff] [blame] | 29 | <target name="compile" description="Compile all class files"> |
| 30 | <mkdir dir="${javac.out}" /> |
| 31 | <gwt.javac> |
| 32 | <classpath> |
scottb@google.com | 4f57bc2 | 2009-01-16 22:46:42 +0000 | [diff] [blame] | 33 | <pathelement location="${gwt.tools.lib}/tomcat/servlet-api-2.5.jar" /> |
fabbott@google.com | 0e2dc628 | 2008-08-22 16:09:01 +0000 | [diff] [blame] | 34 | <pathelement location="${gwt.tools.lib}/junit/junit-3.8.1.jar" /> |
| 35 | <pathelement location="${gwt.tools.lib}/jfreechart/jfreechart-1.0.3.jar" /> |
| 36 | <pathelement location="${gwt.tools.lib}/selenium/selenium-java-client-driver.jar" /> |
| 37 | <pathelement location="${gwt.dev.jar}" /> |
| 38 | </classpath> |
| 39 | </gwt.javac> |
gwt.team.mmendez | 99f280b | 2006-12-08 23:11:29 +0000 | [diff] [blame] | 40 | |
fabbott@google.com | 0e2dc628 | 2008-08-22 16:09:01 +0000 | [diff] [blame] | 41 | <!-- Build the BrowserManagerServer_Stub to allow remote browser testing --> |
| 42 | <rmic base="${javac.out}" |
gwt.team.jat | f0a06d0 | 2007-01-03 18:51:15 +0000 | [diff] [blame] | 43 | classname="com.google.gwt.junit.remote.BrowserManagerServer" |
| 44 | stubversion="1.2"/> |
fabbott@google.com | 0e2dc628 | 2008-08-22 16:09:01 +0000 | [diff] [blame] | 45 | </target> |
gwt.team.mmendez | 99f280b | 2006-12-08 23:11:29 +0000 | [diff] [blame] | 46 | |
fabbott@google.com | 0e2dc628 | 2008-08-22 16:09:01 +0000 | [diff] [blame] | 47 | <!-- |
| 48 | Compile test code for dev/core to pick up TypeOracleTestUtils and others. |
| 49 | --> |
| 50 | <target name="compile.dev.core.tests" description="Compiles test dependencies in dev/core"> |
| 51 | <gwt.ant dir="../dev/core" target="compile.tests" /> |
| 52 | </target> |
| 53 | |
| 54 | <target name="compile.tests" depends="compile.dev.core.tests" description="Compiles the test code for this project"> |
| 55 | <mkdir dir="${javac.junit.out}" /> |
| 56 | <gwt.javac srcdir="test" excludes="com/google/gwt/langtest/**" destdir="${javac.junit.out}"> |
| 57 | <classpath> |
| 58 | <pathelement location="${javac.out}" /> |
| 59 | <pathelement location="${gwt.build}/out/dev/core/bin-test" /> |
scottb@google.com | 4f57bc2 | 2009-01-16 22:46:42 +0000 | [diff] [blame] | 60 | <pathelement location="${gwt.tools.lib}/tomcat/servlet-api-2.5.jar" /> |
fabbott@google.com | 0e2dc628 | 2008-08-22 16:09:01 +0000 | [diff] [blame] | 61 | <pathelement location="${gwt.tools.lib}/junit/junit-3.8.1.jar" /> |
| 62 | <pathelement location="${gwt.tools.lib}/selenium/selenium-java-client-driver.jar" /> |
scottb@google.com | 2e8ef32 | 2008-11-04 20:59:58 +0000 | [diff] [blame] | 63 | <pathelement location="${gwt.dev.jar}" /> |
fabbott@google.com | 0e2dc628 | 2008-08-22 16:09:01 +0000 | [diff] [blame] | 64 | </classpath> |
| 65 | </gwt.javac> |
| 66 | </target> |
gwt.team.scottb | 14c5b9d | 2006-12-10 06:06:08 +0000 | [diff] [blame] | 67 | |
fabbott@google.com | 0e2dc628 | 2008-08-22 16:09:01 +0000 | [diff] [blame] | 68 | <target name="build" depends="compile" description="Build and package this project"> |
| 69 | <mkdir dir="${gwt.build.lib}" /> |
| 70 | <gwt.jar> |
| 71 | <fileset dir="src" excludes="**/package.html" /> |
| 72 | <fileset dir="super" excludes="**/package.html" /> |
| 73 | <fileset dir="${javac.out}" /> |
scottb@google.com | 4f57bc2 | 2009-01-16 22:46:42 +0000 | [diff] [blame] | 74 | <zipfileset src="${gwt.tools.lib}/tomcat/servlet-api-2.5.jar" /> |
fabbott@google.com | 0e2dc628 | 2008-08-22 16:09:01 +0000 | [diff] [blame] | 75 | </gwt.jar> |
| 76 | </target> |
gwt.team.scottb | 14c5b9d | 2006-12-10 06:06:08 +0000 | [diff] [blame] | 77 | |
fabbott@google.com | 0e2dc628 | 2008-08-22 16:09:01 +0000 | [diff] [blame] | 78 | <target name="checkstyle" description="Static analysis of source"> |
| 79 | <gwt.checkstyle> |
| 80 | <fileset dir="src" /> |
| 81 | <fileset dir="super/com/google/gwt/emul" /> |
| 82 | <fileset dir="super/com/google/gwt/junit/translatable" /> |
| 83 | </gwt.checkstyle> |
| 84 | </target> |
gwt.team.mmendez | 99f280b | 2006-12-08 23:11:29 +0000 | [diff] [blame] | 85 | |
fabbott@google.com | 0e2dc628 | 2008-08-22 16:09:01 +0000 | [diff] [blame] | 86 | <target name="remoteweb-test" description="Run a remoteweb test at the given host and path" if="gwt.remote.browsers"> |
| 87 | <echo message="Performing remote browser testing at ${gwt.remote.browsers}" /> |
jat@google.com | e7f61a7 | 2008-12-24 00:45:21 +0000 | [diff] [blame] | 88 | <gwt.junit test.args="${test.args} -out www -remoteweb ${gwt.remote.browsers}" test.out="${junit.out}/remoteweb" test.cases="default.web.tests" > |
fabbott@google.com | 0e2dc628 | 2008-08-22 16:09:01 +0000 | [diff] [blame] | 89 | <extraclasspaths> |
| 90 | <pathelement location="${gwt.build}/out/dev/core/bin-test" /> |
| 91 | </extraclasspaths> |
| 92 | </gwt.junit> |
| 93 | </target> |
zundel@google.com | 29666c8 | 2008-06-04 16:07:53 +0000 | [diff] [blame] | 94 | |
fabbott@google.com | 0e2dc628 | 2008-08-22 16:09:01 +0000 | [diff] [blame] | 95 | <target name="selenium-test" description="Run a remote test using Selenium RC test at the given host and path" if="gwt.selenium.hosts"> |
| 96 | <echo message="Performing remote browser testing using Selenium RC at ${gwt.selenium.hosts}" /> |
jat@google.com | e7f61a7 | 2008-12-24 00:45:21 +0000 | [diff] [blame] | 97 | <gwt.junit test.args="${test.args} -out www -selenium ${gwt.selenium.hosts}" test.out="${junit.out}/selenium" test.cases="default.web.tests" > |
fabbott@google.com | 0e2dc628 | 2008-08-22 16:09:01 +0000 | [diff] [blame] | 98 | <extraclasspaths> |
| 99 | <pathelement location="${gwt.build}/out/dev/core/bin-test" /> |
| 100 | </extraclasspaths> |
| 101 | </gwt.junit> |
| 102 | </target> |
gwt.team.mmendez | 99f280b | 2006-12-08 23:11:29 +0000 | [diff] [blame] | 103 | |
jgw@google.com | a3509e2 | 2009-02-06 21:06:24 +0000 | [diff] [blame] | 104 | <target name="test.hosted.emma" depends="compile, compile.tests" description="Run all hosted-mode tests in emma mode."> |
| 105 | <gwt.junit test.args="${test.args}" test.out="${junit.out}/${build.host.platform}-hosted-mode" test.cases="default.hosted.emma.tests" > |
| 106 | <extraclasspaths> |
| 107 | <pathelement location="${gwt.build}/out/dev/core/bin-test" /> |
| 108 | <pathelement location="${gwt.tools.redist}/emma/emma.jar" /> |
| 109 | </extraclasspaths> |
| 110 | </gwt.junit> |
| 111 | </target> |
| 112 | |
fabbott@google.com | 0e2dc628 | 2008-08-22 16:09:01 +0000 | [diff] [blame] | 113 | <target name="test.hosted" depends="compile, compile.tests" description="Run only hosted-mode tests for this project."> |
jat@google.com | e7f61a7 | 2008-12-24 00:45:21 +0000 | [diff] [blame] | 114 | <gwt.junit test.args="${test.args}" test.out="${junit.out}/${build.host.platform}-hosted-mode" test.cases="default.hosted.tests" > |
fabbott@google.com | 0e2dc628 | 2008-08-22 16:09:01 +0000 | [diff] [blame] | 115 | <extraclasspaths> |
| 116 | <pathelement location="${gwt.build}/out/dev/core/bin-test" /> |
| 117 | </extraclasspaths> |
| 118 | </gwt.junit> |
scottb@google.com | 6cd61e9 | 2009-01-16 19:50:20 +0000 | [diff] [blame] | 119 | <gwt.junit test.args="${test.args}" test.out="${junit.out}/${build.host.platform}-hosted-mode-emma" test.cases="default.emma.tests" > |
| 120 | <extraclasspaths> |
| 121 | <pathelement location="${gwt.build}/out/dev/core/bin-test" /> |
| 122 | <pathelement location="${gwt.tools.redist}/emma/emma.jar" /> |
| 123 | </extraclasspaths> |
jgw@google.com | a3509e2 | 2009-02-06 21:06:24 +0000 | [diff] [blame] | 124 | </gwt.junit> |
fabbott@google.com | 0e2dc628 | 2008-08-22 16:09:01 +0000 | [diff] [blame] | 125 | </target> |
gwt.team.scottb | 5b5e634 | 2007-02-22 21:34:23 +0000 | [diff] [blame] | 126 | |
fabbott@google.com | 0e2dc628 | 2008-08-22 16:09:01 +0000 | [diff] [blame] | 127 | <target name="test.web" depends="compile, compile.tests" description="Run only web-mode tests for this project."> |
jat@google.com | e7f61a7 | 2008-12-24 00:45:21 +0000 | [diff] [blame] | 128 | <gwt.junit test.args="${test.args} -out www -web" test.out="${junit.out}/${build.host.platform}-web-mode" test.cases="default.web.tests" > |
fabbott@google.com | 0e2dc628 | 2008-08-22 16:09:01 +0000 | [diff] [blame] | 129 | <extraclasspaths> |
| 130 | <pathelement location="${gwt.build}/out/dev/core/bin-test" /> |
| 131 | </extraclasspaths> |
| 132 | </gwt.junit> |
| 133 | </target> |
gwt.team.scottb | 5b5e634 | 2007-02-22 21:34:23 +0000 | [diff] [blame] | 134 | |
bobv@google.com | 62773b1 | 2009-01-29 22:31:44 +0000 | [diff] [blame] | 135 | <target name="test.web.draft" depends="compile, compile.tests" description="Run only web-mode tests for this project."> |
| 136 | <gwt.junit test.args="${test.args} -draftCompile -out www -web" test.out="${junit.out}/${build.host.platform}-web-mode-draft" test.cases="default.web.tests" > |
| 137 | <extraclasspaths> |
| 138 | <pathelement location="${gwt.build}/out/dev/core/bin-test" /> |
| 139 | </extraclasspaths> |
| 140 | </gwt.junit> |
| 141 | </target> |
| 142 | |
fabbott@google.com | 0e2dc628 | 2008-08-22 16:09:01 +0000 | [diff] [blame] | 143 | <target name="test" depends="compile, compile.tests" description="Run hosted-mode, web-mode, remoteweb, and selenium tests for this project."> |
| 144 | <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] | 145 | |
fabbott@google.com | 0e2dc628 | 2008-08-22 16:09:01 +0000 | [diff] [blame] | 146 | <!-- |
| 147 | Run hosted and web mode tests for the platform on which this build |
| 148 | is executing |
| 149 | --> |
| 150 | <limit failonerror="true" hours="2"> |
| 151 | <parallel threadsPerProcessor="1"> |
| 152 | <!-- selenium-test is a no-op unless gwt.selenium.hosts is defined --> |
| 153 | <antcall target="selenium-test"/> |
| 154 | <!-- remoteweb-test is a no-op unless gwt.remote.browsers is defined --> |
| 155 | <antcall target="remoteweb-test"/> |
| 156 | <antcall target="test.hosted"/> |
| 157 | <antcall target="test.web"/> |
bobv@google.com | 62773b1 | 2009-01-29 22:31:44 +0000 | [diff] [blame] | 158 | <antcall target="test.web.draft"/> |
fabbott@google.com | 0e2dc628 | 2008-08-22 16:09:01 +0000 | [diff] [blame] | 159 | </parallel> |
| 160 | </limit> |
| 161 | </target> |
gwt.team.scottb | 14c5b9d | 2006-12-10 06:06:08 +0000 | [diff] [blame] | 162 | |
fabbott@google.com | 0e2dc628 | 2008-08-22 16:09:01 +0000 | [diff] [blame] | 163 | <target name="clean" description="Cleans this project's intermediate and output files"> |
| 164 | <delete dir="${project.build}" /> |
| 165 | <delete file="${project.lib}" /> |
| 166 | </target> |
jgw@google.com | a3509e2 | 2009-02-06 21:06:24 +0000 | [diff] [blame] | 167 | <target name="presubmit" depends="test, checkstyle" description="runs the gwt api checker, user checkstyle, and user tests"> |
| 168 | <gwt.ant dir=".." target="apicheck-nobuild"/> |
| 169 | </target> |
gwt.team.scottb | 14c5b9d | 2006-12-10 06:06:08 +0000 | [diff] [blame] | 170 | </project> |