blob: 18ce227b6a7beaab0b03ac7c88ea1563214ed126 [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.selenium" value="${gwt.selenium.hosts}">
<isset property="gwt.selenium.hosts"/>
</condition>
<import file="${gwt.root}/common.ant.xml"/>
<property name="test.timeout" value="5"/>
<property name="emma.merged.out" value="${junit.out}/emma-coverage"/>
<property name="gwt.junit.testcase.web.includes" value="${gwt.junit.testcase.includes}"/>
<condition property="gwt.junit.testcase.web.excludes"
value="**/*JreSuite.class,**/OptimizedOnly*,**/*Java8Suite.class"
else="**/*JreSuite.class,**/OptimizedOnly*">
<isfalse value="${isJava8}" />
</condition>
<property name="gwt.junit.testcase.dev.includes" value="${gwt.junit.testcase.includes}"/>
<condition property="gwt.junit.testcase.dev.excludes"
value="**/JSONSuite.class,**/RunAsyncSuite.class,**/*CompilerSuite.class,**/*JsInteropSuite.class,**/*JreSuite.class,**/OptimizedOnly*,**/*Java8Suite.class"
else="**/JSONSuite.class,**/RunAsyncSuite.class,**/*CompilerSuite.class,**/*JsInteropSuite.class,**/*JreSuite.class,**/OptimizedOnly*">
<isfalse value="${isJava8}" />
</condition>
<property name="gwt.tck.testcase.dev.includes"
value="com/google/gwt/validation/tck/**/*GwtSuite.class"/>
<property name="gwt.tct.testcase.dev.excludes" value=""/>
<property name="gwt.nongwt.testcase.includes" value="**/*JreSuite.class"/>
<property name="gwt.nongwt.testcase.excludes" value=""/>
<!--
Test args can be specified per test target type.
-->
<property name="test.args.dev.selenium"
value='${test.args} -devMode -out www -runStyle "Selenium:${gwt.hosts.dev.selenium}"'/>
<property name="test.args.web.selenium"
value='${test.args} -prod -out www -generateJsInteropExports -runStyle "Selenium:${gwt.hosts.web.selenium}"'/>
<property name="test.args.web.htmlunit"
value='${test.args} -prod -out www -generateJsInteropExports -batch module'/>
<!--
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.17.jar"/>
<pathelement location="${gwt.tools.lib}/cglib/cglib-3.1.jar"/>
<pathelement location="${gwt.tools.lib}/mockito/1.9.5/mockito-all-1.9.5.jar"/>
<pathelement location="${gwt.tools.lib}/objenesis/objenesis-1.2.jar"/>
<pathelement location="${gwt.tools.lib}/objectweb/asm-5.0.3/lib/asm-all-5.0.3.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.7.12.jar"/>
<pathelement location="${gwt.tools.lib}/slf4j/slf4j-log4j12/slf4j-log4j12-1.7.12.jar"/>
<pathelement
location="${gwt.tools.lib}/streamhtmlparser/streamhtmlparser-jsilver-r10/streamhtmlparser-jsilver-r10-1.5-rebased.jar"/>
<!-- TCK jars -->
<pathelement
location="${gwt.tools.lib}/hibernate/validator/tck/jsr303-tck-1.0.3.GA-sources.jar"/>
<pathelement location="${gwt.tools.lib}/hibernate/validator/tck/jsr303-tck-1.0.3.GA.jar"/>
<pathelement
location="${gwt.tools.lib}/jboss/test-audit/jboss-test-audit-api-1.0.0-sources.jar"/>
<pathelement location="${gwt.tools.lib}/jboss/test-audit/jboss-test-audit-api-1.0.0.jar"/>
<pathelement
location="${gwt.tools.lib}/jboss/test-harness/jboss-test-harness-1.0.0-sources.jar"/>
<pathelement location="${gwt.tools.lib}/jboss/test-harness/jboss-test-harness-1.0.0.jar"/>
<pathelement
location="${gwt.tools.lib}/jboss/test-harness/jboss-test-harness-api-1.0.0-sources.jar"/>
<pathelement location="${gwt.tools.lib}/jboss/test-harness/jboss-test-harness-api-1.0.0.jar"/>
<pathelement location="${gwt.tools.lib}/testng/testng-5.14.1-sources.jar"/>
<pathelement location="${gwt.tools.lib}/testng/testng-5.14.1-nojunit.jar"/>
<pathelement location="${gwt.dev.jar}"/>
<pathelement location="${gwt.tools.lib}/gss/2015-11-04/closure-stylesheets-library-20151104-rebased.jar"/>
</path>
<target name="compile" description="Compile all class files"
unless="compile.complete">
<mkdir dir="${javac.out}"/>
<gwt.javac excludes="**/EmulatedCharset.java,**/HashCodes.java,**/ConsoleLogger.java,**/NativeRegExp.java,**/SuperDevModeLogger.java">
<src path="super/com/google/gwt/emul/javaemul/internal"/>
<compilerarg value="-Xep:MissingCasesInEnumSwitch:OFF" compiler="com.google.errorprone.ErrorProneAntCompilerAdapter"/>
<compilerarg value="-Xep:SelfComparison:OFF" compiler="com.google.errorprone.ErrorProneAntCompilerAdapter"/>
<compilerarg value="-Xep:SelfEquals:OFF" compiler="com.google.errorprone.ErrorProneAntCompilerAdapter"/>
<compilerarg value="-Xep:FallThrough:OFF" compiler="com.google.errorprone.ErrorProneAntCompilerAdapter"/>
<compilerarg value="-Xep:ReturnValueIgnored:OFF" compiler="com.google.errorprone.ErrorProneAntCompilerAdapter"/>
<compilerarg value="-Xep:EqualsIncompatibleType:OFF" compiler="com.google.errorprone.ErrorProneAntCompilerAdapter"/>
<classpath>
<pathelement location="${gwt.tools.lib}/gss/2015-10-07/closure-stylesheets-library-20151007-rebased.jar"/>
<pathelement location="${gwt.tools.lib}/gss/2015-11-04/closure-stylesheets-library-20151104-rebased.jar"/>
<pathelement location="${gwt.tools.lib}/tomcat/tomcat-servlet-api-8.0.28.jar"/>
<pathelement location="${gwt.tools.lib}/junit/junit-4.8.2.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-gg2.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.tools.lib}/streamhtmlparser/streamhtmlparser-jsilver-r10/streamhtmlparser-jsilver-r10-1.5-rebased.jar"/>
<pathelement location="${gwt.dev.jar}"/>
</classpath>
</gwt.javac>
</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.tests.java7, -compile.tests.java8"
unless="compile.tests.complete">
</target>
<target name="-compile.tests.java7"
depends="compile.dev.tests, compile.emma.if.enabled">
<mkdir dir="${javac.junit.out}"/>
<gwt.javac srcdir="test" destdir="${javac.junit.out}"
excludes="com/google/gwt/langtest/**,**/super/**,**/java8/**,**/*Java8Suite.java">
<compilerarg value="-Xep:MissingCasesInEnumSwitch:OFF" compiler="com.google.errorprone.ErrorProneAntCompilerAdapter"/>
<compilerarg value="-Xep:SelfComparison:OFF" compiler="com.google.errorprone.ErrorProneAntCompilerAdapter"/>
<compilerarg value="-Xep:SelfEquals:OFF" compiler="com.google.errorprone.ErrorProneAntCompilerAdapter"/>
<compilerarg value="-Xep:FallThrough:OFF" compiler="com.google.errorprone.ErrorProneAntCompilerAdapter"/>
<compilerarg value="-Xep:ReturnValueIgnored:OFF" compiler="com.google.errorprone.ErrorProneAntCompilerAdapter"/>
<compilerarg value="-Xep:EqualsIncompatibleType:OFF" compiler="com.google.errorprone.ErrorProneAntCompilerAdapter"/>
<compilerarg value="-Xep:IdentityBinaryExpression:OFF" compiler="com.google.errorprone.ErrorProneAntCompilerAdapter"/>
<compilerarg value="-Xep:LoopConditionChecker:OFF" compiler="com.google.errorprone.ErrorProneAntCompilerAdapter"/>
<compilerarg value="-Xep:JUnitAssertSameCheck:OFF" compiler="com.google.errorprone.ErrorProneAntCompilerAdapter"/>
<compilerarg value="-Xep:CollectionIncompatibleType:OFF" compiler="com.google.errorprone.ErrorProneAntCompilerAdapter"/>
<classpath>
<pathelement location="${javac.out}"/>
<pathelement location="${gwt.tools.lib}/junit/junit-4.8.2.jar"/>
<pathelement location="${gwt.tools.lib}/selenium/selenium-java-client-driver.jar"/>
<path refid="test.extraclasspath"/>
</classpath>
<compilerarg value="-processor"/>
<compilerarg value="com.google.web.bindery.requestfactory.apt.RfValidator"/>
</gwt.javac>
</target>
<target name="-compile.tests.java8" if="isJava8" depends="-compile.tests.java7">
<gwt.javac srcdir="test" destdir="${javac.junit.out}" source="1.8" target="1.8"
includes="**/java8/**,**/*Java8Suite.java">
<compilerarg value="-Xep:MissingCasesInEnumSwitch:OFF" compiler="com.google.errorprone.ErrorProneAntCompilerAdapter"/>
<compilerarg value="-Xep:SelfComparison:OFF" compiler="com.google.errorprone.ErrorProneAntCompilerAdapter"/>
<compilerarg value="-Xep:SelfEquals:OFF" compiler="com.google.errorprone.ErrorProneAntCompilerAdapter"/>
<compilerarg value="-Xep:FallThrough:OFF" compiler="com.google.errorprone.ErrorProneAntCompilerAdapter"/>
<compilerarg value="-Xep:ReturnValueIgnored:OFF" compiler="com.google.errorprone.ErrorProneAntCompilerAdapter"/>
<compilerarg value="-Xep:EqualsIncompatibleType:OFF" compiler="com.google.errorprone.ErrorProneAntCompilerAdapter"/>
<classpath>
<pathelement location="${javac.junit.out}"/>
<pathelement location="${javac.out}"/>
<pathelement location="${gwt.tools.lib}/junit/junit-4.8.2.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/tomcat-servlet-api-8.0.28.jar"
excludes="**/*.java"/>
<zipfileset src="${gwt.tools.lib}/w3c/sac/sac-1.3.jar"/>
<zipfileset src="${gwt.tools.lib}/w3c/flute/flute-1.3-gg2.jar"/>
<zipfileset
src="${gwt.tools.lib}/streamhtmlparser/streamhtmlparser-jsilver-r10/streamhtmlparser-jsilver-r10-1.5-rebased.jar"/>
<zipfileset src="${gwt.tools.lib}/gss/2015-11-04/closure-stylesheets-library-20151104-rebased.jar"/>
</gwt.jar>
</target>
<target name="checkstyle-source" 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"/>
<exclude name="org/hibernate/validator/ValidationMessages.java"/>
</fileset>
<fileset dir="super/com/google/gwt/emul"/>
<fileset dir="super/com/google/gwt/junit/translatable"/>
</gwt.checkstyle>
</target>
<target name="checkstyle-tests" description="Static analysis of source">
<gwt.checkstyle.tests>
<fileset dir="test">
<include name="com/google/**/*.java"/>
<include name="test/**"/>
</fileset>
</gwt.checkstyle.tests>
</target>
<target name="checkstyle" description="Static analysis of source"
depends="checkstyle-tests,checkstyle-source">
</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.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} -devMode"
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} -devMode"
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.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.web.htmlunit}"
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.web.htmlunit} -XdisableClassMetadata"
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.web.htmlunit} -draftCompile"
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.coverage.htmlunit"
depends="compile, compile.tests"
description="Run tests for coverage support"
unless="test.coverage.htmlunit.disable">
<fileset id="test.coverage.htmlunit.tests" dir="${javac.junit.out}"
includes="com/google/gwt/dev/js/client/CoverageTest.class"
excludes=""/>
<gwt.junit test.name="test.coverage.htmlunit"
test.args="${test.args} -draftCompile -out www -prod"
test.jvmargs="${test.jvmargs} -Dgwt.coverage=com/google/gwt/dev/js/client/CoverageTestModule.java,"
test.out="${junit.out}/coverage-htmlunit"
test.cases="test.coverage.htmlunit.tests">
<extraclasspaths>
<path refid="test.extraclasspath"/>
</extraclasspaths>
</gwt.junit>
</target>
<target name="test"
depends="compile, compile.tests"
unless="test.user.disable"
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="dev.built" location="${gwt.dev.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.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"/>
<antcall target="test.nongwt"/>
<antcall target="test.coverage.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="dev.built" location="${gwt.dev.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.coverage.htmlunit"/>
</parallel>
</limit>
</target>
<target name="test.nongwt"
depends="compile, compile.tests"
description="Run JRE-only tests."
unless="test.nongwt.disable">
<fileset id="test.nongwt.tests" dir="${javac.junit.out}"
includes="${gwt.nongwt.testcase.includes}"
excludes="${gwt.nongwt.testcase.excludes}"/>
<gwt.junit test.name="test.nongwt"
test.args="${test.args}"
test.jvmargs="${test.jvmargs}"
test.out="${junit.out}/nongwt"
test.cases="test.nongwt.tests">
<extraclasspaths>
<path refid="test.extraclasspath"/>
</extraclasspaths>
</gwt.junit>
</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.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.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.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.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.selenium is defined -->
<antcall target="test.nometa.selenium"/>
</parallel>
</limit>
</target>
<!-- Validation TCK test and reports -->
<!-- TODO(nchalko) move the tck target to user/build.xml and then delete
all of samples/validaitontck -->
<target name="tck"
depends="tck.run,tck.report"
description="Run all tests for this project.">
<fail
message="One or more junit tests failed for target: @{test.name} @{test.args}"
if="junit.failure" status="2"/>
</target>
<target name="tck.run"
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="dev.built" location="${gwt.dev.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}">
<antcall target="tck.dev.htmlunit"/>
</limit>
<fail
message="One or more tck tests failed for target: @{test.name} @{test.args}"
if="junit.failure" status="2"/>
</target>
<macrodef name="countMarkedTests">
<attribute name="annotation" default="NOT SET"/>
<attribute name="outputproperty" default="jsr303.marked.@{annotation}"/>
<sequential>
</sequential>
</macrodef>
<target name="tck.report">
<mkdir dir="${junit.out}/tck-report"/>
<mkdir dir="${junit.out}/tck-report/text"/>
<scan>
<fileset dir="test/org/hibernate/jsr303/tck/tests" id="id"/>
<filterchain>
<countfilter match="@Failing" property="jsr303.marked.Failing" init="0"/>
<countfilter match="@NonTckTest" property="jsr303.marked.NonTckTest" init="0"/>
<countfilter match="@NotSupported" property="jsr303.marked.NotSupported" init="0"/>
<countfilter match="@TestNotCompatible" property="jsr303.marked.TestNotCompatible"
init="0"/>
</filterchain>
</scan>
<!-- force to zero if not set above -->
<property name="jsr303.marked.Failing" value="0"/>
<property name="jsr303.marked.NonTckTest" value="0"/>
<property name="jsr303.marked.NotSupported" value="0"/>
<property name="jsr303.marked.TestNotCompatible" value="0"/>
<echo message="Marked Failing = ${jsr303.marked.Failing}"/>
<echo message="Marked NonTckTest = ${jsr303.marked.NonTckTest}"/>
<echo message="Marked NotSupported = ${jsr303.marked.NotSupported}"/>
<echo message="Marked TestNotCompatible = ${jsr303.marked.TestNotCompatible}"/>
<junitreport todir="${junit.out}/tck-report">
<fileset dir="${junit.out}/tck-dev-htmlunit">
<include name="reports/TEST-*.xml"/>
</fileset>
<report format="noframes" todir="${junit.out}/tck-report" styledir="style/html">
<param name="markedFailing" expression="${jsr303.marked.Failing}"/>
<param name="markedNonTckTest" expression="${jsr303.marked.NonTckTest}"/>
<param name="markedNotSupported" expression="${jsr303.marked.NotSupported}"/>
<param name="markedTestNotCompatible" expression="${jsr303.marked.TestNotCompatible}"/>
</report>
<report format="noframes" todir="${junit.out}/tck-report/text" styledir="style/text">
<param name="markedFailing" expression="${jsr303.marked.Failing}"/>
<param name="markedNonTckTest" expression="${jsr303.marked.NonTckTest}"/>
<param name="markedNotSupported" expression="${jsr303.marked.NotSupported}"/>
<param name="markedTestNotCompatible" expression="${jsr303.marked.TestNotCompatible}"/>
</report>
</junitreport>
<concat taskname="JSR 303 TCK Result">
<filelist>
<file name="${junit.out}/tck-report/text/junit-noframes.html"/>
</filelist>
</concat>
</target>
<target name="tck.dev.htmlunit"
depends="compile, compile.tests"
description="Run dev-mode tests with HtmlUnit."
unless="test.dev.htmlunit.disable">
<fileset id="tck.dev.htmlunit.tests" dir="${javac.junit.out}"
includes="${gwt.tck.testcase.dev.includes}"
excludes="${gwt.tck.testcase.dev.excludes}"/>
<gwt.junit test.name="test.dev.htmlunit"
test.args="${test.args} -devMode"
test.jvmargs="-ea -Dcom.google.gwt.sample.validationtck.util.Failing.include=true"
test.out="${junit.out}/tck-dev-htmlunit"
test.cases="tck.dev.htmlunit.tests"
haltonfailure="false"
>
<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>