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.129 by jsr166, Wed Jan 23 07:17:13 2013 UTC vs.
Revision 1.139 by jsr166, Thu May 2 21:38:03 2013 UTC

# Line 22 | Line 22
22    $HOME/jdk/src/jdk8
23    where each of the above is a complete JDK source tree
24    (e.g. mercurial forest) or a symlink to same.
25 + As of 2013-02, the very latest lambda 8 jdk is needed for jdk8.
26   ------------------------------------------------------------------------------
27    </description>
28  
# Line 41 | Line 42
42    <property name="build.debug"          value="true"/>
43    <property name="build.debuglevel"     value="source,lines,vars"/>
44    <property name="build.deprecation"    value="false"/>
45 +  <property name="build.javadoc.access" value="protected"/>
46 +
47 +  <!-- Tck options; see JSR166TestCase.java -->
48 +  <!-- Use via, e.g. 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  
53    <!-- Build locations -->
54    <property name="build.dir"                   location="build"/>
# Line 168 | Line 176
176  
177    <macrodef name="run-tck-tests">
178      <attribute name="tck.src.dir" default="${tck.src.dir}"/>
171    <attribute name="source" default="6"/>
179      <attribute name="target"/>
180 +    <attribute name="compile-target" default="@{target}"/>
181      <attribute name="workdir"/>
182      <attribute name="classes"/>
183      <attribute name="jvmflags" default=""/>
184 +    <element name="javac-elements" optional="true"/>
185      <sequential>
186  
187      <mkdir dir="@{workdir}/tck-classes"/>
# Line 182 | Line 191
191             debug="${build.debug}"
192             debuglevel="${build.debuglevel}"
193             deprecation="${build.deprecation}"
194 <           source="@{source}"
194 >           source="@{compile-target}"
195 >           target="@{compile-target}"
196             classpath="${junit.jar}"
197 <           bootclasspath="@{classes}:${bootclasspath@{source}}"
197 >           bootclasspath="@{classes}:${bootclasspath@{compile-target}}"
198             includeAntRuntime="false"
199             includeJavaRuntime="false"
200 <           executable="${javac@{target}}"
200 >           executable="${javac@{compile-target}}"
201             fork="true">
202  
203        <include name="*.java"/>
204        <compilerarg value="-XDignore.symbol.file=true"/>
205        <compilerarg value="-Xlint:all,-unchecked,-rawtypes,-serial,-deprecation"/>
206        <compilerarg line="${build.args}"/>
207 +      <javac-elements/>
208  
209      </javac>
210  
# Line 203 | Line 214
214            fork="true">
215          <jvmarg value="-Xbootclasspath/p:@{classes}"/>
216          <jvmarg line="@{jvmflags}"/>
217 +        <sysproperty key="jsr166.profileTests"     value="${jsr166.profileTests}"/>
218 +        <sysproperty key="jsr166.profileThreshold" value="${jsr166.profileThreshold}"/>
219 +        <sysproperty key="jsr166.runsPerTest"      value="${jsr166.runsPerTest}"/>
220          <classpath>
221            <pathelement location="${junit.jar}"/>
222            <pathelement location="@{workdir}/tck-classes"/>
# Line 212 | Line 226
226      </sequential>
227    </macrodef>
228  
229 +  <macrodef name="run-jtreg-tests">
230 +    <attribute name="jtreg.src.dir" default="${jtreg.src.dir}"/>
231 +    <attribute name="source" default="7"/>
232 +    <attribute name="target"/>
233 +    <attribute name="workdir"/>
234 +    <attribute name="classes"/>
235 +    <attribute name="jtregflags" default=""/>
236 +    <sequential>
237 +    <delete dir="@{workdir}/JTwork"   quiet="true"/>
238 +    <delete dir="@{workdir}/JTreport" quiet="true"/>
239 +    <mkdir dir="@{workdir}/JTwork/scratch"/>
240 +    <mkdir dir="@{workdir}/JTreport"/>
241 +    <jtreg dir="@{jtreg.src.dir}"
242 +           jdk="${jdk@{target}.home}"
243 +           workDir="@{workdir}/JTwork"
244 +           reportDir="@{workdir}/JTreport">
245 +
246 +      <arg value="-Xbootclasspath/p:@{classes}"/>
247 +      <arg value="-agentvm"/>
248 +      <arg value="-v:nopass,fail"/>
249 +      <arg value="-vmoptions:-esa -ea"/>
250 +      <arg value="-automatic"/>
251 +      <arg value="-k:!ignore"/>
252 +      <arg line="@{jtregflags}"/>
253 +    </jtreg>
254 +    </sequential>
255 +  </macrodef>
256 +
257    <!-- ALoops classpath -->
258    <path id="loops.classpath">
259      <pathelement location="${build.loops.dir}"/>
# Line 245 | Line 287
287             fork="true">
288  
289        <include name="**/*.java"/>
290 +      <compilerarg value="-Xprefer:source"/>
291        <compilerarg value="-XDignore.symbol.file=true"/>
292        <compilerarg value="-Xlint:all"/>
293        <compilerarg line="${build.args}"/>
# Line 281 | Line 324
324               packagenames="none"
325               link="${jdkapi8docs.url}"
326               overview="${src.dir}/intro.html"
327 +             access="${build.javadoc.access}"
328               sourcepath="${src.dir}:${jdk8src.dir}"
329               classpath=""
330               executable="${javadoc8}">
# Line 410 | Line 454
454  
455    </target>
456  
457 +  <target name="test-tck"
458 +          depends="jar"
459 +          description="Runs tck tests for main directly">
460 +
461 +    <run-tck-tests
462 +      target="8"
463 +      workdir="${build.dir}"
464 +      classes="${product.jar}"/>
465 +  </target>
466 +
467 +  <target name="test-jtreg"
468 +          depends="jar"
469 +          description="Runs jtreg tests for main using the jtreg ant task">
470 +    <run-jtreg-tests
471 +       target="8"
472 +       workdir="${build.dir}"
473 +       classes="${product.jar}"/>
474 +  </target>
475 +
476 +  <target name="test-ng"
477 +          depends="test-tck, test-jtreg"
478 +          description="Runs tck and jtreg tests for main">
479 +  </target>
480  
481    <target name="run-tests"
482            depends="compile-tests">
# Line 576 | Line 643
643             fork="true">
644  
645        <include name="**/*.java"/>
646 +      <compilerarg value="-Xprefer:source"/>
647        <compilerarg value="-XDignore.symbol.file=true"/>
648        <compilerarg value="-Xlint:all"/>
649        <compilerarg line="${build.args}"/>
# Line 602 | Line 670
670      <run-tck-tests
671        target="7"
672        workdir="${build.4jdk7.dir}"
673 <      classes="${4jdk7product.jar}"/>
673 >      classes="${4jdk7product.jar}">
674 >      <javac-elements>
675 >        <!-- JDK8+ test classes -->
676 >        <exclude name="*8Test.java"/>
677 >        <exclude name="DoubleAccumulatorTest.java"/>
678 >        <exclude name="DoubleAdderTest.java"/>
679 >        <exclude name="LongAccumulatorTest.java"/>
680 >        <exclude name="LongAdderTest.java"/>
681 >        <exclude name="CompletableFutureTest.java"/>
682 >        <exclude name="StampedLockTest.java"/>
683 >      </javac-elements>
684 >    </run-tck-tests>
685    </target>
686  
687  
# Line 635 | Line 714
714    </target>
715  
716    <target name="4jdk7-test-jtreg"
717 <          depends="4jdk7compile"
717 >          depends="4jdk7jar"
718            description="Runs jtreg tests for jsr166-4jdk7 using the jtreg ant task">
719 <    <delete dir="${build.4jdk7.dir}/JTwork"   quiet="true"/>
720 <    <delete dir="${build.4jdk7.dir}/JTreport" quiet="true"/>
721 <    <mkdir dir="${build.4jdk7.dir}/JTwork/scratch"/>
722 <    <mkdir dir="${build.4jdk7.dir}/JTreport"/>
644 <    <jtreg dir="${jtreg.src.dir}"
645 <           jdk="${jdk7.home}"
646 <           workDir="${build.4jdk7.dir}/JTwork"
647 <           reportDir="${build.4jdk7.dir}/JTreport">
648 <
649 <      <arg value="-Xbootclasspath/p:${4jdk7product.jar}"/>
650 <      <arg value="-agentvm"/>
651 <      <arg value="-v:nopass,fail"/>
652 <      <arg value="-vmoptions:-esa -ea"/>
653 <      <arg value="-automatic"/>
654 <      <arg value="-k:!ignore"/>
655 <    </jtreg>
719 >    <run-jtreg-tests
720 >       target="7"
721 >       workdir="${build.4jdk7.dir}"
722 >       classes="${4jdk7product.jar}"/>
723    </target>
724  
725  
# Line 672 | Line 739
739               packagenames="none"
740               link="${jdkapi7docs.url}"
741               overview="${4jdk7src.dir}/intro.html"
742 +             access="${build.javadoc.access}"
743               sourcepath="${4jdk7src.dir}:${jdk7src.dir}"
744               classpath=""
745               executable="${javadoc7}">
# Line 763 | Line 831
831      <javadoc destdir="${jsr166xdocs.dir}"
832               packagenames="jsr166x.*"
833               link="${jdkapidocs.url}"
834 +             access="${build.javadoc.access}"
835               sourcepath="${topsrc.dir}:${jdk6src.dir}"
836               bootclasspath="${bootclasspath6}"
837               source="5"
# Line 853 | Line 922
922      <javadoc destdir="${jsr166ydocs.dir}"
923               packagenames="jsr166y.*"
924               link="${jdkapidocs.url}"
925 +             access="${build.javadoc.access}"
926               sourcepath="${topsrc.dir}:${jdk6src.dir}"
927               bootclasspath="${bootclasspath6}"
928               source="6"
# Line 943 | Line 1013
1013      <javadoc destdir="${extra166ydocs.dir}"
1014               packagenames="extra166y.*"
1015               link="${jdkapidocs.url}"
1016 +             access="${build.javadoc.access}"
1017               sourcepath="${topsrc.dir}:${jdk6src.dir}"
1018               bootclasspath="${bootclasspath6}"
1019               source="6"
# Line 1030 | Line 1101
1101      <javadoc destdir="${jsr166edocs.dir}"
1102               packagenames="jsr166e.*"
1103               link="${jdkapidocs.url}"
1104 +             access="${build.javadoc.access}"
1105               sourcepath="${topsrc.dir}:${jdk7src.dir}"
1106               source="7"
1107               executable="${javadoc7}">
# Line 1045 | Line 1117
1117  
1118      <run-tck-tests
1119        tck.src.dir="${test.src.dir}/tck-jsr166e"
1120 <      source="7"
1049 <      target="8"
1120 >      target="7"
1121        workdir="${build.jsr166e.dir}"
1122        classes="${jsr166e.jar}"/>
1123    </target>
# Line 1078 | Line 1149
1149      <mirror-dir src="${jsr166edocs.dir}" dst="${dist.jsr166edocs.dir}"/>
1150    </target>
1151  
1152 +
1153 + <!-- Find buglets that can be detected by static build tools -->
1154 +
1155 +  <target name="lint">
1156 +    <antcall target="dists">
1157 +      <param name="build.javadoc.access" value="private"/>
1158 +    </antcall>
1159 +  </target>
1160 +
1161 +
1162   </project>

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines