ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/jsr166/jsr166/build.xml
(Generate patch)

Comparing jsr166/build.xml (file contents):
Revision 1.201 by dl, Sat Mar 26 12:35:25 2016 UTC vs.
Revision 1.228 by jsr166, Sat Dec 17 22:28:20 2016 UTC

# Line 7 | Line 7
7  
8    Usage: ant [target]
9  
10 +  See http://gee.cs.oswego.edu/dl/concurrency-interest/index.html for
11 +  more details.
12 +
13    User-specific settings are read from user.properties.
14    See user.properties.sample for an explanation of some useful settings.
15  
# Line 30 | Line 33
33    ant -Djdk$N.home=... -Djdk$N.src.home=...
34    for $N in 6 7 8 9 ...
35  
36 <  As of 2015-09, there is incomplete hacky support for jigsaw
37 <  Build for jigsaw using something like:
35 <  ant -Djdk9.home="$HOME/jdk/jigsaw" -Djdk9.src.home="$HOME/jdk/src/jigsaw" clean test dist
36 <  "docs" target is still broken.
36 >  As of 2016-03, the sources in src/main are for jdk9+ only.  The "docs"
37 >  target is currently broken.
38   ------------------------------------------------------------------------------
39    </description>
40  
41 <  <!-- Display main targets by running 'ant -projecthelp' -->
41 >  <!-- Run 'ant -projecthelp' (default target) -->
42    <target name="usage">
43      <java classname="org.apache.tools.ant.Main">
44        <arg value="-projecthelp" />
# Line 62 | Line 63
63    <property name="build.classes.dir"           location="${build.dir}/classes"/>
64    <property name="build.testcases.dir"         location="${build.dir}/testcases"/>
65    <property name="build.loops.dir"             location="${build.dir}/loops"/>
65  <property name="build.reports.dir"           location="${build.dir}/reports"/>
66  
67    <property name="build.4jdk7.dir"             location="${build.dir}/jsr166-4jdk7"/>
68    <property name="build.4jdk7.classes.dir"     location="${build.4jdk7.dir}/classes"/>
# Line 185 | Line 185
185    <property name="java6.docroot.url"      value="http://docs.oracle.com/javase/6/docs"/>
186    <property name="java7.docroot.url"      value="http://docs.oracle.com/javase/7/docs"/>
187    <property name="java8.docroot.url"      value="http://docs.oracle.com/javase/8/docs"/>
188 <  <!-- The expected canonical location does not yet exist as of 2016-03 -->
188 >  <!-- The expected canonical location does not yet exist as of 2016-04 -->
189    <!-- <property name="java9.docroot.url" value="http://docs.oracle.com/javase/9/docs"/> -->
190 <  <property name="java9.docroot.url"      value="http://download.java.net/jdk9/docs"/>
190 >  <property name="java9.docroot.url"      value="http://download.java.net/java/jdk9/docs"/>
191    <!-- Default jdk doc location (latest stable release seems best) -->
192    <property name="java.docroot.url"       value="${java8.docroot.url}"/>
193  
# Line 244 | Line 244
244             classpath="${junit.jar}"
245             includeAntRuntime="false"
246             includeJavaRuntime="false"
247 +           encoding="ASCII"
248             executable="${javac@{compile-target}}"
249             fork="true">
250  
# Line 251 | Line 252
252        <compilerarg value="-XDignore.symbol.file=true"/>
253        <compilerarg value="-Xlint:all,-unchecked,-rawtypes,-serial,-deprecation,-try"/>
254        <compilerarg value="-Xbootclasspath/p:@{classes}" unless:set="modules"/>
255 <      <compilerarg value="-Xpatch:${build.classes.dir}" if:set="modules"/>
255 >      <compilerarg line="--patch-module java.base=@{classes}" if:set="modules"/>
256        <compilerarg line="${build.args}"/>
257        <javac-elements/>
258  
# Line 262 | Line 263
263            jvm="${java@{target}}"
264            fork="true">
265          <jvmarg value="-Xbootclasspath/p:@{classes}" unless:set="modules"/>
266 <        <jvmarg value="-Xpatch:${build.classes.dir}" if:set="modules"/>
266 >        <jvmarg line="--patch-module java.base=@{classes}" if:set="modules"/>
267 >        <jvmarg line="--add-opens java.base/java.util=ALL-UNNAMED" if:set="modules"/>
268 >        <jvmarg line="--add-opens java.base/java.util.concurrent=ALL-UNNAMED" if:set="modules"/>
269 >        <jvmarg line="--add-opens java.base/java.util.concurrent.atomic=ALL-UNNAMED" if:set="modules"/>
270 >        <jvmarg line="--add-opens java.base/java.util.concurrent.locks=ALL-UNNAMED" if:set="modules"/>
271          <jvmarg line="@{jvmflags}"/>
272 +        <!-- ant -Dvmoptions="-Xmx8m" -Djsr166.tckTestClass=CompletableFutureTest tck -->
273 +        <jvmarg line="${vmoptions}" if:set="vmoptions"/>
274  
275 <        <!-- ant -Djava.util.concurrent.ForkJoinPool.common.parallelism=1 tck -->
275 >        <!-- ant -Djava.util.concurrent.ForkJoinPool.common.parallelism=1 tck -->
276          <syspropertyset id="system-properties-used-by-tck">
277            <propertyref prefix="java.util.concurrent.ForkJoinPool"/>
278            <propertyref prefix="jsr166."/>
# Line 291 | Line 298
298    <fileset dir="${jtreg8.src.dir}">
299      <patternset id="jdk8.jtreg.tests">
300        <include name="**/*.java"/>
294      <exclude name="**/SpliteratorCharacteristics.java"/>
295      <!-- https://bugs.openjdk.java.net/browse/JDK-6842353 -->
296      <exclude name="**/GCDuringIteration.java"/>
301      </patternset>
302    </fileset>
303  
# Line 325 | Line 329
329      </condition>
330  
331      <delete dir="@{workdir}/JTwork"   quiet="true"/>
328    <delete dir="@{workdir}/JTreport" quiet="true"/>
329    <mkdir dir="@{workdir}/JTwork/scratch"/>
330    <!-- workaround for https://bugs.openjdk.java.net/browse/CODETOOLS-7901571 -->
331    <mkdir dir="@{workdir}/JTreport/html"/>
332    <mkdir dir="@{workdir}/JTreport/text"/>
332      <jtreg dir="${jtreg@{target}.src.dir}"
333             jdk="${jdk@{target}.home}"
334 <           workDir="@{workdir}/JTwork"
336 <           reportDir="@{workdir}/JTreport">
334 >           workDir="@{workdir}/JTwork">
335        <patternset refid="jdk@{target}.jtreg.tests"/>
336        <arg value="-Xbootclasspath/p:@{classes}" unless:set="modules"/>
337 <      <arg value="-Xpatch:${build.classes.dir}" if:set="modules"/>
337 >      <arg value="-javacoptions:--patch-module java.base=@{classes}" if:set="modules"/>
338 >      <arg value="-vmoptions:--patch-module java.base=@{classes}" if:set="modules"/>
339        <arg value="-agentvm"/>
340 +      <arg value="-noreport"/>
341        <arg value="-verbose:${jtreg.verbose}"/>
342        <arg value="-vmoptions:-esa -ea"/>
343        <arg value="-automatic"/>
# Line 392 | Line 392
392             classpath=""
393             includeAntRuntime="false"
394             includeJavaRuntime="false"
395 +           encoding="ASCII"
396             executable="${build.main.javac}"
397             fork="true">
398  
# Line 406 | Line 407
407        <compilerarg line="${build.args}"/>
408  
409      </javac>
409
410    <!-- We need jdk9's Contended annotation, but at compile time only -->
411    <!--
412        <delete file="${destdir}/jdk/internal/vm/annotation/Contended.class"/>
413    -->
410    </target>
411  
412  
413    <target name="jar"
414            depends="compile"
415 <          description="Builds library jar from compiled sources">
416 <
415 >          description="Builds library jar for src/main from compiled sources">
416 >    <local name="subdir"/>
417 >    <available property="subdir" file="${build.classes.dir}/java.base" type="dir" value="/java.base"/>
418      <jar destfile="${product.jar}">
419 <      <fileset dir="${build.classes.dir}"/>
419 >      <fileset dir="${build.classes.dir}${subdir}"/>
420        <manifest>
421          <attribute name="Built-By" value="${user.name}"/>
422          <attribute name="Implementation-Vendor" value="JCP JSR-166 Expert Group."/>
# Line 437 | Line 434
434      <!-- the packagenames="none" hack below prevents scanning the -->
435      <!-- sourcepath for packages -->
436  
437 + <!-- TODO: sourcepath="${src.dir}:${jdk9.src.dir}" -->
438 + <!-- TODO: sourcepath="${src.dir}:${jdk9.src.dir}:${jdk9.src.home}/jdk/src/java.logging/share/classes" -->
439 + <!-- TODO: sourcepath="${src.dir}:${jdk9.home}/src.zip" -->
440 + <!-- TODO: <arg line="-sourcepath ${src.dir}:${jdk9.home}/src.zip"/> -->
441 + <!-- TODO: <arg line="- -module-source-path ${jdk9.home}/src.zip"/> -->
442      <javadoc destdir="${docs.dir}"
443               packagenames="none"
444               link="${java9.api.url}"
445               overview="${src.dir}/intro.html"
446               access="${build.javadoc.access}"
447 <             sourcepath="${src.dir}:${jdk9.src.dir}"
447 >             sourcepath="${src.dir}"
448               classpath=""
449               executable="${javadoc9}">
450        <fileset dir="${src.dir}" defaultexcludes="yes">
# Line 451 | Line 453
453        <arg line="-Xdocrootparent ${java9.docroot.url}"/>
454        <arg line="-Xmaxerrs 1000 -Xmaxwarns 1000"/>
455        <arg value="-XDignore.symbol.file=true"/>
456 < <!--  TODO     <arg value="-Xmodule:java.base"/> -->
456 >      <arg value="-Xmodule:java.base"/>
457        <arg value="-tag"/>
458        <arg value="${javadoc.jls.option}"/>
459 + <!-- @apiNote currently unused -->
460 + <!--       <arg value="-tag"/> -->
461 + <!--       <arg value="apiNote:a:API Note:"/> -->
462        <arg value="-tag"/>
463 <      <arg value="apiNote:a:&lt;em&gt;API Note:&lt;/em&gt;"/>
463 >      <arg value="implSpec:a:Implementation Requirements:"/>
464        <arg value="-tag"/>
465 <      <arg value="implSpec:a:&lt;em&gt;Implementation Requirements:&lt;/em&gt;"/>
466 <      <arg value="-tag"/>
467 <      <arg value="implNote:a:&lt;em&gt;Implementation Note:&lt;/em&gt;"/>
468 < <!-- tags added in jdk9 -->
469 <      <arg value="-tag"/>
470 <      <arg value="revised:X"/>
466 <      <arg value="-tag"/>
467 <      <arg value="spec:X"/>
465 >      <arg value="implNote:a:Implementation Note:"/>
466 > <!-- tags added in jdk9: currently unused -->
467 > <!--       <arg value="-tag"/> -->
468 > <!--       <arg value="revised:X"/> -->
469 > <!--       <arg value="-tag"/> -->
470 > <!--       <arg value="spec:X"/> -->
471      </javadoc>
472    </target>
473  
# Line 525 | Line 528
528  
529    <target name="tck"
530            depends="jar"
531 <          description="Runs tck tests for main directly">
531 >          description="Runs tck tests for src/main directly">
532  
533      <run-tck-tests
534        target="${build.main.java.version}"
# Line 534 | Line 537
537    </target>
538  
539    <target name="tck-parallelism-1"
540 <          description="Runs tck with given common pool parallelism">
540 >          description="Runs tck with common pool parallelism 1">
541      <antcall target="tck">
542        <param name="java.util.concurrent.ForkJoinPool.common.parallelism" value="1"/>
543      </antcall>
544    </target>
545  
546    <target name="tck-parallelism-0"
547 <          description="Runs tck with given common pool parallelism">
547 >          description="Runs tck with common pool parallelism 0">
548      <antcall target="tck">
549        <param name="java.util.concurrent.ForkJoinPool.common.parallelism" value="0"/>
550      </antcall>
551    </target>
552  
553 +  <target name="tck-security-manager"
554 +          description="Runs tck with a security manager">
555 +    <antcall target="tck">
556 +      <param name="jsr166.useSecurityManager" value="true"/>
557 +    </antcall>
558 +  </target>
559 +
560    <target name="jtreg"
561            depends="jar"
562 <          description="Runs jtreg tests for main using the jtreg ant task">
562 >          description="Runs jtreg tests for src/main using the jtreg ant task">
563      <run-jtreg-tests
564         target="${build.main.java.version}"
565         workdir="${build.dir}"
# Line 557 | Line 567
567    </target>
568  
569    <target name="test"
570 <          depends="tck, tck-parallelism-1, jtreg"
571 <          description="Runs tck and jtreg tests for main">
570 >          depends="tck, tck-parallelism-1, tck-parallelism-0, jtreg"
571 >          description="Runs tck and jtreg tests for src/main">
572    </target>
573  
574 <  <target name="jtreg8" description="Runs jtreg tests with jdk8">
574 > <!--   <target name="jtreg8" description="Runs jtreg tests with jdk8"> -->
575  
576 <    <antcall target="jtreg">
577 <      <param name="build.main.java.version" value="8"/>
578 <      <param name="build.main.javac" value="${javac8}"/>
579 <    </antcall>
576 > <!--     <antcall target="jtreg"> -->
577 > <!--       <param name="build.main.java.version" value="8"/> -->
578 > <!--       <param name="build.main.javac" value="${javac8}"/> -->
579 > <!--     </antcall> -->
580  
581 <  </target>
581 > <!--   </target> -->
582  
583 <  <target name="test89"
584 <          description="Runs tck and jtreg tests for main for multiple java versions">
583 > <!--   <target name="test89" -->
584 > <!--           description="Runs tck and jtreg tests for src/main for multiple java versions"> -->
585  
586 <    <antcall target="clean"/>
587 <    <antcall target="test">
588 <      <param name="build.main.java.version" value="8"/>
589 <      <param name="build.main.javac" value="${javac8}"/>
590 <    </antcall>
586 > <!--     <antcall target="clean"/> -->
587 > <!--     <antcall target="test"> -->
588 > <!--       <param name="build.main.java.version" value="8"/> -->
589 > <!--       <param name="build.main.javac" value="${javac8}"/> -->
590 > <!--     </antcall> -->
591  
592 <    <antcall target="clean"/>
593 <    <antcall target="test">
594 <      <param name="build.main.java.version" value="9"/>
595 <      <param name="build.main.javac" value="${javac9}"/>
596 <    </antcall>
592 > <!--     <antcall target="clean"/> -->
593 > <!--     <antcall target="test"> -->
594 > <!--       <param name="build.main.java.version" value="9"/> -->
595 > <!--       <param name="build.main.javac" value="${javac9}"/> -->
596 > <!--     </antcall> -->
597  
598 <  </target>
598 > <!--   </target> -->
599  
600  
601  
# Line 615 | Line 625
625    <!-- Various demos and test programs -->
626  
627  
628 <  <target name="loops" depends="configure-compiler"
629 <          description="Benchmark from Doug Lea's AQS paper">
628 >  <!-- description="Benchmark from Doug Lea's AQS paper" -->
629 >  <target name="loops" depends="configure-compiler">
630  
631      <mkdir dir="${build.loops.dir}"/>
632  
# Line 627 | Line 637
637        deprecation="${build.deprecation}"
638             source="${build.sourcelevel}"
639             target="${build.sourcelevel}"
640 +         encoding="ASCII"
641               fork="true">
642  
643        <compilerarg line="${build.args}"/>
# Line 654 | Line 665
665             deprecation="${build.deprecation}"
666             includeAntRuntime="false"
667             includeJavaRuntime="false"
668 +           encoding="ASCII"
669             executable="${javac9}"
670             fork="true">
671  
# Line 687 | Line 699
699             bootclasspath="${bootclasspath8}"
700             includeAntRuntime="false"
701             includeJavaRuntime="false"
702 +           encoding="ASCII"
703             executable="${javac8}"
704             fork="true">
705  
# Line 717 | Line 730
730             bootclasspath="${bootclasspath8}"
731             includeAntRuntime="false"
732             includeJavaRuntime="false"
733 +           encoding="ASCII"
734             executable="${javac8}"
735             fork="true">
736  
# Line 792 | Line 806
806               access="${build.javadoc.access}"
807               sourcepath="${4jdk8src.dir}:${jdk8.src.dir}"
808               classpath=""
809 <             executable="${javadoc8}">
809 >             executable="${javadoc8}"
810 >             failonerror = "true">
811        <fileset dir="${4jdk8src.dir}" defaultexcludes="yes">
812          <include name="**/*.java"/>
813        </fileset>
# Line 800 | Line 815
815        <arg value="-XDignore.symbol.file=true"/>
816        <arg value="-tag"/>
817        <arg value="${javadoc.jls.option}"/>
818 <      <arg value="-tag"/>
819 <      <arg value="apiNote:a:&lt;em&gt;API Note:&lt;/em&gt;"/>
818 > <!-- @apiNote currently unused -->
819 > <!--       <arg value="-tag"/> -->
820 > <!--       <arg value="apiNote:a:&lt;em&gt;API Note:&lt;/em&gt;"/> -->
821        <arg value="-tag"/>
822        <arg value="implSpec:a:&lt;em&gt;Implementation Requirements:&lt;/em&gt;"/>
823        <arg value="-tag"/>
# Line 855 | Line 871
871             bootclasspath="${bootclasspath6}"
872             includeAntRuntime="false"
873             includeJavaRuntime="false"
874 +           encoding="ASCII"
875             executable="${javac7}"
876             fork="true">
877  
# Line 885 | Line 902
902             bootclasspath="${bootclasspath6}"
903             includeAntRuntime="false"
904             includeJavaRuntime="false"
905 +           encoding="ASCII"
906             executable="${javac8}"
907             fork="true">
908  
# Line 940 | Line 958
958    </target>
959  
960  
961 +  <!-- Runs tck tests for jsr166-4jdk7 via junit task (dead experiment) -->
962    <target name="4jdk7-tck-junit"
963 <          depends="4jdk7compile"
945 <          description="Runs tck tests for jsr166-4jdk7 via junit task (experimental)">
963 >          depends="4jdk7compile">
964  
965      <junit printsummary="true"
966             showoutput="true"
# Line 997 | Line 1015
1015               access="${build.javadoc.access}"
1016               sourcepath="${4jdk7src.dir}:${jdk7.src.dir}"
1017               classpath=""
1018 <             executable="${javadoc7}">
1018 >             executable="${javadoc7}"
1019 >             failonerror = "true">
1020        <fileset dir="${4jdk7src.dir}" defaultexcludes="yes">
1021          <include name="**/*.java"/>
1022        </fileset>
# Line 1051 | Line 1070
1070             target="5"
1071             includeAntRuntime="false"
1072             includeJavaRuntime="false"
1073 +           encoding="ASCII"
1074             executable="${javac7}"
1075             fork="true">
1076  
# Line 1092 | Line 1112
1112               sourcepath="${topsrc.dir}:${jdk6.src.dir}"
1113               bootclasspath="${bootclasspath6}"
1114               source="5"
1115 <             executable="${javadoc7}">
1115 >             executable="${javadoc7}"
1116 >             failonerror = "true">
1117        <arg line="-Xdocrootparent ${java.docroot.url}"/>
1118        <arg value="-XDignore.symbol.file=true"/>
1119  
# Line 1143 | Line 1164
1164             bootclasspath="${bootclasspath6}"
1165             includeAntRuntime="false"
1166             includeJavaRuntime="false"
1167 +           encoding="ASCII"
1168             executable="${javac7}"
1169             fork="true">
1170  
# Line 1184 | Line 1206
1206               sourcepath="${topsrc.dir}:${jdk6.src.dir}"
1207               bootclasspath="${bootclasspath6}"
1208               source="6"
1209 <             executable="${javadoc7}">
1209 >             executable="${javadoc7}"
1210 >             failonerror = "true">
1211        <arg line="-Xdocrootparent ${java.docroot.url}"/>
1212        <arg value="-XDignore.symbol.file=true"/>
1213  
# Line 1236 | Line 1259
1259             target="6"
1260             includeAntRuntime="false"
1261             includeJavaRuntime="false"
1262 +           encoding="ASCII"
1263             executable="${javac7}"
1264             fork="true">
1265  
# Line 1397 | Line 1421
1421               access="${build.javadoc.access}"
1422               sourcepath="${topsrc.dir}:${jdk6.src.dir}"
1423               source="${build.jsr166e.java.version}"
1424 <             executable="${javadoc7}">
1424 >             executable="${javadoc7}"
1425 >             failonerror = "true">
1426        <arg line="-Xdocrootparent ${java.docroot.url}"/>
1427        <arg value="-XDignore.symbol.file=true"/>
1428  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines