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.179 by jsr166, Sun Sep 13 03:22:29 2015 UTC vs.
Revision 1.186 by jsr166, Wed Sep 30 18:12:20 2015 UTC

# Line 29 | Line 29
29    Alternatively, define ant variables thus:
30    ant -Djdk$N.home=...
31    for $N in 6 7 8 9 ...
32 +
33 +  As of 2015-09, there is incomplete hacky support for jigsaw
34 +  Build for jigsaw using something like:
35 +  ant -Djdk9.home="$HOME/jdk/jigsaw" -Djdk9.src.dir="$HOME/jdk/src/jigsaw" clean test dist
36 +  "docs" target is still broken.
37   ------------------------------------------------------------------------------
38    </description>
39  
# Line 52 | Line 57
57    <property name="build.deprecation"    value="false"/>
58    <property name="build.javadoc.access" value="protected"/>
59  
55  <!-- Tck options; see JSR166TestCase.java
56   To profile a single tck test class:
57   ant -Djsr166.profileTests=true -Djsr166.profileThreshold=10 -Djsr166.tckTestClass=CompletableFutureTest tck
58   To stress test a single tck test class:
59   ant -Djsr166.tckTestClass=CountedCompleterTest -Djsr166.runsPerTest=100 tck
60  -->
61  <property name="jsr166.profileTests"     value="false"/>
62  <property name="jsr166.profileThreshold" value="100"/>
63  <property name="jsr166.runsPerTest"      value="1"/>
64  <property name="jsr166.tckTestClass"     value="JSR166TestCase"/>
65
60    <!-- Build locations -->
61    <property name="build.dir"                   location="build"/>
62    <property name="build.classes.dir"           location="${build.dir}/classes"/>
# Line 95 | Line 89
89      <property name="java@{v}"       location="${jdk@{v}.home}/bin/java"/>
90      <property name="javac@{v}"      location="${jdk@{v}.home}/bin/javac"/>
91      <property name="javadoc@{v}"    location="${jdk@{v}.home}/bin/javadoc"/>
92 <    <available property="jdk@{v}.have.java.base"
92 >    <local name="have.java.base"/>
93 >    <available property="have.java.base"
94        file="${jdks.home}/src/jdk@{v}/jdk/src/java.base/share/classes" type="dir"/>
95      <property name="jdk@{v}src.dir" location="${jdks.home}/src/jdk@{v}/jdk/src/java.base/share/classes"
96 <      if:set="jdk@{v}.have.java.base"/>
96 >      if:set="have.java.base"/>
97      <property name="jdk@{v}src.dir" location="${jdks.home}/src/jdk@{v}/jdk/src/share/classes"
98 <      unless:set="jdk@{v}.have.java.base"/>
98 >      unless:set="have.java.base"/>
99 >    <local name="modules"/>
100 >    <available property="modules" file="${jdk@{v}.home}/jmods" type="dir"/>
101      <local name="boot.jar.dir"/>
102 <    <property name="boot.jar.dir"   location="${jdk@{v}.home}/jre/lib"/>
103 <    <path id="bootclasspath@{v}">
102 >    <property name="boot.jar.dir"   location="${jdk@{v}.home}/jre/lib" unless:set="modules"/>
103 >    <path id="bootclasspath@{v}" unless:set="modules">
104        <pathelement path="${boot.jar.dir}/resources.jar"/>
105        <pathelement path="${boot.jar.dir}/rt.jar"/>
106        <pathelement path="${boot.jar.dir}/jsse.jar"/>
107        <pathelement path="${boot.jar.dir}/jce.jar"/>
108        <pathelement path="${boot.jar.dir}/charsets.jar"/>
109      </path>
110 <    <property name="bootclasspath@{v}" value="${toString:bootclasspath@{v}}"/>
110 >    <property name="bootclasspath@{v}" value="${toString:bootclasspath@{v}}" unless:set="modules"/>
111      </sequential>
112    </macrodef>
113  
# Line 197 | Line 194
194    <taskdef name="jtreg" classname="com.sun.javatest.regtest.Main$$Ant"
195             classpath="${lib.dir}/jtreg.jar" />
196  
197 <  <!-- Test classpath -->
198 <  <path id="test.classpath">
199 <    <pathelement location="${build.testcases.dir}"/>
200 <    <pathelement location="${junit.jar}"/>
201 <  </path>
202 <
197 >  <!-- Tck options; see JSR166TestCase.java
198 >   To profile a single tck test class:
199 >   ant -Djsr166.profileTests=true -Djsr166.profileThreshold=10 -Djsr166.tckTestClass=CompletableFutureTest tck
200 >   To stress test a single tck test class:
201 >   ant -Djsr166.tckTestClass=CountedCompleterTest -Djsr166.runsPerTest=100 tck
202 >   To stress test a single tck test method:
203 >   ant -Djsr166.tckTestClass=RecursiveTaskTest -Djsr166.runsPerTest=1000 -Djsr166.methodFilter=testAbnormalInvokeAll3 tck
204 >  -->
205 >  <property name="jsr166.tckTestClass"     value="JSR166TestCase"/>
206    <macrodef name="run-tck-tests">
207      <attribute name="tck.src.dir" default="${tck.src.dir}"/>
208      <attribute name="target"/>
# Line 211 | Line 211
211      <attribute name="classes"/>
212      <attribute name="jvmflags" default="-ea -esa -Djsr166.testImplementationDetails=true"/>
213      <element name="javac-elements" optional="true"/>
214 +
215      <sequential>
216  
217 +    <local name="modules"/>
218 +    <condition property="modules">
219 +      <available file="${jdk@{compile-target}.home}/jmods" type="dir"/>
220 +    </condition>
221 +
222      <mkdir dir="@{workdir}/tck-classes"/>
223  
224      <javac srcdir="@{tck.src.dir}"
# Line 231 | Line 237
237        <include name="*.java"/>
238        <compilerarg value="-XDignore.symbol.file=true"/>
239        <compilerarg value="-Xlint:all,-unchecked,-rawtypes,-serial,-deprecation"/>
240 <      <compilerarg value="-Xbootclasspath/p:@{classes}"/>
240 >      <compilerarg value="-Xbootclasspath/p:@{classes}" unless:set="modules"/>
241 >      <compilerarg value="-Xoverride:${build.classes.dir}" if:set="modules"/>
242        <compilerarg line="${build.args}"/>
243        <javac-elements/>
244  
# Line 241 | Line 248
248            failonerror="true"
249            jvm="${java@{target}}"
250            fork="true">
251 <        <jvmarg value="-Xbootclasspath/p:@{classes}"/>
251 >        <jvmarg value="-Xbootclasspath/p:@{classes}" unless:set="modules"/>
252 >        <jvmarg value="-Xoverride:${build.classes.dir}" if:set="modules"/>
253          <jvmarg line="@{jvmflags}"/>
254  
255          <!-- ant -Djava.util.concurrent.ForkJoinPool.common.parallelism=1 tck -->
256 <        <syspropertyset id="java.util.concurrent.ForkJoinPool-properties">
256 >        <syspropertyset id="system-properties-used-by-tck">
257            <propertyref prefix="java.util.concurrent.ForkJoinPool"/>
258 +          <propertyref prefix="jsr166."/>
259          </syspropertyset>
260  
252        <sysproperty key="jsr166.profileTests"     value="${jsr166.profileTests}"/>
253        <sysproperty key="jsr166.profileThreshold" value="${jsr166.profileThreshold}"/>
254        <sysproperty key="jsr166.runsPerTest"      value="${jsr166.runsPerTest}"/>
261          <classpath>
262            <pathelement location="${junit.jar}"/>
263            <pathelement location="@{workdir}/tck-classes"/>
# Line 290 | Line 296
296      <attribute name="workdir"/>
297      <attribute name="classes"/>
298      <attribute name="jtregflags" default=""/>
299 +
300      <sequential>
301 +
302 +    <local name="modules"/>
303 +    <condition property="modules">
304 +      <available file="${jdk@{target}.home}/jmods" type="dir"/>
305 +    </condition>
306 +
307      <delete dir="@{workdir}/JTwork"   quiet="true"/>
308      <delete dir="@{workdir}/JTreport" quiet="true"/>
309      <mkdir dir="@{workdir}/JTwork/scratch"/>
# Line 300 | Line 313
313             workDir="@{workdir}/JTwork"
314             reportDir="@{workdir}/JTreport">
315        <patternset refid="jdk@{target}.jtreg.tests"/>
316 <      <arg value="-Xbootclasspath/p:@{classes}"/>
316 >      <arg value="-Xbootclasspath/p:@{classes}" unless:set="modules"/>
317 >      <arg value="-Xoverride:${build.classes.dir}" if:set="modules"/>
318        <arg value="-agentvm"/>
319 <      <arg value="-v:nopass,fail"/>
319 >      <arg value="-verbose:nopass,fail,error"/>
320        <arg value="-vmoptions:-esa -ea"/>
321        <arg value="-automatic"/>
322        <arg value="-k:!ignore"/>
# Line 333 | Line 347
347            depends="configure-compiler"
348            description="Compiles src/main sources to build dir">
349  
350 <    <mkdir dir="${build.classes.dir}"/>
350 >    <local name="modules"/>
351 >    <condition property="modules">
352 >      <and>
353 >        <available file="${jdk9.home}/jmods" type="dir"/>
354 >        <equals arg1="9" arg2="${build.main.java.version}"/>
355 >      </and>
356 >    </condition>
357 >
358 >    <local name="destdir"/>
359 >    <property name="destdir" value="${build.classes.dir}/java.base" if:set="modules"/>
360 >    <property name="destdir" value="${build.classes.dir}" unless:set="modules"/>
361 >
362 >    <mkdir dir="${destdir}"/>
363  
364      <javac srcdir="${src.dir}"
365 <           destdir="${build.classes.dir}"
365 >           destdir="${destdir}"
366             debug="${build.debug}"
367             debuglevel="${build.debuglevel}"
368             deprecation="${build.deprecation}"
# Line 347 | Line 373
373             fork="true">
374  
375        <include name="**/*.java"/>
376 +      <compilerarg value="-Xmodule:java.base" if:set="modules"/>
377        <compilerarg value="-Xprefer:source"/>
378        <compilerarg value="-XDignore.symbol.file=true"/>
379        <compilerarg value="-Xlint:all"/>
# Line 396 | Line 423
423        <arg line="-Xdocrootparent ${java9.docroot.url}"/>
424        <arg line="-Xmaxerrs 1000 -Xmaxwarns 1000"/>
425        <arg value="-XDignore.symbol.file=true"/>
426 + <!--  TODO     <arg value="-Xmodule:java.base"/> -->
427        <arg value="-tag"/>
428        <arg value="${javadoc.jls.option}"/>
429        <arg value="-tag"/>
# Line 529 | Line 557
557  
558  
559    <target name="configure-compiler">
560 +    <fail message="ant version too old">
561 +      <condition>
562 +        <not> <antversion atleast="1.9.1"/> </not>
563 +      </condition>
564 +    </fail>
565  
566      <property name="unchecked.option" value="-Xlint:unchecked"/>
567  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines