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.212 by jsr166, Sat May 21 00:35:58 2016 UTC vs.
Revision 1.231 by jsr166, Sun Jan 29 20:19:00 2017 UTC

# Line 1 | Line 1
1   <project name="jsr166" default="usage"
2 <  xmlns:if="ant:if" xmlns:unless="ant:unless">
2 >  xmlns:if="ant:if" xmlns:unless="ant:unless"
3 >  xmlns:ivy="antlib:org.apache.ivy.ant">
4  
5    <description>
6   ------------------------------------------------------------------------------
# Line 63 | Line 64
64    <property name="build.classes.dir"           location="${build.dir}/classes"/>
65    <property name="build.testcases.dir"         location="${build.dir}/testcases"/>
66    <property name="build.loops.dir"             location="${build.dir}/loops"/>
66  <property name="build.reports.dir"           location="${build.dir}/reports"/>
67  
68    <property name="build.4jdk7.dir"             location="${build.dir}/jsr166-4jdk7"/>
69    <property name="build.4jdk7.classes.dir"     location="${build.4jdk7.dir}/classes"/>
# Line 188 | Line 188
188    <property name="java8.docroot.url"      value="http://docs.oracle.com/javase/8/docs"/>
189    <!-- The expected canonical location does not yet exist as of 2016-04 -->
190    <!-- <property name="java9.docroot.url" value="http://docs.oracle.com/javase/9/docs"/> -->
191 <  <property name="java9.docroot.url"      value="http://http://download.java.net/java/jdk9/docs"/>
191 >  <property name="java9.docroot.url"      value="http://download.java.net/java/jdk9/docs"/>
192    <!-- Default jdk doc location (latest stable release seems best) -->
193    <property name="java.docroot.url"       value="${java8.docroot.url}"/>
194  
# Line 245 | Line 245
245             classpath="${junit.jar}"
246             includeAntRuntime="false"
247             includeJavaRuntime="false"
248 +           encoding="ASCII"
249             executable="${javac@{compile-target}}"
250             fork="true">
251  
# Line 252 | Line 253
253        <compilerarg value="-XDignore.symbol.file=true"/>
254        <compilerarg value="-Xlint:all,-unchecked,-rawtypes,-serial,-deprecation,-try"/>
255        <compilerarg value="-Xbootclasspath/p:@{classes}" unless:set="modules"/>
256 <      <compilerarg value="-Xpatch:java.base=${build.classes.dir}/java.base" if:set="modules"/>
256 >      <compilerarg line="--patch-module java.base=@{classes}" if:set="modules"/>
257        <compilerarg line="${build.args}"/>
258        <javac-elements/>
259  
# Line 263 | Line 264
264            jvm="${java@{target}}"
265            fork="true">
266          <jvmarg value="-Xbootclasspath/p:@{classes}" unless:set="modules"/>
267 <        <jvmarg value="-Xpatch:java.base=${build.classes.dir}/java.base" if:set="modules"/>
267 >        <jvmarg line="--patch-module java.base=@{classes}" if:set="modules"/>
268 >        <jvmarg line="--add-opens java.base/java.lang=ALL-UNNAMED" if:set="modules"/>
269 >        <jvmarg line="--add-opens java.base/java.util=ALL-UNNAMED" if:set="modules"/>
270 >        <jvmarg line="--add-opens java.base/java.util.concurrent=ALL-UNNAMED" if:set="modules"/>
271 >        <jvmarg line="--add-opens java.base/java.util.concurrent.atomic=ALL-UNNAMED" if:set="modules"/>
272 >        <jvmarg line="--add-opens java.base/java.util.concurrent.locks=ALL-UNNAMED" if:set="modules"/>
273          <jvmarg line="@{jvmflags}"/>
274 +        <!-- ant -Dvmoptions="-Xmx8m" -Djsr166.tckTestClass=CompletableFutureTest tck -->
275 +        <jvmarg line="${vmoptions}" if:set="vmoptions"/>
276  
277 <        <!-- ant -Djava.util.concurrent.ForkJoinPool.common.parallelism=1 tck -->
277 >        <!-- ant -Djava.util.concurrent.ForkJoinPool.common.parallelism=1 tck -->
278          <syspropertyset id="system-properties-used-by-tck">
279            <propertyref prefix="java.util.concurrent.ForkJoinPool"/>
280            <propertyref prefix="jsr166."/>
# Line 292 | Line 300
300    <fileset dir="${jtreg8.src.dir}">
301      <patternset id="jdk8.jtreg.tests">
302        <include name="**/*.java"/>
295      <exclude name="**/SpliteratorCharacteristics.java"/>
296      <!-- https://bugs.openjdk.java.net/browse/JDK-6842353 -->
297      <exclude name="**/GCDuringIteration.java"/>
303      </patternset>
304    </fileset>
305  
# Line 326 | Line 331
331      </condition>
332  
333      <delete dir="@{workdir}/JTwork"   quiet="true"/>
329    <delete dir="@{workdir}/JTreport" quiet="true"/>
334      <jtreg dir="${jtreg@{target}.src.dir}"
335             jdk="${jdk@{target}.home}"
336 <           workDir="@{workdir}/JTwork"
333 <           reportDir="@{workdir}/JTreport">
336 >           workDir="@{workdir}/JTwork">
337        <patternset refid="jdk@{target}.jtreg.tests"/>
338        <arg value="-Xbootclasspath/p:@{classes}" unless:set="modules"/>
339 <      <arg value="-vmoption:-Xpatch:java.base=${build.classes.dir}/java.base" if:set="modules"/>
339 >      <arg value="-javacoptions:--patch-module java.base=@{classes}" if:set="modules"/>
340 >      <arg value="-vmoptions:--patch-module java.base=@{classes}" if:set="modules"/>
341        <arg value="-agentvm"/>
342 +      <arg value="-noreport"/>
343        <arg value="-verbose:${jtreg.verbose}"/>
344        <arg value="-vmoptions:-esa -ea"/>
345        <arg value="-automatic"/>
# Line 389 | Line 394
394             classpath=""
395             includeAntRuntime="false"
396             includeJavaRuntime="false"
397 +           encoding="ASCII"
398             executable="${build.main.javac}"
399             fork="true">
400  
# Line 430 | Line 436
436      <!-- the packagenames="none" hack below prevents scanning the -->
437      <!-- sourcepath for packages -->
438  
439 + <!-- TODO: sourcepath="${src.dir}:${jdk9.src.dir}" -->
440 + <!-- TODO: sourcepath="${src.dir}:${jdk9.src.dir}:${jdk9.src.home}/jdk/src/java.logging/share/classes" -->
441 + <!-- TODO: sourcepath="${src.dir}:${jdk9.home}/src.zip" -->
442 + <!-- TODO: <arg line="-sourcepath ${src.dir}:${jdk9.home}/src.zip"/> -->
443 + <!-- TODO: <arg line="- -module-source-path ${jdk9.home}/src.zip"/> -->
444      <javadoc destdir="${docs.dir}"
445               packagenames="none"
446               link="${java9.api.url}"
447               overview="${src.dir}/intro.html"
448               access="${build.javadoc.access}"
449 <             sourcepath="${src.dir}:${jdk9.src.dir}"
449 >             sourcepath="${src.dir}"
450               classpath=""
451               executable="${javadoc9}">
452        <fileset dir="${src.dir}" defaultexcludes="yes">
# Line 444 | Line 455
455        <arg line="-Xdocrootparent ${java9.docroot.url}"/>
456        <arg line="-Xmaxerrs 1000 -Xmaxwarns 1000"/>
457        <arg value="-XDignore.symbol.file=true"/>
458 < <!--  TODO     <arg value="-Xmodule:java.base"/> -->
458 >      <arg value="-Xmodule:java.base"/>
459        <arg value="-tag"/>
460        <arg value="${javadoc.jls.option}"/>
461 + <!-- @apiNote currently unused -->
462 + <!--       <arg value="-tag"/> -->
463 + <!--       <arg value="apiNote:a:API Note:"/> -->
464        <arg value="-tag"/>
465 <      <arg value="apiNote:a:&lt;em&gt;API Note:&lt;/em&gt;"/>
465 >      <arg value="implSpec:a:Implementation Requirements:"/>
466        <arg value="-tag"/>
467 <      <arg value="implSpec:a:&lt;em&gt;Implementation Requirements:&lt;/em&gt;"/>
468 <      <arg value="-tag"/>
469 <      <arg value="implNote:a:&lt;em&gt;Implementation Note:&lt;/em&gt;"/>
470 < <!-- tags added in jdk9 -->
471 <      <arg value="-tag"/>
472 <      <arg value="revised:X"/>
459 <      <arg value="-tag"/>
460 <      <arg value="spec:X"/>
467 >      <arg value="implNote:a:Implementation Note:"/>
468 > <!-- tags added in jdk9: currently unused -->
469 > <!--       <arg value="-tag"/> -->
470 > <!--       <arg value="revised:X"/> -->
471 > <!--       <arg value="-tag"/> -->
472 > <!--       <arg value="spec:X"/> -->
473      </javadoc>
474    </target>
475  
# Line 540 | Line 552
552      </antcall>
553    </target>
554  
555 +  <target name="tck-security-manager"
556 +          description="Runs tck with a security manager">
557 +    <antcall target="tck">
558 +      <param name="jsr166.useSecurityManager" value="true"/>
559 +    </antcall>
560 +  </target>
561 +
562    <target name="jtreg"
563            depends="jar"
564            description="Runs jtreg tests for src/main using the jtreg ant task">
# Line 620 | Line 639
639        deprecation="${build.deprecation}"
640             source="${build.sourcelevel}"
641             target="${build.sourcelevel}"
642 +         encoding="ASCII"
643               fork="true">
644  
645        <compilerarg line="${build.args}"/>
# Line 647 | Line 667
667             deprecation="${build.deprecation}"
668             includeAntRuntime="false"
669             includeJavaRuntime="false"
670 +           encoding="ASCII"
671             executable="${javac9}"
672             fork="true">
673  
# Line 680 | Line 701
701             bootclasspath="${bootclasspath8}"
702             includeAntRuntime="false"
703             includeJavaRuntime="false"
704 +           encoding="ASCII"
705             executable="${javac8}"
706             fork="true">
707  
# Line 710 | Line 732
732             bootclasspath="${bootclasspath8}"
733             includeAntRuntime="false"
734             includeJavaRuntime="false"
735 +           encoding="ASCII"
736             executable="${javac8}"
737             fork="true">
738  
# Line 794 | Line 817
817        <arg value="-XDignore.symbol.file=true"/>
818        <arg value="-tag"/>
819        <arg value="${javadoc.jls.option}"/>
820 <      <arg value="-tag"/>
821 <      <arg value="apiNote:a:&lt;em&gt;API Note:&lt;/em&gt;"/>
820 > <!-- @apiNote currently unused -->
821 > <!--       <arg value="-tag"/> -->
822 > <!--       <arg value="apiNote:a:&lt;em&gt;API Note:&lt;/em&gt;"/> -->
823        <arg value="-tag"/>
824        <arg value="implSpec:a:&lt;em&gt;Implementation Requirements:&lt;/em&gt;"/>
825        <arg value="-tag"/>
# Line 849 | Line 873
873             bootclasspath="${bootclasspath6}"
874             includeAntRuntime="false"
875             includeJavaRuntime="false"
876 +           encoding="ASCII"
877             executable="${javac7}"
878             fork="true">
879  
# Line 879 | Line 904
904             bootclasspath="${bootclasspath6}"
905             includeAntRuntime="false"
906             includeJavaRuntime="false"
907 +           encoding="ASCII"
908             executable="${javac8}"
909             fork="true">
910  
# Line 1046 | Line 1072
1072             target="5"
1073             includeAntRuntime="false"
1074             includeJavaRuntime="false"
1075 +           encoding="ASCII"
1076             executable="${javac7}"
1077             fork="true">
1078  
# Line 1139 | Line 1166
1166             bootclasspath="${bootclasspath6}"
1167             includeAntRuntime="false"
1168             includeJavaRuntime="false"
1169 +           encoding="ASCII"
1170             executable="${javac7}"
1171             fork="true">
1172  
# Line 1233 | Line 1261
1261             target="6"
1262             includeAntRuntime="false"
1263             includeJavaRuntime="false"
1264 +           encoding="ASCII"
1265             executable="${javac7}"
1266             fork="true">
1267  
# Line 1480 | Line 1509
1509      </antcall>
1510    </target>
1511  
1512 + <!-- ==============================================================
1513 +  Running guava tests against jsr166 code
1514 + =================================================================== -->
1515 +
1516 + <!-- <ivy:cachepath pathid="lib.path.id" inline="true" conf="*" -->
1517 + <!--   organisation="com.google.guava" module="guava-testlib" revision="21.0"/> -->
1518 + <!-- <property name="guava.version" value="21.0"/> -->
1519 +
1520 + <!-- HOWTO debug print a path id -->
1521 + <!-- <pathconvert property="guava.testlib.classpath" refid="guava.testlib.classpath" /> -->
1522 + <!-- <echo message="guava.testlib.classpath=${guava.testlib.classpath}"/> -->
1523 +
1524 + <!-- <ivy:retrieve pathid="guava.tests.classpath" type="jar" inline="true" conf="*" pattern="${lib.dir}/[type]/[artifact].[ext]" -->
1525 + <!--   organisation="com.google.guava" module="guava-tests"/> -->
1526 + <!-- <get src="http://repo2.maven.org/maven2/com/google/guava/guava-tests/${guava.version}/guava-tests-${guava.version}-tests.jar" -->
1527 + <!--   dest="${lib.dir}/jar/guava-tests-tests.jar" usetimestamp="true"/> -->
1528 + <!--     <ivy:cachepath pathid="lib.path.id" inline="true" conf="*" type="*" -->
1529 + <!--       organisation="com.google.guava" module="guava-testlib" revision="${guava.version}"/> -->
1530 +
1531 + <!-- <test name="com.google.common.collect.testing.TestsForQueuesInJavaUtil"/> -->
1532 + <!-- <test name="com.google.common.collect.testing.TestsForListsInJavaUtil"/> -->
1533 + <!-- <test name="com.google.common.collect.testing.TestsForSetsInJavaUtil"/> -->
1534 + <!-- <test name="com.google.common.collect.testing.TestsForMapsInJavaUtil"/> -->
1535 +
1536 + <!-- <ivy:retrieve pathid="guava.testlib.classpath" -->
1537 + <!--   type="*" inline="true" conf="*(private),*(public)" -->
1538 + <!--   pattern="${guava.dir}/[artifact].[ext]" -->
1539 + <!--   organisation="com.google.guava" module="guava-testlib"/> -->
1540 +
1541 + <!-- Work around bug below by downloading guava-testlib-tests.jar "by hand": -->
1542 + <!-- https://issues.apache.org/jira/browse/IVY-1444 -->
1543 + <!-- maven tests artifacts cannot be downloaded because they are mapped to private configurations -->
1544 +
1545 +  <target name="init-ivy">
1546 +    <get src="http://repo2.maven.org/maven2/org/apache/ivy/ivy/2.4.0/ivy-2.4.0.jar"
1547 +         dest="${build.dir}/ivy.jar" usetimestamp="true" skipexisting="true"/>
1548 +    <taskdef resource="org/apache/ivy/ant/antlib.xml" uri="antlib:org.apache.ivy.ant"
1549 +             classpath="${build.dir}/ivy.jar"/>
1550 +  </target>
1551 +
1552 +  <target name="guava-tests" depends="jar, init-ivy"
1553 +          description="Guava tests run against jsr166 collections">
1554 +    <property name="guava.dir" value="${build.dir}/guava-testlib"/>
1555 +    <mkdir dir="${guava.dir}"/>
1556 +    <ivy:retrieve pathid="guava.testlib.classpath"
1557 +      type="jar,bundle" inline="true" conf="default,master"
1558 +      pattern="${guava.dir}/[artifact].[ext]"
1559 +      organisation="com.google.guava" module="guava-testlib"/>
1560 +    <property name="guava.version" value="21.0"/>
1561 +    <get src="http://repo2.maven.org/maven2/com/google/guava/guava-testlib/${guava.version}/guava-testlib-${guava.version}-tests.jar"
1562 +         dest="${guava.dir}/guava-testlib-tests.jar" usetimestamp="true"/>
1563 +    <junit printsummary="true" showoutput="true" haltonfailure="true"
1564 +           jvm="${java9}" fork="true">
1565 +      <jvmarg line="-ea -esa --patch-module java.base=${product.jar}"/>
1566 +      <formatter type="brief"/>
1567 +      <classpath>
1568 +        <pathelement location="${guava.dir}/guava-testlib-tests.jar"/>
1569 +        <path refid="guava.testlib.classpath"/>
1570 +      </classpath>
1571 +
1572 +      <!-- "6" in "OpenJdk6Tests" misleadingly means "6+" -->
1573 +      <test name="com.google.common.collect.testing.OpenJdk6Tests"/>
1574 +    </junit>
1575 +  </target>
1576  
1577   </project>

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines