blob: eeb25966e53df5e87fab9291c4085a5c365c014b [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="" />
<!-- 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="" />
<!--
Test args can be specified per test target type.
-->
<property name="test.args.dev.remote" value="${test.args}" />
<property name="test.args.dev.selenium" value="${test.args}" />
<property name="test.args.web.remote" value="${test.args}" />
<property name="test.args.web.selenium" value="${test.args}" />
<!--
Only IFrameLinker actually supports -noserver mode; run the other linker
tests if and when they are supported
-->
<property name="gwt.junit.testcase.noserver.includes" value="**/IFrameLinkerTest.class" />
<property name="gwt.junit.testcase.noserver.excludes" value="" />
<!--
Run LayoutTest in CSS standards mode
-->
<property name="gwt.junit.testcase.standards.includes" value="**/LayoutTest.class" />
<property name="gwt.junit.testcase.standards.excludes" value="" />
<!--
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"/>
<!--
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}/cglib/cglib-2.2.jar"/>
<pathelement location="${gwt.tools.lib}/easymock/easymock.jar"/>
<pathelement location="${gwt.tools.lib}/easymock/easymockclassextension.jar"/>
<pathelement location="${gwt.tools.lib}/objectweb/asm-3.1.jar"/>
</path>
<!-- Platform shouldn't matter here, just picking one -->
<property.ensure name="gwt.dev.jar" location="${gwt.build.lib}/gwt-dev.jar" />
<target name="compile" description="Compile all class files"
unless="compile.complete">
<mkdir dir="${javac.out}" />
<gwt.javac>
<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.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.build}/out/dev/bin-test" />
<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}/selenium/selenium-java-client-driver.jar" />
<pathelement location="${gwt.tools.lib}/cglib/cglib-2.2.jar"/>
<pathelement location="${gwt.tools.lib}/easymock/easymock.jar"/>
<pathelement location="${gwt.tools.lib}/easymock/easymockclassextension.jar"/>
<pathelement location="${gwt.tools.lib}/objectweb/asm-3.1.jar"/>
<pathelement location="${gwt.dev.jar}" />
</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.jar" />
</gwt.jar>
</target>
<target name="checkstyle" description="Static analysis of source">
<gwt.checkstyle>
<fileset dir="src" />
<fileset dir="super/com/google/gwt/emul" />
<fileset dir="super/com/google/gwt/junit/translatable" />
</gwt.checkstyle>
</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} -out www -prod -runStyle RemoteWeb:${gwt.hosts.web.remote} -batch module"
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} -out www -runStyle RemoteWeb:${gwt.hosts.dev.remote} -batch module"
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} -out www -runStyle RemoteWeb:${gwt.hosts.dev.remote} -batch module"
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} -out www -runStyle "Selenium:${gwt.hosts.dev.selenium}" -batch module'
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}" />
<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} -draftCompile -prod -out www -runStyle RemoteWeb:${gwt.hosts.web.remote} -batch module"
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}" />
<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} -XdisableClassMetadata -prod -out www -runStyle RemoteWeb:${gwt.hosts.web.remote} -batch module"
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} -prod -out www -runStyle "Selenium:${gwt.hosts.web.selenium}" -batch module'
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} -out www -runStyle "Selenium:${gwt.hosts.dev.selenium}" -batch module'
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}" />
<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} -XdisableClassMetadata -prod -out www -runStyle "Selenium:${gwt.hosts.web.selenium}" -batch module'
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}" />
<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} -draftCompile -prod -out www -runStyle "Selenium:${gwt.hosts.web.selenium}" -batch module'
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}"
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}"
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.noserver"
depends="compile, compile.tests"
description="Run noserver tests for this project."
unless="test.noserver.disable">
<fileset id="test.noserver.tests" dir="${javac.junit.out}"
includes="${gwt.junit.testcase.noserver.includes}"
excludes="${gwt.junit.testcase.noserver.excludes}" />
<gwt.junit test.name="test.noserver"
test.args="${test.args} -prod -noserver"
test.out="${junit.out}/noserver" test.cases="test.noserver.tests">
<extraclasspaths>
<path refid="test.extraclasspath" />
</extraclasspaths>
</gwt.junit>
</target>
<target name="test.standards"
depends="compile, compile.tests"
description="Run standards mode tests for this project."
unless="test.standards.disable">
<fileset id="test.standards.tests" dir="${javac.junit.out}"
includes="${gwt.junit.testcase.standards.includes}"
excludes="${gwt.junit.testcase.standards.excludes}" />
<gwt.junit test.name="test.standards"
test.args="${test.args} -prod -XstandardsMode"
test.out="${junit.out}/standards" test.cases="test.standards.tests">
<extraclasspaths>
<path refid="test.extraclasspath" />
</extraclasspaths>
</gwt.junit>
</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"
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"
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"
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.noserver"/>
<!-- TODO(jlabanca): Enable htmlunit tests when they are stable. -->
<!-- <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"/> -->
<!-- TODO(rice) : Enable standards mode tests when they are stable. -->
<!-- <antcall target="test.standards"/> -->
</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"/>
<antcall target="test.noserver"/>
</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}">
<!-- disable HtmlUnit until it is reliable
<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}">
<!-- disable HtmlUnit until it is reliable
<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}">
<!-- disable HtmlUnit until it is reliable
<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}">
<!-- disable HtmlUnit until it is reliable
<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}">
<!-- disable HtmlUnit until it is reliable
<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>
<!--
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>