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.154 by jsr166, Mon Jun 16 15:55:54 2014 UTC vs.
Revision 1.176 by jsr166, Tue Sep 8 16:54:43 2015 UTC

# Line 24 | Line 24
24    $HOME/jdk/src/jdk9
25    where each of the above is a complete JDK source tree
26    (e.g. mercurial forest) or a symlink to same.
27 +
28 +  Alternatively, define ant variables thus:
29 +  ant -Djdk$N.home=...
30 +  for $N in 6 7 8 9 ...
31   ------------------------------------------------------------------------------
32    </description>
33  
# Line 46 | Line 50
50    <property name="build.deprecation"    value="false"/>
51    <property name="build.javadoc.access" value="protected"/>
52  
53 <  <!-- Tck options; see JSR166TestCase.java -->
54 <  <!-- ant -Djsr166.profileTests=true -Djsr166.runsPerTest=100 test-tck -->
53 >  <!-- Tck options; see JSR166TestCase.java
54 >   To profile a single tck test class:
55 >   ant -Djsr166.profileTests=true -Djsr166.profileThreshold=10 -Djsr166.tckTestClass=CompletableFutureTest tck
56 >   To stress test a single tck test class:
57 >   ant -Djsr166.tckTestClass=CountedCompleterTest -Djsr166.runsPerTest=100 tck
58 >  -->
59    <property name="jsr166.profileTests"     value="false"/>
60    <property name="jsr166.profileThreshold" value="100"/>
61    <property name="jsr166.runsPerTest"      value="1"/>
54  <!-- Allow running an individual tck test class -->
55  <!-- ant -Djsr166.tckTestClass=CountedCompleterTest -Djsr166.runsPerTest=100 test-tck -->
62    <property name="jsr166.tckTestClass"     value="JSR166TestCase"/>
63  
64    <!-- Build locations -->
# Line 123 | Line 129
129    <property name="test.src.dir"         location="${basedir}/src/test"/>
130    <property name="loops.src.dir"        location="${basedir}/src/loops"/>
131    <property name="tck.src.dir"          location="${test.src.dir}/tck"/>
132 <  <property name="jtreg.src.dir"        location="${test.src.dir}/jtreg"/>
132 >  <property name="jtreg7.src.dir"       location="${test.src.dir}/jtreg-jdk7"/>
133 >  <property name="jtreg8.src.dir"       location="${test.src.dir}/jtreg"/>
134 >  <property name="jtreg9.src.dir"       location="${test.src.dir}/jtreg"/>
135 >  <property name="jtreg.src.dir"        location="${jtreg9.src.dir}"/>
136    <property name="lib.dir"              location="${basedir}/lib"/>
137    <property name="dist.dir"             location="${basedir}/dist"/>
138    <property name="topsrc.dir"           location="${basedir}/src"/>
# Line 161 | Line 170
170    <property name="java5.docroot.url"      value="http://docs.oracle.com/javase/1.5.0/docs"/>
171    <property name="java6.docroot.url"      value="http://docs.oracle.com/javase/6/docs"/>
172    <property name="java7.docroot.url"      value="http://docs.oracle.com/javase/7/docs"/>
173 <  <!-- The expected canonical location does not yet exist as of 2014-02 -->
174 <  <!-- <property name="java8.docroot.url" value="http://docs.oracle.com/javase/8/docs"/> -->
166 <  <property name="java8.docroot.url"      value="http://download.java.net/jdk8/docs"/>
167 <  <!-- No published jdk9 docs exist as of 2014-02 -->
173 >  <property name="java8.docroot.url"      value="http://docs.oracle.com/javase/8/docs"/>
174 >  <!-- The expected canonical location does not yet exist as of 2014-07 -->
175    <!-- <property name="java9.docroot.url" value="http://docs.oracle.com/javase/9/docs"/> -->
176 <  <property name="java9.docroot.url"      value="${java8.docroot.url}"/>
176 >  <property name="java9.docroot.url"      value="http://download.java.net/jdk9/docs"/>
177    <!-- Default jdk doc location (latest stable release seems best) -->
178 <  <property name="java.docroot.url"       value="${java7.docroot.url}"/>
178 >  <property name="java.docroot.url"       value="${java8.docroot.url}"/>
179  
180    <!-- Canonical location of jdk API docs, to use with javadoc link attribute -->
181    <property name="java5.api.url"      value="${java5.docroot.url}/api/"/>
# Line 195 | Line 202
202      <attribute name="compile-target" default="@{target}"/>
203      <attribute name="workdir"/>
204      <attribute name="classes"/>
205 <    <attribute name="jvmflags" default="-ea -esa"/>
205 >    <attribute name="jvmflags" default="-ea -esa -Djsr166.testImplementationDetails=true"/>
206      <element name="javac-elements" optional="true"/>
207      <sequential>
208  
# Line 209 | Line 216
216             source="@{compile-target}"
217             target="@{compile-target}"
218             classpath="${junit.jar}"
212           bootclasspath="@{classes}:${bootclasspath@{compile-target}}"
219             includeAntRuntime="false"
220             includeJavaRuntime="false"
221             executable="${javac@{compile-target}}"
# Line 218 | Line 224
224        <include name="*.java"/>
225        <compilerarg value="-XDignore.symbol.file=true"/>
226        <compilerarg value="-Xlint:all,-unchecked,-rawtypes,-serial,-deprecation"/>
227 +      <compilerarg value="-Xbootclasspath/p:@{classes}"/>
228        <compilerarg line="${build.args}"/>
229        <javac-elements/>
230  
# Line 229 | Line 236
236            fork="true">
237          <jvmarg value="-Xbootclasspath/p:@{classes}"/>
238          <jvmarg line="@{jvmflags}"/>
239 +
240 +        <!-- ant -Djava.util.concurrent.ForkJoinPool.common.parallelism=1 tck -->
241 +        <syspropertyset id="java.util.concurrent.ForkJoinPool-properties">
242 +          <propertyref prefix="java.util.concurrent.ForkJoinPool"/>
243 +        </syspropertyset>
244 +
245          <sysproperty key="jsr166.profileTests"     value="${jsr166.profileTests}"/>
246          <sysproperty key="jsr166.profileThreshold" value="${jsr166.profileThreshold}"/>
247          <sysproperty key="jsr166.runsPerTest"      value="${jsr166.runsPerTest}"/>
# Line 241 | Line 254
254      </sequential>
255    </macrodef>
256  
257 +  <!-- Define jtreg test sets for different jdk versions -->
258 +  <fileset dir="${jtreg9.src.dir}">
259 +    <patternset id="jdk9.jtreg.tests">
260 +      <include name="**/*.java"/>
261 +    </patternset>
262 +  </fileset>
263 +
264 +  <fileset dir="${jtreg8.src.dir}">
265 +    <patternset id="jdk8.jtreg.tests">
266 +      <include name="**/*.java"/>
267 +      <exclude name="**/SpliteratorCharacteristics.java"/>
268 +      <!-- https://bugs.openjdk.java.net/browse/JDK-6842353 -->
269 +      <exclude name="**/GCDuringIteration.java"/>
270 +    </patternset>
271 +  </fileset>
272 +
273 +  <fileset dir="${jtreg7.src.dir}">
274 +    <patternset id="jdk7.jtreg.tests">
275 +      <include name="**/*.java"/>
276 +    </patternset>
277 +  </fileset>
278 +
279    <macrodef name="run-jtreg-tests">
280 <    <!-- ant -Djtreg.src.dir=src/test/jtreg/util/concurrent/CompletableFuture test-jtreg -->
246 <    <attribute name="jtreg.src.dir" default="${jtreg.src.dir}"/>
280 >    <!-- ant -Djtreg9.src.dir=src/test/jtreg/util/concurrent/CompletableFuture jtreg -->
281      <attribute name="source" default="7"/>
282      <attribute name="target"/>
283      <attribute name="workdir"/>
# Line 254 | Line 288
288      <delete dir="@{workdir}/JTreport" quiet="true"/>
289      <mkdir dir="@{workdir}/JTwork/scratch"/>
290      <mkdir dir="@{workdir}/JTreport"/>
291 <    <jtreg dir="@{jtreg.src.dir}"
291 >    <jtreg dir="${jtreg@{target}.src.dir}"
292             jdk="${jdk@{target}.home}"
293             workDir="@{workdir}/JTwork"
294             reportDir="@{workdir}/JTreport">
295 <
295 >      <patternset refid="jdk@{target}.jtreg.tests"/>
296        <arg value="-Xbootclasspath/p:@{classes}"/>
297        <arg value="-agentvm"/>
298        <arg value="-v:nopass,fail"/>
# Line 309 | Line 343
343        <compilerarg value="-Xprefer:source"/>
344        <compilerarg value="-XDignore.symbol.file=true"/>
345        <compilerarg value="-Xlint:all"/>
346 +      <compilerarg value="-Werror"/>
347        <compilerarg value="-Xdoclint:all/protected"/>
348        <compilerarg line="-Xmaxerrs 1000 -Xmaxwarns 1000"/>
349        <compilerarg line="${build.args}"/>
# Line 412 | Line 447
447      <mirror-dir src="${docs.dir}" dst="${dist.docs.dir}"/>
448    </target>
449  
450 <
416 <  <target name="test-tck"
450 >  <target name="tck"
451            depends="jar"
452            description="Runs tck tests for main directly">
453  
# Line 423 | Line 457
457        classes="${product.jar}"/>
458    </target>
459  
460 <  <target name="test-jtreg"
460 >  <target name="tck-parallelism-1"
461 >          description="Runs tck with given common pool parallelism">
462 >    <antcall target="tck">
463 >      <param name="java.util.concurrent.ForkJoinPool.common.parallelism" value="1"/>
464 >    </antcall>
465 >  </target>
466 >
467 >  <target name="tck-parallelism-0"
468 >          description="Runs tck with given common pool parallelism">
469 >    <antcall target="tck">
470 >      <param name="java.util.concurrent.ForkJoinPool.common.parallelism" value="0"/>
471 >    </antcall>
472 >  </target>
473 >
474 >  <target name="jtreg"
475            depends="jar"
476            description="Runs jtreg tests for main using the jtreg ant task">
477      <run-jtreg-tests
# Line 433 | Line 481
481    </target>
482  
483    <target name="test"
484 <          depends="test-tck, test-jtreg"
484 >          depends="tck, tck-parallelism-1, jtreg"
485            description="Runs tck and jtreg tests for main">
486    </target>
487  
488 +  <target name="jtreg8" description="Runs jtreg tests with jdk8">
489 +
490 +    <antcall target="jtreg">
491 +      <param name="build.main.java.version" value="8"/>
492 +      <param name="build.main.javac" value="${javac8}"/>
493 +    </antcall>
494 +
495 +  </target>
496 +
497    <target name="test89"
498            description="Runs tck and jtreg tests for main for multiple java versions">
499  
# Line 503 | Line 560
560    </target>
561  
562  
563 +  <target name="compile-test-loops" depends="jar"
564 +          description="compile all the perf tests in src/test/loops">
565 +
566 +    <mkdir dir="${build.dir}/test/loops"/>
567 +
568 +    <javac srcdir="${basedir}/src/test/loops"
569 +           destdir="${build.dir}/test/loops"
570 +           debug="${build.debug}"
571 +           debuglevel="${build.debuglevel}"
572 +           deprecation="${build.deprecation}"
573 +           includeAntRuntime="false"
574 +           includeJavaRuntime="false"
575 +           executable="${javac9}"
576 +           fork="true">
577 +
578 +      <include name="*.java"/>
579 +      <compilerarg value="-XDignore.symbol.file=true"/>
580 +      <compilerarg value="-Xlint:all,-unchecked,-rawtypes,-serial"/>
581 +      <compilerarg value="-Xbootclasspath/p:${product.jar}"/>
582 +      <compilerarg line="${build.args}"/>
583 +
584 +    </javac>
585 +
586 +  </target>
587 +
588 +
589    <!-- jsr166 4jdk7 -->
590  
591    <target name="4jdk7compile"
# Line 528 | Line 611
611        <compilerarg value="-Xprefer:source"/>
612        <compilerarg value="-XDignore.symbol.file=true"/>
613        <compilerarg value="-Xlint:all"/>
614 +      <compilerarg value="-Werror"/>
615        <compilerarg line="${build.args}"/>
616  
617      </javac>
# Line 574 | Line 658
658    </target>
659  
660  
661 <  <target name="4jdk7-test-tck"
661 >  <target name="4jdk7-tck"
662            depends="4jdk7jar"
663            description="Runs tck tests for jsr166-4jdk7 directly">
664  
# Line 586 | Line 670
670          <!-- JDK8+ test classes -->
671          <exclude name="*8Test.java"/>
672          <exclude name="*9Test.java"/>
673 +        <exclude name="*10Test.java"/>
674          <exclude name="DoubleAccumulatorTest.java"/>
675          <exclude name="DoubleAdderTest.java"/>
676          <exclude name="LongAccumulatorTest.java"/>
# Line 593 | Line 678
678          <exclude name="CompletableFutureTest.java"/>
679          <exclude name="SplittableRandomTest.java"/>
680          <exclude name="StampedLockTest.java"/>
681 +        <exclude name="SubmissionPublisherTest.java"/>
682        </javac-elements>
683      </run-tck-tests>
684    </target>
685  
686  
687 <  <target name="4jdk7-test-tck-junit"
687 >  <target name="4jdk7-tck-junit"
688            depends="4jdk7compile"
689            description="Runs tck tests for jsr166-4jdk7 via junit task (experimental)">
690  
# Line 626 | Line 712
712      </junit>
713    </target>
714  
715 <  <target name="4jdk7-test-jtreg"
715 >  <target name="4jdk7-jtreg"
716            depends="4jdk7jar"
717            description="Runs jtreg tests for jsr166-4jdk7 using the jtreg ant task">
718      <run-jtreg-tests
719         target="7"
720         workdir="${build.4jdk7.dir}"
721 <       classes="${4jdk7product.jar}"
636 <       jtregflags="-exclude:${jtreg.src.dir}/jdk8tests"/>
721 >       classes="${4jdk7product.jar}"/>
722    </target>
723  
724  
725    <target name="4jdk7-test"
726 <          depends="4jdk7-test-tck, 4jdk7-test-jtreg"
726 >          depends="4jdk7-tck, 4jdk7-jtreg"
727            description="Runs tck and jtreg tests for jsr166-4jdk7">
728    </target>
729  
# Line 715 | Line 800
800        <include name="jsr166x/**/*.java"/>
801        <compilerarg value="-XDignore.symbol.file=true"/>
802        <compilerarg value="-Xlint:all,-unchecked,-rawtypes"/>
803 +      <compilerarg value="-Werror"/>
804        <compilerarg line="${build.args}"/>
805  
806      </javac>
# Line 801 | Line 887
887        <include name="jsr166y/**/*.java"/>
888        <compilerarg value="-XDignore.symbol.file=true"/>
889        <compilerarg value="-Xlint:all"/>
890 +      <compilerarg value="-Werror"/>
891        <compilerarg line="${build.args}"/>
892  
893      </javac>
# Line 888 | Line 975
975        <include name="extra166y/**/*.java"/>
976        <compilerarg value="-XDignore.symbol.file=true"/>
977        <compilerarg value="-Xlint:all,-unchecked,-rawtypes,-serial"/>
978 +      <compilerarg value="-Werror"/>
979        <compilerarg line="${build.args}"/>
980  
981      </javac>
# Line 975 | Line 1063
1063        <include name="jsr166e/**/*.java"/>
1064        <compilerarg value="-XDignore.symbol.file=true"/>
1065        <compilerarg value="-Xlint:all"/>
1066 +      <compilerarg value="-Werror"/>
1067        <compilerarg line="${build.args}"/>
1068  
1069      </javac>
# Line 1001 | Line 1090
1090        <include name="jsr166e/**/*.java"/>
1091        <compilerarg value="-XDignore.symbol.file=true"/>
1092        <compilerarg value="-Xlint:all"/>
1093 +      <compilerarg value="-Werror"/>
1094        <compilerarg value="-Xdoclint:all/protected"/>
1095  
1096      </javac>
# Line 1038 | Line 1128
1128    </target>
1129  
1130  
1131 <  <target name="jsr166e-test-tck-one-java-version"
1131 >  <target name="jsr166e-tck-one-java-version"
1132            depends="jsr166ejar">
1133  
1134      <echo message="Testing with jdk${build.jsr166e.java.version} ..."/>
# Line 1050 | Line 1140
1140        classes="${jsr166e.jar}"/>
1141    </target>
1142  
1143 <  <target name="jsr166e-test-tck"
1143 >  <target name="jsr166e-tck"
1144            description="Runs tck tests for jsr166e for multiple java versions">
1145  
1146   <!--     <antcall target="clean"/> -->
1147 < <!--     <antcall target="jsr166e-test-tck-one-java-version"> -->
1147 > <!--     <antcall target="jsr166e-tck-one-java-version"> -->
1148   <!--       <param name="build.jsr166e.java.version" value="8"/> -->
1149   <!--       <param name="build.jsr166e.javac" value="${javac8}"/> -->
1150   <!--     </antcall> -->
1151  
1152      <antcall target="clean"/>
1153 <    <antcall target="jsr166e-test-tck-one-java-version">
1153 >    <antcall target="jsr166e-tck-one-java-version">
1154        <param name="build.jsr166e.java.version" value="7"/>
1155        <param name="build.jsr166e.javac" value="${javac7}"/>
1156      </antcall>
1157  
1158      <antcall target="clean"/>
1159 <    <antcall target="jsr166e-test-tck-one-java-version">
1159 >    <antcall target="jsr166e-tck-one-java-version">
1160        <param name="build.jsr166e.java.version" value="6"/>
1161        <param name="build.jsr166e.javac" value="${javac6}"/>
1162      </antcall>
# Line 1074 | Line 1164
1164  
1165  
1166    <target name="jsr166e-test"
1167 <          depends="jsr166e-test-tck"
1167 >          depends="jsr166e-tck"
1168            description="Runs all tests for jsr166e">
1169    </target>
1170  
# Line 1104 | Line 1194
1194  
1195    <target name="lint">
1196      <antcall target="dists">
1197 +      <param name="build.javadoc.access" value="public"/>
1198 +    </antcall>
1199 +  </target>
1200 +
1201 + <!-- Generates all doclint warnings, even for private methods (rarely useful) -->
1202 +  <target name="lint-private">
1203 +    <antcall target="dist">
1204        <param name="build.javadoc.access" value="private"/>
1205      </antcall>
1206    </target>

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines