blob: 0dfcaa26c5f19d0f05785a9c1796d81f0e266f72 [file] [log] [blame]
<project name="user" default="build" basedir=".">
<property name="gwt.root" location=".." />
<property name="project.tail" value="user" />
<property name="test.args" value="-ea" />
<property name="test.jvmargs" value="-ea" />
<!-- support old variables names -->
<condition property="gwt.hosts.web.remote" value="${gwt.remote.browsers}">
<isset property="gwt.remote.browsers" />
</condition>
<condition property="gwt.hosts.web.selenium" value="${gwt.selenium.hosts}">
<isset property="gwt.selenium.hosts" />
</condition>
<!--
BrowserManagerServer_Stub compiled using rmic, which doesn't generate
full source code
-->
<property name="emma.filter.exclude" value="*BrowserManagerServer_Stub*" />
<import file="${gwt.root}/common.ant.xml" />
<property name="test.timeout" value="4" />
<property name="emma.merged.out" value="${junit.out}/emma-coverage" />
<property name="gwt.junit.testcase.web.includes" value="${gwt.junit.testcase.includes}" />
<property name="gwt.junit.testcase.web.excludes" value="" />
<property name="gwt.junit.testcase.dev.includes" value="${gwt.junit.testcase.includes}" />
<property name="gwt.junit.testcase.dev.excludes" value="" />
<property name="benchmark.timeout" value="30" />
<property name="gwt.benchmark.testcase.web.includes" value="${gwt.benchmark.testcase.includes}" />
<property name="gwt.benchmark.testcase.web.excludes" value="${gwt.benchmark.testcase.excludes}" />
<!--
Test args can be specified per test target type.
-->
<property name="test.args.dev.remote" value="${test.args} -out www -standardsMode -runStyle RemoteWeb:${gwt.hosts.dev.remote}" />
<property name="test.args.dev.selenium" value='${test.args} -out www -standardsMode -runStyle "Selenium:${gwt.hosts.dev.selenium}"' />
<property name="test.args.web.remote" value="${test.args} -out www -prod -standardsMode -runStyle RemoteWeb:${gwt.hosts.web.remote}" />
<property name="test.args.web.selenium" value='${test.args} -prod -standardsMode -out www -runStyle "Selenium:${gwt.hosts.web.selenium}"' />
<!--
Whether I18NSuite should test e.g. Foo$InnerMsgs_fr.properties (if the
value is "dollar") or Foo_Inner_fr.properties (for "bar")
-->
<property name="gwt.i18n.test.InnerClassChar" value="dollar"/>
<!-- Platform shouldn't matter here, just picking one -->
<property.ensure name="gwt.dev.jar" location="${gwt.build.lib}/gwt-dev.jar" />
<!--
Classpaths added for test cases
-->
<path id="test.extraclasspath">
<pathelement location="${gwt.build}/out/dev/bin-test" />
<pathelement location="test-super" />
<pathelement location="test_i18n_${gwt.i18n.test.InnerClassChar}" />
<pathelement location="${gwt.tools.lib}/apache/log4j/log4j-1.2.16.jar" />
<pathelement location="${gwt.tools.lib}/cglib/cglib-2.2.jar"/>
<pathelement location="${gwt.tools.lib}/objenesis/objenesis-1.2.jar"/>
<pathelement location="${gwt.tools.lib}/easymock/easymock-3.0.jar"/>
<pathelement location="${gwt.tools.lib}/objectweb/asm-3.1.jar"/>
<pathelement location="${gwt.tools.lib}/javax/validation/validation-api-1.0.0.GA.jar" />
<pathelement location="${gwt.tools.lib}/javax/validation/validation-api-1.0.0.GA-sources.jar" />
<pathelement location="${gwt.tools.lib}/hibernate/validator/hibernate-validator-4.1.0.Final.jar" />
<pathelement location="${gwt.tools.lib}/hibernate/validator/hibernate-validator-4.1.0.Final-sources.jar" />
<pathelement location="${gwt.tools.lib}/slf4j/slf4j-api/slf4j-api-1.6.1.jar" />
<pathelement location="${gwt.tools.lib}/slf4j/slf4j-log4j12/slf4j-log4j12-1.6.1.jar" />
<pathelement location="${gwt.tools}/redist/json/r2_20080312/json-1.5.jar" />
<pathelement location="${gwt.dev.jar}" />
</path>
<target name="compile" description="Compile all class files"
unless="compile.complete">
<mkdir dir="${javac.out}" />
<gwt.javac excludes="**/super/**">
<classpath>
<pathelement location="${gwt.tools.lib}/tomcat/servlet-api-2.5.jar" />
<pathelement location="${gwt.tools.lib}/junit/junit-3.8.1.jar" />
<pathelement location="${gwt.tools.lib}/jfreechart/jfreechart-1.0.3.jar" />
<pathelement location="${gwt.tools.lib}/selenium/selenium-java-client-driver.jar" />
<pathelement location="${gwt.tools.lib}/w3c/sac/sac-1.3.jar" />
<pathelement location="${gwt.tools.lib}/w3c/flute/flute-1.3-gg1.jar" />
<pathelement location="${gwt.tools}/redist/json/r2_20080312/json-1.5.jar" />
<pathelement location="${gwt.tools.lib}/javax/validation/validation-api-1.0.0.GA.jar" />
<!-- The source is included so validation is available from client code -->
<pathelement location="${gwt.tools.lib}/javax/validation/validation-api-1.0.0.GA-sources.jar" />
<!-- Hibernate is included until we can provide the super source as an third party jar" -->
<pathelement location="${gwt.tools.lib}/hibernate/validator/hibernate-validator-4.1.0.Final.jar" />
<pathelement location="${gwt.tools.lib}/hibernate/validator/hibernate-validator-4.1.0.Final-sources.jar" />
<pathelement location="${gwt.dev.jar}" />
</classpath>
</gwt.javac>
<!-- Build the BrowserManagerServer_Stub to allow remote browser testing -->
<rmic base="${javac.out}"
classname="com.google.gwt.junit.remote.BrowserManagerServer"
stubversion="1.2"/>
</target>
<!--
Compile test code for dev to pick up TypeOracleTestUtils and others.
Compiles test dependencies in dev/core
-->
<target name="compile.dev.tests">
<gwt.ant dir="../dev" target="compile.tests" />
</target>
<!--
Compiles the test code for this project
-->
<target name="compile.tests"
depends="compile.dev.tests, compile.emma.if.enabled"
unless="compile.tests.complete">
<mkdir dir="${javac.junit.out}" />
<gwt.javac srcdir="test" excludes="com/google/gwt/langtest/**"
destdir="${javac.junit.out}">
<classpath>
<pathelement location="${javac.out}" />
<pathelement location="${gwt.tools.lib}/junit/junit-3.8.1.jar" />
<pathelement location="${gwt.tools.lib}/selenium/selenium-java-client-driver.jar" />
<path refid="test.extraclasspath" />
</classpath>
</gwt.javac>
</target>
<target name="build" depends="compile"
description="Build and package this project">
<mkdir dir="${gwt.build.lib}" />
<gwt.jar>
<fileset dir="src" excludes="**/package.html" />
<fileset dir="super" excludes="**/package.html" />
<fileset dir="${javac.out}" />
<zipfileset src="${gwt.tools.lib}/tomcat/servlet-api-2.5.jar" excludes="**/*.java"/>
<zipfileset src="${gwt.tools.lib}/w3c/sac/sac-1.3.jar" />
<zipfileset src="${gwt.tools.lib}/w3c/flute/flute-1.3-gg1.jar" />
</gwt.jar>
</target>
<target name="checkstyle" description="Static analysis of source">
<gwt.checkstyle>
<fileset dir="src" >
<exclude name="javax/validation/super/javax/validation/constraints/Pattern.java"/>
<exclude name="javax/validation/super/javax/validation/spi/ConfigurationState.java"/>
<exclude name="javax/validation/super/javax/validation/MessageInterpolator.java"/>
<exclude name="javax/validation/super/javax/validation/Configuration.java"/>
<exclude name="javax/validation/super/javax/validation/Validation.java"/>
<exclude name="org/hibernate/validator/super/org/hibernate/validator/**/*.java"/>
</fileset>
<fileset dir="super/com/google/gwt/emul" />
<fileset dir="super/com/google/gwt/junit/translatable" />
</gwt.checkstyle>
<gwt.checkstyle.tests>
<fileset dir="test">
<include name="com/google/**/*.java" />
<include name="test/**" />
</fileset>
</gwt.checkstyle.tests>
</target>
<target name="test.remoteweb" depends="test.web.remote">
<echo message="DEPRECATED: test.remoteweb has been renamed test.web.remote"/>
</target>
<target name="test.web.remote"
description="Run web test with remote browsers"
if="gwt.hosts.web.remote"
unless="test.web.remote.disable">
<echo message="Performing web remote testing at ${gwt.hosts.web.remote}" />
<property name="test.web.remote.args" value="${test.args.web.remote}" />
<fileset id="test.web.remote.tests" dir="${javac.junit.out}"
includes="${gwt.junit.testcase.web.includes}"
excludes="${gwt.junit.testcase.web.excludes}" />
<gwt.junit test.name="test.web.remote"
test.args="${test.web.remote.args}"
test.jvmargs="${test.jvmargs}"
test.out="${junit.out}/web-remote"
test.cases="test.web.remote.tests" >
<extraclasspaths>
<path refid="test.extraclasspath" />
</extraclasspaths>
</gwt.junit>
</target>
<target name="test.dev.remote"
depends="compile, compile.tests"
description="Run dev-mode tests with remote browsers"
if="gwt.hosts.dev.remote"
unless="test.dev.remote.disable">
<echo message="Performing dev-mode remote testing at ${gwt.remote.browsers}" />
<property name="test.dev.remote.args" value="${test.args.dev.remote}" />
<fileset id="test.dev.remote.tests" dir="${javac.junit.out}"
includes="${gwt.junit.testcase.dev.includes}"
excludes="${gwt.junit.testcase.dev.excludes}" />
<gwt.junit test.name="test.dev.remote"
test.args="${test.dev.remote.args}"
test.jvmargs="${test.jvmargs}"
test.out="${junit.out}/dev-remote" test.cases="test.dev.remote.tests" >
<extraclasspaths>
<path refid="test.extraclasspath" />
</extraclasspaths>
</gwt.junit>
</target>
<target name="test.emma.remote"
depends="compile, compile.tests"
description="Run emma tests with remote browsers"
if="gwt.hosts.dev.remote"
unless="test.emma.remote.disable">
<echo message="Performing emma remote testing at ${gwt.hosts.dev.remote}" />
<property name="test.emma.remote.args" value="${test.args.dev.remote}" />
<fileset id="test.emma.remote.tests" dir="${javac.junit.out}"
includes="${gwt.junit.testcase.dev.includes}"
excludes="${gwt.junit.testcase.dev.excludes}" />
<gwt.junit test.name="test.emma.remote"
test.args="${test.emma.remote.args}"
test.jvmargs="${test.jvmargs}"
test.out="${junit.out}/emma-remote"
test.cases="test.emma.remote.tests" >
<extraclasspaths>
<path refid="test.extraclasspath" />
<pathelement location="${gwt.tools.redist}/emma/emma.jar" />
</extraclasspaths>
</gwt.junit>
</target>
<target name="test.emma.selenium"
depends="compile, compile.tests"
description="Run emma tests with Selenium-RC servers"
if="gwt.hosts.dev.selenium"
unless="test.emma.selenium.disable">
<echo message="Performing emma selenium testing at ${gwt.hosts.dev.selenium}" />
<property name="test.emma.selenium.args" value="${test.args.dev.selenium}" />
<fileset id="test.emma.selenium.tests" dir="${javac.junit.out}"
includes="${gwt.junit.testcase.dev.includes}"
excludes="${gwt.junit.testcase.dev.excludes}" />
<gwt.junit test.name="test.emma.selenium"
test.args='${test.emma.selenium.args}'
test.jvmargs="${test.jvmargs}"
test.out="${junit.out}/emma-selenium"
test.cases="test.emma.selenium.tests" >
<extraclasspaths>
<path refid="test.extraclasspath" />
<pathelement location="${gwt.tools.redist}/emma/emma.jar" />
</extraclasspaths>
</gwt.junit>
</target>
<target name="test.draft.remote"
depends="compile, compile.tests"
description="Run draft compiled tests with remote browsers"
if="gwt.hosts.web.remote"
unless="test.draft.remote.disable">
<echo message="Performing draft remote testing at ${gwt.hosts.web.remote}" />
<property name="test.draft.remote.args" value="${test.args.web.remote} -draftCompile" />
<fileset id="test.draft.remote.tests" dir="${javac.junit.out}"
includes="${gwt.junit.testcase.web.includes}"
excludes="${gwt.junit.testcase.web.excludes}" />
<gwt.junit test.name="test.draft.remote"
test.args="${test.draft.remote.args}"
test.jvmargs="${test.jvmargs}"
test.out="${junit.out}/draft-remote"
test.cases="test.draft.remote.tests" >
<extraclasspaths>
<path refid="test.extraclasspath" />
</extraclasspaths>
</gwt.junit>
</target>
<target name="test.nometa.remote"
description="Run -XdisableClassMetadata tests with remote browsers"
if="gwt.hosts.web.remote"
unless="test.nometa.remote.disable">
<echo message="Performing nometa remote testing at ${gwt.hosts.web.remote}" />
<property name="test.nometa.remote.args" value="${test.args.web.remote} -XdisableClassMetadata" />
<fileset id="test.nometa.remote.tests" dir="${javac.junit.out}"
includes="${gwt.junit.testcase.web.includes}"
excludes="${gwt.junit.testcase.web.excludes}" />
<gwt.junit test.name="test.nometa.remote"
test.args="${test.nometa.remote.args}"
test.jvmargs="${test.jvmargs}"
test.out="${junit.out}/nometa-remote"
test.cases="test.nometa.remote.tests" >
<extraclasspaths>
<path refid="test.extraclasspath" />
</extraclasspaths>
</gwt.junit>
</target>
<target name="test.selenium" depends="test.web.selenium">
<echo message="DEPRECATED: test.selenium has been renamed test.web.selenium"/>
</target>
<target name="test.web.selenium"
depends="compile, compile.tests"
description="Run web tests using Selenium RC"
if="gwt.hosts.web.selenium"
unless="test.web.selenium.disable">
<echo message="Performing web testing using Selenium RC at ${gwt.hosts.web.selenium}" />
<property name="test.web.selenium.args" value="${test.args.web.selenium}" />
<fileset id="test.web.selenium.tests" dir="${javac.junit.out}"
includes="${gwt.junit.testcase.web.includes}"
excludes="${gwt.junit.testcase.web.excludes}" />
<gwt.junit test.name="test.web.selenium"
test.args='${test.web.selenium.args}'
test.jvmargs="${test.jvmargs}"
test.out="${junit.out}/web-selenium"
test.cases="test.web.selenium.tests" >
<extraclasspaths>
<path refid="test.extraclasspath" />
</extraclasspaths>
</gwt.junit>
</target>
<target name="test.dev.selenium"
depends="compile, compile.tests"
description="Run dev-mode tests using Selenium RC servers"
if="gwt.hosts.dev.selenium"
unless="test.dev.selenium.disable">
<echo message="Performing dev-mode testing using Selenium RC at ${gwt.hosts.dev.selenium}" />
<property name="test.dev.selenium.args" value="${test.args.dev.selenium}" />
<fileset id="test.dev.selenium.tests" dir="${javac.junit.out}"
includes="${gwt.junit.testcase.dev.includes}"
excludes="${gwt.junit.testcase.dev.excludes}" />
<gwt.junit test.name="test.dev.selenium"
test.args='${test.dev.selenium.args}'
test.jvmargs="${test.jvmargs}"
test.out="${junit.out}/dev-selenium"
test.cases="test.dev.selenium.tests" >
<extraclasspaths>
<path refid="test.extraclasspath" />
</extraclasspaths>
</gwt.junit>
</target>
<target name="test.nometa.selenium"
description="Run nometa tests using Selenium RC"
if="gwt.hosts.web.selenium"
unless="test.nometa.selenium.disable">
<echo message="Performing nometa testing using Selenium RC at ${gwt.hosts.web.selenium}" />
<property name="test.nometa.selenium.args"
value="${test.args.web.selenium} -XdisableClassMetadata" />
<fileset id="test.nometa.selenium.tests" dir="${javac.junit.out}"
includes="${gwt.junit.testcase.web.includes}"
excludes="${gwt.junit.testcase.web.excludes}" />
<gwt.junit test.name="test.nometa.selenium"
test.args='${test.nometa.selenium.args}'
test.jvmargs="${test.jvmargs}"
test.out="${junit.out}/nometa-selenium"
test.cases="test.nometa.selenium.tests" >
<extraclasspaths>
<path refid="test.extraclasspath" />
</extraclasspaths>
</gwt.junit>
</target>
<target name="test.draft.selenium"
description="Run draft compiled tests using Selenium RC"
if="gwt.hosts.web.selenium"
unless="test.draft.selenium.disable">
<echo message="Performing draft testing using Selenium RC at ${gwt.hosts.web.selenium}" />
<property name="test.draft.selenium.args"
value="${test.args.web.selenium} -draftCompile" />
<fileset id="test.draft.selenium.tests" dir="${javac.junit.out}"
includes="${gwt.junit.testcase.web.includes}"
excludes="${gwt.junit.testcase.web.excludes}" />
<gwt.junit test.name="test.draft.selenium"
test.args='${test.draft.selenium.args}'
test.jvmargs="${test.jvmargs}"
test.out="${junit.out}/draft-selenium"
test.cases="test.draft.selenium.tests" >
<extraclasspaths>
<path refid="test.extraclasspath" />
</extraclasspaths>
</gwt.junit>
</target>
<target name="test.emma.htmlunit"
depends="compile, compile.tests"
description="Run emma tests with HtmlUnit"
unless="test.emma.htmlunit.disable">
<fileset id="test.emma.htmlunit.tests" dir="${javac.junit.out}"
includes="${gwt.junit.testcase.dev.includes}"
excludes="${gwt.junit.testcase.dev.excludes}" />
<gwt.junit test.name="test.emma.htmlunit"
test.args="${test.args} -standardsMode "
test.jvmargs="${test.jvmargs}"
test.out="${junit.out}/emma-htmlunit"
test.cases="test.emma.htmlunit.tests" >
<extraclasspaths>
<path refid="test.extraclasspath" />
<pathelement location="${gwt.tools.redist}/emma/emma.jar" />
</extraclasspaths>
</gwt.junit>
</target>
<target name="test.dev.htmlunit"
depends="compile, compile.tests"
description="Run dev-mode tests with HtmlUnit."
unless="test.dev.htmlunit.disable">
<fileset id="test.dev.htmlunit.tests" dir="${javac.junit.out}"
includes="${gwt.junit.testcase.dev.includes}"
excludes="${gwt.junit.testcase.dev.excludes}" />
<gwt.junit test.name="test.dev.htmlunit"
test.args="${test.args} -standardsMode "
test.jvmargs="${test.jvmargs}"
test.out="${junit.out}/dev-htmlunit"
test.cases="test.dev.htmlunit.tests" >
<extraclasspaths>
<path refid="test.extraclasspath" />
</extraclasspaths>
</gwt.junit>
</target>
<target name="test.hosted.emma" depends="test.emma">
<echo message="DEPRECATED: test.hosted.emma has been renamed test.emma"/>
</target>
<target name="test.hosted" depends="test.dev">
<echo message="DEPRECATED: test.hosted has been renamed test.dev"/>
</target>
<target name="test.web.htmlunit"
depends="compile, compile.tests"
description="Run web-mode tests with HtmlUnit."
unless="test.web.htmlunit.disable">
<fileset id="test.web.htmlunit.tests" dir="${javac.junit.out}"
includes="${gwt.junit.testcase.web.includes}"
excludes="${gwt.junit.testcase.web.excludes}" />
<gwt.junit test.name="test.web.htmlunit"
test.args="${test.args} -out www -prod -standardsMode"
test.jvmargs="${test.jvmargs}"
test.out="${junit.out}/web-htmlunit"
test.cases="test.web.htmlunit.tests">
<extraclasspaths>
<path refid="test.extraclasspath" />
</extraclasspaths>
</gwt.junit>
</target>
<target name="test.nometa.htmlunit"
depends="compile, compile.tests"
description="Run -XdisableClassMetadata tests with HtmlUnit."
unless="test.nometa.htmlunit.disable">
<fileset id="test.nometa.htmlunit.tests" dir="${javac.junit.out}"
includes="${gwt.junit.testcase.web.includes}"
excludes="${gwt.junit.testcase.web.excludes}" />
<gwt.junit test.name="test.nometa.htmlunit"
test.args="${test.args} -XdisableClassMetadata -out www -prod -standardsMode"
test.jvmargs="${test.jvmargs}"
test.out="${junit.out}/nometa-htmlunit"
test.cases="test.nometa.htmlunit.tests" >
<extraclasspaths>
<path refid="test.extraclasspath" />
</extraclasspaths>
</gwt.junit>
</target>
<target name="test.draft.htmlunit"
depends="compile, compile.tests"
description="Run draft compiled HtmlUnit tests (no batching on purpose)"
unless="test.draft.htmlunit.disable">
<fileset id="test.draft.htmlunit.tests" dir="${javac.junit.out}"
includes="${gwt.junit.testcase.web.includes}"
excludes="${gwt.junit.testcase.web.excludes}" />
<gwt.junit test.name="test.draft.htmlunit"
test.args="${test.args} -draftCompile -out www -prod -standardsMode"
test.jvmargs="${test.jvmargs}"
test.out="${junit.out}/draft-htmlunit"
test.cases="test.draft.htmlunit.tests" >
<extraclasspaths>
<path refid="test.extraclasspath" />
</extraclasspaths>
</gwt.junit>
</target>
<target name="test"
depends="compile, compile.tests"
description="Run all tests for this project.">
<!-- Prevent compilation for every target. -->
<property name="compile.complete" value="true"/>
<property name="compile.tests.complete" value="true"/>
<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." />
<limit failonerror="true" hours="${test.timeout}">
<parallel threadsPerProcessor="${gwt.threadsPerProcessor}"
threadCount="${gwt.threadCount}">
<!--
The remote targets must be run sequentially or BrowserManager will queue
requests, which will cause some tests to timeout while waiting.
-->
<sequential>
<antcall target="test.dev.remote"/>
<antcall target="test.emma.remote"/>
<antcall target="test.web.remote"/>
<antcall target="test.draft.remote"/>
<antcall target="test.nometa.remote"/>
</sequential>
<antcall target="test.dev.selenium"/>
<antcall target="test.emma.selenium"/>
<antcall target="test.web.selenium"/>
<antcall target="test.draft.selenium"/>
<antcall target="test.nometa.selenium"/>
<antcall target="test.dev.htmlunit"/>
<antcall target="test.emma.htmlunit"/>
<antcall target="test.web.htmlunit"/>
<antcall target="test.draft.htmlunit"/>
<antcall target="test.nometa.htmlunit"/>
</parallel>
</limit>
</target>
<target name="test.htmlunit"
depends="compile, compile.tests"
description="Run all HtmlUnit tests">
<!-- Prevent compilation for every target. -->
<property name="compile.complete" value="true"/>
<property name="compile.tests.complete" value="true"/>
<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." />
<limit failonerror="true" hours="${test.timeout}">
<parallel threadsPerProcessor="${gwt.threadsPerProcessor}"
threadCount="${gwt.threadCount}">
<antcall target="test.dev.htmlunit"/>
<antcall target="test.emma.htmlunit"/>
<antcall target="test.web.htmlunit"/>
<antcall target="test.draft.htmlunit"/>
<antcall target="test.nometa.htmlunit"/>
</parallel>
</limit>
</target>
<target name="test.dev"
depends="compile, compile.tests"
description="Run dev-mode tests for this project.">
<!-- Prevent compilation for every target. -->
<property name="compile.complete" value="true"/>
<property name="compile.tests.complete" value="true"/>
<limit failonerror="true" hours="${test.timeout}">
<parallel threadsPerProcessor="${gwt.threadsPerProcessor}"
threadCount="${gwt.threadCount}">
<antcall target="test.dev.htmlunit"/>
<!-- no-op unless gwt.hosts.dev.remote is defined -->
<antcall target="test.dev.remote"/>
<!-- no-op unless gwt.hosts.dev.selenium is defined -->
<antcall target="test.dev.selenium"/>
</parallel>
</limit>
</target>
<target name="test.web"
depends="compile, compile.tests"
description="Run web-mode tests for this project.">
<!-- Prevent compilation for every target. -->
<property name="compile.complete" value="true"/>
<property name="compile.tests.complete" value="true"/>
<limit failonerror="true" hours="${test.timeout}">
<parallel threadsPerProcessor="${gwt.threadsPerProcessor}"
threadCount="${gwt.threadCount}">
<antcall target="test.web.htmlunit"/>
<!-- no-op unless gwt.hosts.web.remote is defined -->
<antcall target="test.web.remote"/>
<!-- no-op unless gwt.hosts.web.selenium is defined -->
<antcall target="test.web.selenium"/>
</parallel>
</limit>
</target>
<target name="test.emma"
depends="compile, compile.tests"
description="Run emma tests for this project.">
<!-- Prevent compilation for every target. -->
<property name="compile.complete" value="true"/>
<property name="compile.tests.complete" value="true"/>
<limit failonerror="true" hours="${test.timeout}">
<parallel threadsPerProcessor="${gwt.threadsPerProcessor}"
threadCount="${gwt.threadCount}">
<antcall target="test.emma.htmlunit"/>
<!-- no-op unless gwt.hosts.dev.remote is defined -->
<antcall target="test.emma.remote"/>
<!-- no-op unless gwt.hosts.dev.selenium is defined -->
<antcall target="test.emma.selenium"/>
</parallel>
</limit>
</target>
<target name="test.draft"
depends="compile, compile.tests"
description="Run draft compiled tests for this project.">
<!-- Prevent compilation for every target. -->
<property name="compile.complete" value="true"/>
<property name="compile.tests.complete" value="true"/>
<limit failonerror="true" hours="${test.timeout}">
<parallel threadsPerProcessor="${gwt.threadsPerProcessor}"
threadCount="${gwt.threadCount}">
<antcall target="test.draft.htmlunit"/>
<!-- no-op unless gwt.hosts.web.remote is defined -->
<antcall target="test.draft.remote"/>
<!-- no-op unless gwt.hosts.web.selenium is defined -->
<antcall target="test.draft.selenium"/>
</parallel>
</limit>
</target>
<target name="test.nometa"
depends="compile, compile.tests"
description="Run -XdisableClassMetadata tests for this project.">
<!-- Prevent compilation for every target. -->
<property name="compile.complete" value="true"/>
<property name="compile.tests.complete" value="true"/>
<limit failonerror="true" hours="${test.timeout}">
<parallel threadsPerProcessor="${gwt.threadsPerProcessor}"
threadCount="${gwt.threadCount}">
<antcall target="test.web.htmlunit"/>
<!-- no-op unless gwt.hosts.web.remote is defined -->
<antcall target="test.nometa.remote"/>
<!-- no-op unless gwt.hosts.web.selenium is defined -->
<antcall target="test.nometa.selenium"/>
</parallel>
</limit>
</target>
<target name="benchmark"
description="Run all benchmarks for this project.">
<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." />
<limit failonerror="true" hours="${benchmark.timeout}">
<!-- no-op unless gwt.hosts.web.remote is defined -->
<antcall target="benchmark.web.remote"/>
<!-- no-op unless gwt.hosts.web.selenium is defined -->
<antcall target="benchmark.web.selenium"/>
<antcall target="benchmark.web.htmlunit"/>
</limit>
</target>
<target name="benchmark.web.htmlunit"
depends="compile, compile.tests"
description="Run web-mode benchmarks with HtmlUnit."
unless="benchmark.web.htmlunit.disable">
<fileset id="benchmark.web.htmlunit.tests" dir="${javac.junit.out}"
includes="${gwt.benchmark.testcase.web.includes}"
excludes="${gwt.benchmark.testcase.web.excludes}" />
<gwt.junit test.name="benchmark.web.htmlunit"
test.args="${test.args} -testMethodTimeout ${benchmark.timeout} -out www -prod -standardsMode"
test.jvmargs="${test.jvmargs}"
test.out="${junit.out}/web-htmlunit-benchmark"
test.cases="benchmark.web.htmlunit.tests" >
<extraclasspaths>
<path refid="test.extraclasspath" />
</extraclasspaths>
</gwt.junit>
</target>
<target name="benchmark.web.selenium"
depends="compile, compile.tests"
description="Run web benchmark using Selenium RC"
if="gwt.hosts.web.selenium"
unless="benchmark.web.selenium.disable">
<echo message="Performing web benchmarking using Selenium RC at ${gwt.hosts.web.selenium}" />
<property name="test.web.selenium.args" value="${test.args.web.selenium}" />
<fileset id="benchmark.web.selenium.tests" dir="${javac.junit.out}"
includes="${gwt.benchmark.testcase.web.includes}"
excludes="${gwt.benchmark.testcase.web.excludes}" />
<gwt.junit test.name="benchmark.web.selenium"
test.args='${test.web.selenium.args} -testMethodTimeout ${benchmark.timeout}'
test.jvmargs="${test.jvmargs}"
test.out="${junit.out}/web-selenium-benchmark"
test.cases="benchmark.web.selenium.tests" >
<extraclasspaths>
<path refid="test.extraclasspath" />
</extraclasspaths>
</gwt.junit>
</target>
<target name="benchmark.web.remote"
depends="compile, compile.tests"
description="Run web benchmarks with remote browsers"
if="gwt.hosts.web.remote"
unless="benchmark.web.remote.disable">
<echo message="Performing web remote benchmarking at ${gwt.hosts.web.remote}" />
<property name="test.web.remote.args" value="${test.args.web.remote}" />
<fileset id="benchmark.web.remote.tests" dir="${javac.junit.out}"
includes="${gwt.benchmark.testcase.web.includes}"
excludes="${gwt.benchmark.testcase.web.excludes}" />
<gwt.junit test.name="benchmark.web.remote"
test.args="${test.web.remote.args} -testMethodTimeout ${benchmark.timeout}"
test.jvmargs="${test.jvmargs}"
test.out="${junit.out}/web-remote-benchmark"
test.cases="benchmark.web.remote.tests" >
<extraclasspaths>
<path refid="test.extraclasspath" />
</extraclasspaths>
</gwt.junit>
</target>
<!--
Merges coverage data for the entire project
-->
<target name="emma.merge">
<delete dir="${emma.merged.out}" />
<mkdir dir="${emma.merged.out}" />
<emma>
<merge outfile="${emma.merged.out}/merged.emma" >
<fileset dir="${junit.out}" >
<include name="**/*.emma" />
<exclude name="${emma.merged.out}/merged.emma" />
</fileset>
</merge>
</emma>
<emma>
<report sourcepath="${project.classpath.src}">
<fileset file="${javac.emma.out}/metadata.emma" />
<fileset file="${emma.merged.out}/merged.emma" />
<txt outfile="${emma.merged.out}/coverage.txt" />
<html outfile="${emma.merged.out}/coverage.html" />
<xml outfile="${emma.merged.out}/coverage.xml" />
</report>
</emma>
</target>
<target name="clean"
description="Cleans this project's intermediate and output files">
<delete dir="${project.build}" />
<delete file="${project.lib}" />
</target>
<target name="presubmit" depends="test, checkstyle"
description="runs the gwt api checker, user checkstyle, and user tests">
<gwt.ant dir=".." target="apicheck-nobuild"/>
</target>
</project>