blob: 7aaed90c0e9bc9bf0d585de5abf65f0f771fd710 [file] [log] [blame]
<project name="validationtck" default="build" basedir=".">
<property name="sample.root" value="validationtck" />
<property name="sample.module" value="ValidationTck" />
<property name="sample.path" value="src" />
<property name="test.args" value="-ea" />
<property name="test.jvmargs" value="-ea" />
<import file="../common.ant.xml" />
<!-- these are after the common.ant.xml so they have gwt.tools etc. -->
<path id="sample.extraclasspath">
<pathelement location="${gwt.tools.lib}/apache/log4j/log4j-1.2.16.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" />
<!-- 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.jar" />
<!-- Needed for JDK 1.5-->
<pathelement location="${gwt.tools.lib}/javax/activation/activation-1.1.jar" />
<pathelement location="${gwt.tools.lib}/javax/xml/bind/jaxb-api-2.1.jar" />
<pathelement location="${gwt.tools.lib}/sun/jaxb/jaxb-impl-2.1.3.jar" />
<pathelement location="${gwt.tools.lib}/javax/xml/stream/stax-api-1.0-2.jar" />
</path>
<fileset id="sample.server.libs" dir="${gwt.tools.lib}">
<include name="hibernate/validator/hibernate-validator-4.1.0.Final.jar" />
<include name="apache/log4j/log4j-1.2.16.jar" />
<include name="slf4j/slf4j-api/slf4j-api-1.6.1.jar" />
<include name="slf4j/slf4j-log4j12/slf4j-log4j12-1.6.1.jar" />
<!-- Needed for JDK 1.5-->
<include name="javax/activation/activation-1.1.jar" />
<include name="javax/xml/bind/jaxb-api-2.1.jar" />
<include name="sun/jaxb/jaxb-impl-2.1.3.jar" />
<include name="javax/xml/stream/stax-api-1.0-2.jar" />
</fileset>
<!--
Classpaths added for test cases
-->
<path id="test.extraclasspath">
<pathelement location="${gwt.build}/out/dev/bin-test" />
<pathelement location="${gwt.dev.jar}" />
<pathelement location="${gwt.build.lib}/gwt-user.jar" />
<path refid="sample.extraclasspath" />
</path>
<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="" />
<!--
Compiles the test code for this project
-->
<target name="compile.tests"
depends="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="sample.extraclasspath" />
<path refid="test.extraclasspath" />
</classpath>
</gwt.javac>
</target>
<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="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>
<fail
message="One or more junit tests failed for target: @{test.name} @{test.args}"
if="junit.failure" status="2" />
</target>
<target name="tck.report">
<mkdir dir="${junit.out}/tck-report" />
<mkdir dir="${junit.out}/tck-report/text" />
<junitreport todir="${junit.out}/tck-report">
<fileset dir="${junit.out}">
<include name="*/reports/TEST-*.xml" />
</fileset>
<report format="noframes" todir="${junit.out}/tck-report" styledir="style/html" />
<report format="noframes" todir="${junit.out}/tck-report/text" styledir="style/text" />
</junitreport>
<concat taskname="JSR 303 TCK Result">
<filelist>
<file name="${junit.out}/tck-report/text/junit-noframes.html" />
</filelist>
</concat>
</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"
haltonfailure="false"
>
<extraclasspaths>
<path refid="test.extraclasspath" />
</extraclasspaths>
</gwt.junit>
</target>
</project>