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"/> |
179 |
|
|
180 |
<macrodef name="run-tck-tests"> |
<macrodef name="run-tck-tests"> |
181 |
<attribute name="tck.src.dir" default="${tck.src.dir}"/> |
<attribute name="tck.src.dir" default="${tck.src.dir}"/> |
|
<attribute name="source" default="6"/> |
|
182 |
<attribute name="target"/> |
<attribute name="target"/> |
183 |
|
<attribute name="compile-target" default="@{target}"/> |
184 |
<attribute name="workdir"/> |
<attribute name="workdir"/> |
185 |
<attribute name="classes"/> |
<attribute name="classes"/> |
186 |
<attribute name="jvmflags" default=""/> |
<attribute name="jvmflags" default=""/> |
194 |
debug="${build.debug}" |
debug="${build.debug}" |
195 |
debuglevel="${build.debuglevel}" |
debuglevel="${build.debuglevel}" |
196 |
deprecation="${build.deprecation}" |
deprecation="${build.deprecation}" |
197 |
source="@{source}" |
source="@{compile-target}" |
198 |
|
target="@{compile-target}" |
199 |
classpath="${junit.jar}" |
classpath="${junit.jar}" |
200 |
bootclasspath="@{classes}:${bootclasspath@{source}}" |
bootclasspath="@{classes}:${bootclasspath@{compile-target}}" |
201 |
includeAntRuntime="false" |
includeAntRuntime="false" |
202 |
includeJavaRuntime="false" |
includeJavaRuntime="false" |
203 |
executable="${javac@{target}}" |
executable="${javac@{compile-target}}" |
204 |
fork="true"> |
fork="true"> |
205 |
|
|
206 |
<include name="*.java"/> |
<include name="*.java"/> |
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"/> |
229 |
</sequential> |
</sequential> |
230 |
</macrodef> |
</macrodef> |
231 |
|
|
232 |
|
<macrodef name="run-jtreg-tests"> |
233 |
|
<attribute name="jtreg.src.dir" default="${jtreg.src.dir}"/> |
234 |
|
<attribute name="source" default="7"/> |
235 |
|
<attribute name="target"/> |
236 |
|
<attribute name="workdir"/> |
237 |
|
<attribute name="classes"/> |
238 |
|
<attribute name="jtregflags" default=""/> |
239 |
|
<sequential> |
240 |
|
<delete dir="@{workdir}/JTwork" quiet="true"/> |
241 |
|
<delete dir="@{workdir}/JTreport" quiet="true"/> |
242 |
|
<mkdir dir="@{workdir}/JTwork/scratch"/> |
243 |
|
<mkdir dir="@{workdir}/JTreport"/> |
244 |
|
<jtreg dir="@{jtreg.src.dir}" |
245 |
|
jdk="${jdk@{target}.home}" |
246 |
|
workDir="@{workdir}/JTwork" |
247 |
|
reportDir="@{workdir}/JTreport"> |
248 |
|
|
249 |
|
<arg value="-Xbootclasspath/p:@{classes}"/> |
250 |
|
<arg value="-agentvm"/> |
251 |
|
<arg value="-v:nopass,fail"/> |
252 |
|
<arg value="-vmoptions:-esa -ea"/> |
253 |
|
<arg value="-automatic"/> |
254 |
|
<arg value="-k:!ignore"/> |
255 |
|
<arg line="@{jtregflags}"/> |
256 |
|
</jtreg> |
257 |
|
</sequential> |
258 |
|
</macrodef> |
259 |
|
|
260 |
<!-- ALoops classpath --> |
<!-- ALoops classpath --> |
261 |
<path id="loops.classpath"> |
<path id="loops.classpath"> |
262 |
<pathelement location="${build.loops.dir}"/> |
<pathelement location="${build.loops.dir}"/> |
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 |
|
|
375 |
</target> |
</target> |
376 |
|
|
377 |
|
|
|
<!-- Internal targets --> |
|
|
|
|
|
|
|
378 |
<target name="dist-jar" |
<target name="dist-jar" |
379 |
depends="clean, jar"> |
depends="clean, jar"> |
380 |
<copy file="${product.jar}" todir="${dist.dir}"/> |
<copy file="${product.jar}" todir="${dist.dir}"/> |
386 |
</target> |
</target> |
387 |
|
|
388 |
|
|
|
<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> |
|
|
|
|
389 |
<target name="test-tck" |
<target name="test-tck" |
390 |
depends="jar" |
depends="jar" |
391 |
description="Runs tck tests for main directly"> |
description="Runs tck tests for main directly"> |
396 |
classes="${product.jar}"/> |
classes="${product.jar}"/> |
397 |
</target> |
</target> |
398 |
|
|
399 |
<target name="run-tests" |
<target name="test-jtreg" |
400 |
depends="compile-tests"> |
depends="jar" |
401 |
|
description="Runs jtreg tests for main using the jtreg ant task"> |
402 |
<!-- May be overridden by user.properties --> |
<run-jtreg-tests |
403 |
<property name="testcase" value="*"/> |
target="8" |
404 |
|
workdir="${build.dir}" |
405 |
<mkdir dir="${build.reports.dir}"/> |
classes="${product.jar}"/> |
|
|
|
|
<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> |
|
|
|
|
406 |
</target> |
</target> |
407 |
|
|
408 |
|
<target name="test" |
409 |
<target name="report-tests" |
depends="test-tck, test-jtreg" |
410 |
depends="run-tests"> |
description="Runs tck and jtreg tests for main"> |
|
|
|
|
<!-- 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"/> |
|
|
|
|
411 |
</target> |
</target> |
412 |
|
|
413 |
|
|
414 |
|
|
415 |
<target name="configure-compiler"> |
<target name="configure-compiler"> |
416 |
|
|
417 |
<property name="unchecked.option" value="-Xlint:unchecked"/> |
<property name="unchecked.option" value="-Xlint:unchecked"/> |
429 |
</target> |
</target> |
430 |
|
|
431 |
|
|
|
<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> |
|
|
|
|
432 |
|
|
433 |
<!-- Various demos and test programs --> |
<!-- Various demos and test programs --> |
434 |
|
|
511 |
classes="${4jdk7product.jar}"> |
classes="${4jdk7product.jar}"> |
512 |
<javac-elements> |
<javac-elements> |
513 |
<!-- JDK8+ test classes --> |
<!-- JDK8+ test classes --> |
514 |
|
<exclude name="*8Test.java"/> |
515 |
|
<exclude name="DoubleAccumulatorTest.java"/> |
516 |
|
<exclude name="DoubleAdderTest.java"/> |
517 |
|
<exclude name="LongAccumulatorTest.java"/> |
518 |
|
<exclude name="LongAdderTest.java"/> |
519 |
|
<exclude name="CompletableFutureTest.java"/> |
520 |
<exclude name="StampedLockTest.java"/> |
<exclude name="StampedLockTest.java"/> |
521 |
</javac-elements> |
</javac-elements> |
522 |
</run-tck-tests> |
</run-tck-tests> |
545 |
|
|
546 |
<formatter type="brief"/> |
<formatter type="brief"/> |
547 |
|
|
548 |
<test name="JSR166TestCase" haltonfailure="no"> |
<test name="${jsr166.tckTestClass}" haltonfailure="no"> |
549 |
</test> |
</test> |
550 |
|
|
551 |
</junit> |
</junit> |
552 |
</target> |
</target> |
553 |
|
|
554 |
<target name="4jdk7-test-jtreg" |
<target name="4jdk7-test-jtreg" |
555 |
depends="4jdk7compile" |
depends="4jdk7jar" |
556 |
description="Runs jtreg tests for jsr166-4jdk7 using the jtreg ant task"> |
description="Runs jtreg tests for jsr166-4jdk7 using the jtreg ant task"> |
557 |
<delete dir="${build.4jdk7.dir}/JTwork" quiet="true"/> |
<run-jtreg-tests |
558 |
<delete dir="${build.4jdk7.dir}/JTreport" quiet="true"/> |
target="7" |
559 |
<mkdir dir="${build.4jdk7.dir}/JTwork/scratch"/> |
workdir="${build.4jdk7.dir}" |
560 |
<mkdir dir="${build.4jdk7.dir}/JTreport"/> |
classes="${4jdk7product.jar}" |
561 |
<jtreg dir="${jtreg.src.dir}" |
jtregflags="-exclude:${jtreg.src.dir}/jdk8tests"/> |
|
jdk="${jdk7.home}" |
|
|
workDir="${build.4jdk7.dir}/JTwork" |
|
|
reportDir="${build.4jdk7.dir}/JTreport"> |
|
|
|
|
|
<arg value="-Xbootclasspath/p:${4jdk7product.jar}"/> |
|
|
<arg value="-agentvm"/> |
|
|
<arg value="-v:nopass,fail"/> |
|
|
<arg value="-vmoptions:-esa -ea"/> |
|
|
<arg value="-automatic"/> |
|
|
<arg value="-k:!ignore"/> |
|
|
</jtreg> |
|
562 |
</target> |
</target> |
563 |
|
|
564 |
|
|
956 |
|
|
957 |
<run-tck-tests |
<run-tck-tests |
958 |
tck.src.dir="${test.src.dir}/tck-jsr166e" |
tck.src.dir="${test.src.dir}/tck-jsr166e" |
959 |
source="7" |
target="7" |
|
target="8" |
|
960 |
workdir="${build.jsr166e.dir}" |
workdir="${build.jsr166e.dir}" |
961 |
classes="${jsr166e.jar}"/> |
classes="${jsr166e.jar}"/> |
962 |
</target> |
</target> |