44 |
<property name="build.deprecation" value="false"/> |
<property name="build.deprecation" value="false"/> |
45 |
<property name="build.javadoc.access" value="protected"/> |
<property name="build.javadoc.access" value="protected"/> |
46 |
|
|
47 |
|
<!-- Tck options; see JSR166TestCase.java --> |
48 |
|
<!-- ant -Djsr166.profileTests=true -Djsr166.runsPerTest=100 test-tck --> |
49 |
|
<property name="jsr166.profileTests" value="false"/> |
50 |
|
<property name="jsr166.profileThreshold" value="100"/> |
51 |
|
<property name="jsr166.runsPerTest" value="1"/> |
52 |
|
<!-- Allow running an individual tck test class --> |
53 |
|
<!-- ant -Djsr166.tckTestClass=CountedCompleterTest -Djsr166.runsPerTest=100 test-tck --> |
54 |
|
<property name="jsr166.tckTestClass" value="JSR166TestCase"/> |
55 |
|
|
56 |
<!-- Build locations --> |
<!-- Build locations --> |
57 |
<property name="build.dir" location="build"/> |
<property name="build.dir" location="build"/> |
58 |
<property name="build.classes.dir" location="${build.dir}/classes"/> |
<property name="build.classes.dir" location="${build.dir}/classes"/> |
211 |
|
|
212 |
</javac> |
</javac> |
213 |
|
|
214 |
<java classname="JSR166TestCase" |
<java classname="${jsr166.tckTestClass}" |
215 |
failonerror="true" |
failonerror="true" |
216 |
jvm="${java@{target}}" |
jvm="${java@{target}}" |
217 |
fork="true"> |
fork="true"> |
218 |
<jvmarg value="-Xbootclasspath/p:@{classes}"/> |
<jvmarg value="-Xbootclasspath/p:@{classes}"/> |
219 |
<jvmarg line="@{jvmflags}"/> |
<jvmarg line="@{jvmflags}"/> |
220 |
|
<sysproperty key="jsr166.profileTests" value="${jsr166.profileTests}"/> |
221 |
|
<sysproperty key="jsr166.profileThreshold" value="${jsr166.profileThreshold}"/> |
222 |
|
<sysproperty key="jsr166.runsPerTest" value="${jsr166.runsPerTest}"/> |
223 |
<classpath> |
<classpath> |
224 |
<pathelement location="${junit.jar}"/> |
<pathelement location="${junit.jar}"/> |
225 |
<pathelement location="@{workdir}/tck-classes"/> |
<pathelement location="@{workdir}/tck-classes"/> |
309 |
</target> |
</target> |
310 |
|
|
311 |
|
|
|
<target name="test" |
|
|
depends="configure-tests, report-tests" |
|
|
description="Runs all tests (requires JUnit 3.8.1 in ${ant.home}/lib)" /> |
|
|
|
|
|
|
|
312 |
<target name="docs" |
<target name="docs" |
313 |
description="Builds javadocs for src/main to dist dir"> |
description="Builds javadocs for src/main to dist dir"> |
314 |
|
|
332 |
<arg value="-XDignore.symbol.file=true"/> |
<arg value="-XDignore.symbol.file=true"/> |
333 |
<arg value="-tag"/> |
<arg value="-tag"/> |
334 |
<arg value="${javadoc.jls.option}"/> |
<arg value="${javadoc.jls.option}"/> |
335 |
|
<arg value="-tag"/> |
336 |
|
<arg value="apiNote:a:<em>API Note:</em>"/> |
337 |
|
<arg value="-tag"/> |
338 |
|
<arg value="implSpec:a:<em>Implementation Requirements:</em>"/> |
339 |
|
<arg value="-tag"/> |
340 |
|
<arg value="implNote:a:<em>Implementation Note:</em>"/> |
341 |
</javadoc> |
</javadoc> |
342 |
</target> |
</target> |
343 |
|
|
381 |
</target> |
</target> |
382 |
|
|
383 |
|
|
|
<!-- Internal targets --> |
|
|
|
|
|
|
|
384 |
<target name="dist-jar" |
<target name="dist-jar" |
385 |
depends="clean, jar"> |
depends="clean, jar"> |
386 |
<copy file="${product.jar}" todir="${dist.dir}"/> |
<copy file="${product.jar}" todir="${dist.dir}"/> |
392 |
</target> |
</target> |
393 |
|
|
394 |
|
|
|
<target name="compile-tests" |
|
|
depends="jar"> |
|
|
|
|
|
<mkdir dir="${build.testcases.dir}"/> |
|
|
|
|
|
<javac srcdir="${tck.src.dir}" |
|
|
destdir="${build.testcases.dir}" |
|
|
debug="${build.debug}" |
|
|
debuglevel="${build.debuglevel}" |
|
|
deprecation="${build.deprecation}" |
|
|
source="6" |
|
|
classpath="${junit.jar}" |
|
|
bootclasspath="@{product.jar}:${bootclasspath6}" |
|
|
includeAntRuntime="false" |
|
|
includeJavaRuntime="false" |
|
|
executable="${javac8}" |
|
|
fork="true"> |
|
|
|
|
|
<include name="**/*.java"/> |
|
|
<compilerarg value="-XDignore.symbol.file=true"/> |
|
|
<compilerarg value="-Xlint:all,-unchecked,-rawtypes,-serial,-deprecation"/> |
|
|
<compilerarg line="${build.args}"/> |
|
|
|
|
|
</javac> |
|
|
|
|
|
<javac srcdir="${test.src.dir}" |
|
|
destdir="${build.testcases.dir}" |
|
|
debug="${build.debug}" |
|
|
debuglevel="${build.debuglevel}" |
|
|
deprecation="${build.deprecation}" |
|
|
source="6" |
|
|
classpath="" |
|
|
bootclasspath="@{product.jar}:${bootclasspath6}" |
|
|
includeAntRuntime="false" |
|
|
includeJavaRuntime="false" |
|
|
executable="${javac8}" |
|
|
fork="true"> |
|
|
|
|
|
<include name="jsr166/test/**/*.java"/> |
|
|
<compilerarg value="-XDignore.symbol.file=true"/> |
|
|
<compilerarg value="-Xlint:all,-unchecked,-rawtypes,-serial,-deprecation"/> |
|
|
<compilerarg line="${build.args}"/> |
|
|
|
|
|
</javac> |
|
|
|
|
|
<!-- |
|
|
<javac srcdir="${jtreg.src.dir}" |
|
|
destdir="${build.testcases.dir}" |
|
|
debug="${build.debug}" |
|
|
debuglevel="${build.debuglevel}" |
|
|
deprecation="${build.deprecation}" |
|
|
source="${build.sourcelevel}" |
|
|
fork="true"> |
|
|
|
|
|
<compilerarg value="-Xbootclasspath/p:${product.jar}"/> |
|
|
<compilerarg value="-XDignore.symbol.file=true"/> |
|
|
<compilerarg line="${build.args}"/> |
|
|
|
|
|
</javac> |
|
|
--> |
|
|
|
|
|
</target> |
|
|
|
|
395 |
<target name="test-tck" |
<target name="test-tck" |
396 |
depends="jar" |
depends="jar" |
397 |
description="Runs tck tests for main directly"> |
description="Runs tck tests for main directly"> |
411 |
classes="${product.jar}"/> |
classes="${product.jar}"/> |
412 |
</target> |
</target> |
413 |
|
|
414 |
<target name="test-ng" |
<target name="test" |
415 |
depends="test-tck, test-jtreg" |
depends="test-tck, test-jtreg" |
416 |
description="Runs tck and jtreg tests for main"> |
description="Runs tck and jtreg tests for main"> |
417 |
</target> |
</target> |
418 |
|
|
|
<target name="run-tests" |
|
|
depends="compile-tests"> |
|
|
|
|
|
<!-- May be overridden by user.properties --> |
|
|
<property name="testcase" value="*"/> |
|
|
|
|
|
<mkdir dir="${build.reports.dir}"/> |
|
|
|
|
|
<junit printsummary="true" |
|
|
showoutput="true" |
|
|
errorProperty="junit.failed" |
|
|
failureProperty="junit.failed" |
|
|
dir="${build.reports.dir}" |
|
|
jvm="${java8}" |
|
|
fork="true"> |
|
|
|
|
|
<jvmarg value="-Xbootclasspath/p:${product.jar}"/> |
|
|
<jvmarg value="-server"/> |
|
|
<jvmarg value="-showversion"/> |
|
|
|
|
|
<classpath refid="test.classpath"/> |
|
|
|
|
|
<formatter type="xml"/> |
|
|
|
|
|
<batchtest todir="${build.reports.dir}" unless="no.test.tck"> |
|
|
<fileset dir="${tck.src.dir}"> |
|
|
<include name="**/${testcase}Test.java"/> |
|
|
</fileset> |
|
|
</batchtest> |
|
|
|
|
|
<batchtest todir="${build.reports.dir}" if="do.test.old"> |
|
|
<fileset dir="${test.src.dir}"> |
|
|
<include name="jsr166/test/**/${testcase}Test.java"/> |
|
|
</fileset> |
|
|
</batchtest> |
|
|
|
|
|
<!-- |
|
|
<batchtest todir="${build.reports.dir}" if="do.test.jtreg"> |
|
|
<fileset dir="${jtreg.src.dir}"> |
|
|
<include name="**/${testcase}Test.java"/> |
|
|
</fileset> |
|
|
</batchtest> |
|
|
--> |
|
|
|
|
|
</junit> |
|
|
|
|
|
</target> |
|
|
|
|
|
|
|
|
<target name="report-tests" |
|
|
depends="run-tests"> |
|
|
|
|
|
<!-- Sets junit.report.format to frames if redirection is present, |
|
|
otherwise sets it to noframes. --> |
|
|
<available property="junit.report.format" |
|
|
value="frames" |
|
|
classname="org.apache.xalan.lib.Redirect" |
|
|
/> |
|
|
<property name="junit.report.format" value="noframes"/> |
|
|
|
|
|
<junitreport todir="${build.reports.dir}"> |
|
|
<fileset dir="${build.reports.dir}"> |
|
|
<include name="TEST-*.xml"/> |
|
|
</fileset> |
|
|
<report format="${junit.report.format}" todir="${build.reports.dir}" |
|
|
/> |
|
|
</junitreport> |
|
|
|
|
|
<fail message="Test Cases Failed" if="junit.failed"/> |
|
|
|
|
|
</target> |
|
419 |
|
|
420 |
|
|
421 |
<target name="configure-compiler"> |
<target name="configure-compiler"> |
435 |
</target> |
</target> |
436 |
|
|
437 |
|
|
|
<target name="configure-tests" |
|
|
depends="configure-compiler"> |
|
|
|
|
|
<!-- junit.framework.Protectable is in JUnit 3.8.1 but not in 3.7 --> |
|
|
<available property="junit.available" |
|
|
classname="junit.framework.Protectable"/> |
|
|
|
|
|
<!-- Xalan --> |
|
|
<available property="xalan.available" |
|
|
classname="org.apache.xalan.Version"/> |
|
|
|
|
|
|
|
|
<!-- Ant 1.6beta and later don't need or want this check --> |
|
|
<!-- |
|
|
<fail message="Need JUnit 3.8.1 in ${ant.home}${file.separator}lib to run tests" |
|
|
unless="junit.available"/> |
|
|
|
|
|
<fail message="Need Xalan 2.5.1 jar in ${ant.home}${file.separator}lib to run tests" |
|
|
unless="xalan.available"/> |
|
|
--> |
|
|
|
|
|
</target> |
|
|
|
|
438 |
|
|
439 |
<!-- Various demos and test programs --> |
<!-- Various demos and test programs --> |
440 |
|
|
551 |
|
|
552 |
<formatter type="brief"/> |
<formatter type="brief"/> |
553 |
|
|
554 |
<test name="JSR166TestCase" haltonfailure="no"> |
<test name="${jsr166.tckTestClass}" haltonfailure="no"> |
555 |
</test> |
</test> |
556 |
|
|
557 |
</junit> |
</junit> |
563 |
<run-jtreg-tests |
<run-jtreg-tests |
564 |
target="7" |
target="7" |
565 |
workdir="${build.4jdk7.dir}" |
workdir="${build.4jdk7.dir}" |
566 |
classes="${4jdk7product.jar}"/> |
classes="${4jdk7product.jar}" |
567 |
|
jtregflags="-exclude:${jtreg.src.dir}/jdk8tests"/> |
568 |
</target> |
</target> |
569 |
|
|
570 |
|
|