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