/[cvs]/jsr166/build.xml
ViewVC logotype

Diff of /jsr166/build.xml

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.164 by jsr166, Wed May 20 06:13:09 2015 UTC revision 1.177 by jsr166, Fri Sep 11 18:43:46 2015 UTC
# Line 1  Line 1 
1  <project name="jsr166" default="usage">  <project name="jsr166" default="usage"
2      xmlns:if="ant:if" xmlns:unless="ant:unless">
3    
4    <description>    <description>
5  ------------------------------------------------------------------------------  ------------------------------------------------------------------------------
# Line 38  Line 39 
39      </java>      </java>
40    </target>    </target>
41    
42      <!-- HOWTO printf debug: <echo message="prop=${prop}"/> -->
43    
44    <!-- User-specific settings -->    <!-- User-specific settings -->
45    <property file="user.properties"/>    <property file="user.properties"/>
# Line 52  Line 54 
54    
55    <!-- Tck options; see JSR166TestCase.java    <!-- Tck options; see JSR166TestCase.java
56     To profile a single tck test class:     To profile a single tck test class:
57     ant -Djsr166.profileTests=true -Djsr166.profileThreshold=100 -Djsr166.tckTestClass=CompletableFutureTest test-tck     ant -Djsr166.profileTests=true -Djsr166.profileThreshold=10 -Djsr166.tckTestClass=CompletableFutureTest tck
58     To stress test a single tck test class:     To stress test a single tck test class:
59     ant -Djsr166.tckTestClass=CountedCompleterTest -Djsr166.runsPerTest=100 test-tck     ant -Djsr166.tckTestClass=CountedCompleterTest -Djsr166.runsPerTest=100 tck
60    -->    -->
61    <property name="jsr166.profileTests"     value="false"/>    <property name="jsr166.profileTests"     value="false"/>
62    <property name="jsr166.profileThreshold" value="100"/>    <property name="jsr166.profileThreshold" value="100"/>
# Line 93  Line 95 
95      <property name="java@{v}"       location="${jdk@{v}.home}/bin/java"/>      <property name="java@{v}"       location="${jdk@{v}.home}/bin/java"/>
96      <property name="javac@{v}"      location="${jdk@{v}.home}/bin/javac"/>      <property name="javac@{v}"      location="${jdk@{v}.home}/bin/javac"/>
97      <property name="javadoc@{v}"    location="${jdk@{v}.home}/bin/javadoc"/>      <property name="javadoc@{v}"    location="${jdk@{v}.home}/bin/javadoc"/>
98      <property name="jdk@{v}src.dir" location="${jdks.home}/src/jdk@{v}/jdk/src/share/classes"/>      <available property="jdk@{v}.have.java.base"
99          file="${jdks.home}/src/jdk@{v}/jdk/src/java.base/share/classes" type="dir"/>
100        <property name="jdk@{v}src.dir" location="${jdks.home}/src/jdk@{v}/jdk/src/java.base/share/classes"
101          if:set="jdk@{v}.have.java.base"/>
102        <property name="jdk@{v}src.dir" location="${jdks.home}/src/jdk@{v}/jdk/src/share/classes"
103          unless:set="jdk@{v}.have.java.base"/>
104      <local name="boot.jar.dir"/>      <local name="boot.jar.dir"/>
105      <property name="boot.jar.dir"   location="${jdk@{v}.home}/jre/lib"/>      <property name="boot.jar.dir"   location="${jdk@{v}.home}/jre/lib"/>
106      <path id="bootclasspath@{v}">      <path id="bootclasspath@{v}">
# Line 129  Line 136 
136    <property name="test.src.dir"         location="${basedir}/src/test"/>    <property name="test.src.dir"         location="${basedir}/src/test"/>
137    <property name="loops.src.dir"        location="${basedir}/src/loops"/>    <property name="loops.src.dir"        location="${basedir}/src/loops"/>
138    <property name="tck.src.dir"          location="${test.src.dir}/tck"/>    <property name="tck.src.dir"          location="${test.src.dir}/tck"/>
139    <property name="jtreg.src.dir"        location="${test.src.dir}/jtreg"/>    <property name="jtreg7.src.dir"       location="${test.src.dir}/jtreg-jdk7"/>
140      <property name="jtreg8.src.dir"       location="${test.src.dir}/jtreg"/>
141      <property name="jtreg9.src.dir"       location="${test.src.dir}/jtreg"/>
142      <property name="jtreg.src.dir"        location="${jtreg9.src.dir}"/>
143    <property name="lib.dir"              location="${basedir}/lib"/>    <property name="lib.dir"              location="${basedir}/lib"/>
144    <property name="dist.dir"             location="${basedir}/dist"/>    <property name="dist.dir"             location="${basedir}/dist"/>
145    <property name="topsrc.dir"           location="${basedir}/src"/>    <property name="topsrc.dir"           location="${basedir}/src"/>
# Line 234  Line 244 
244          <jvmarg value="-Xbootclasspath/p:@{classes}"/>          <jvmarg value="-Xbootclasspath/p:@{classes}"/>
245          <jvmarg line="@{jvmflags}"/>          <jvmarg line="@{jvmflags}"/>
246    
247          <!-- ant -Djava.util.concurrent.ForkJoinPool.common.parallelism=1 test-tck -->          <!-- ant -Djava.util.concurrent.ForkJoinPool.common.parallelism=1 tck -->
248          <syspropertyset id="java.util.concurrent.ForkJoinPool-properties">          <syspropertyset id="java.util.concurrent.ForkJoinPool-properties">
249            <propertyref prefix="java.util.concurrent.ForkJoinPool"/>            <propertyref prefix="java.util.concurrent.ForkJoinPool"/>
250          </syspropertyset>          </syspropertyset>
# Line 251  Line 261 
261      </sequential>      </sequential>
262    </macrodef>    </macrodef>
263    
264      <!-- Define jtreg test sets for different jdk versions -->
265      <fileset dir="${jtreg9.src.dir}">
266        <patternset id="jdk9.jtreg.tests">
267          <include name="**/*.java"/>
268        </patternset>
269      </fileset>
270    
271      <fileset dir="${jtreg8.src.dir}">
272        <patternset id="jdk8.jtreg.tests">
273          <include name="**/*.java"/>
274          <exclude name="**/SpliteratorCharacteristics.java"/>
275          <!-- https://bugs.openjdk.java.net/browse/JDK-6842353 -->
276          <exclude name="**/GCDuringIteration.java"/>
277        </patternset>
278      </fileset>
279    
280      <fileset dir="${jtreg7.src.dir}">
281        <patternset id="jdk7.jtreg.tests">
282          <include name="**/*.java"/>
283        </patternset>
284      </fileset>
285    
286    <macrodef name="run-jtreg-tests">    <macrodef name="run-jtreg-tests">
287      <!-- ant -Djtreg.src.dir=src/test/jtreg/util/concurrent/CompletableFuture test-jtreg -->      <!-- ant -Djtreg9.src.dir=src/test/jtreg/util/concurrent/CompletableFuture jtreg -->
     <attribute name="jtreg.src.dir" default="${jtreg.src.dir}"/>  
288      <attribute name="source" default="7"/>      <attribute name="source" default="7"/>
289      <attribute name="target"/>      <attribute name="target"/>
290      <attribute name="workdir"/>      <attribute name="workdir"/>
# Line 264  Line 295 
295      <delete dir="@{workdir}/JTreport" quiet="true"/>      <delete dir="@{workdir}/JTreport" quiet="true"/>
296      <mkdir dir="@{workdir}/JTwork/scratch"/>      <mkdir dir="@{workdir}/JTwork/scratch"/>
297      <mkdir dir="@{workdir}/JTreport"/>      <mkdir dir="@{workdir}/JTreport"/>
298      <jtreg dir="@{jtreg.src.dir}"      <jtreg dir="${jtreg@{target}.src.dir}"
299             jdk="${jdk@{target}.home}"             jdk="${jdk@{target}.home}"
300             workDir="@{workdir}/JTwork"             workDir="@{workdir}/JTwork"
301             reportDir="@{workdir}/JTreport">             reportDir="@{workdir}/JTreport">
302          <patternset refid="jdk@{target}.jtreg.tests"/>
303        <arg value="-Xbootclasspath/p:@{classes}"/>        <arg value="-Xbootclasspath/p:@{classes}"/>
304        <arg value="-agentvm"/>        <arg value="-agentvm"/>
305        <arg value="-v:nopass,fail"/>        <arg value="-v:nopass,fail"/>
# Line 423  Line 454 
454      <mirror-dir src="${docs.dir}" dst="${dist.docs.dir}"/>      <mirror-dir src="${docs.dir}" dst="${dist.docs.dir}"/>
455    </target>    </target>
456    
457    <target name="tck" depends="test-tck" description="alias for test-tck"/>    <target name="tck"
   <target name="test-tck"  
458            depends="jar"            depends="jar"
459            description="Runs tck tests for main directly">            description="Runs tck tests for main directly">
460    
# Line 434  Line 464 
464        classes="${product.jar}"/>        classes="${product.jar}"/>
465    </target>    </target>
466    
467    <target name="test-tck-parallelism-1"    <target name="tck-parallelism-1"
468            description="Runs test-tck with given common pool parallelism">            description="Runs tck with given common pool parallelism">
469      <antcall target="test-tck">      <antcall target="tck">
470        <param name="java.util.concurrent.ForkJoinPool.common.parallelism" value="1"/>        <param name="java.util.concurrent.ForkJoinPool.common.parallelism" value="1"/>
471      </antcall>      </antcall>
472    </target>    </target>
473    
474    <target name="test-tck-parallelism-0"    <target name="tck-parallelism-0"
475            description="Runs test-tck with given common pool parallelism">            description="Runs tck with given common pool parallelism">
476      <antcall target="test-tck">      <antcall target="tck">
477        <param name="java.util.concurrent.ForkJoinPool.common.parallelism" value="0"/>        <param name="java.util.concurrent.ForkJoinPool.common.parallelism" value="0"/>
478      </antcall>      </antcall>
479    </target>    </target>
480    
481    <target name="jtreg" depends="test-jtreg" description="alias for test-jtreg"/>    <target name="jtreg"
   <target name="test-jtreg"  
482            depends="jar"            depends="jar"
483            description="Runs jtreg tests for main using the jtreg ant task">            description="Runs jtreg tests for main using the jtreg ant task">
484      <run-jtreg-tests      <run-jtreg-tests
# Line 459  Line 488 
488    </target>    </target>
489    
490    <target name="test"    <target name="test"
491            depends="test-tck, test-tck-parallelism-1, test-jtreg"            depends="tck, tck-parallelism-1, jtreg"
492            description="Runs tck and jtreg tests for main">            description="Runs tck and jtreg tests for main">
493    </target>    </target>
494    
495      <target name="jtreg8" description="Runs jtreg tests with jdk8">
496    
497        <antcall target="jtreg">
498          <param name="build.main.java.version" value="8"/>
499          <param name="build.main.javac" value="${javac8}"/>
500        </antcall>
501    
502      </target>
503    
504    <target name="test89"    <target name="test89"
505            description="Runs tck and jtreg tests for main for multiple java versions">            description="Runs tck and jtreg tests for main for multiple java versions">
506    
# Line 529  Line 567 
567    </target>    </target>
568    
569    
570      <target name="compile-test-loops" depends="jar"
571              description="compile all the perf tests in src/test/loops">
572    
573        <mkdir dir="${build.dir}/test/loops"/>
574    
575        <javac srcdir="${basedir}/src/test/loops"
576               destdir="${build.dir}/test/loops"
577               debug="${build.debug}"
578               debuglevel="${build.debuglevel}"
579               deprecation="${build.deprecation}"
580               includeAntRuntime="false"
581               includeJavaRuntime="false"
582               executable="${javac9}"
583               fork="true">
584    
585          <include name="*.java"/>
586          <compilerarg value="-XDignore.symbol.file=true"/>
587          <compilerarg value="-Xlint:all,-unchecked,-rawtypes,-serial"/>
588          <compilerarg value="-Xbootclasspath/p:${product.jar}"/>
589          <compilerarg line="${build.args}"/>
590    
591        </javac>
592    
593      </target>
594    
595    
596    <!-- jsr166 4jdk7 -->    <!-- jsr166 4jdk7 -->
597    
598    <target name="4jdk7compile"    <target name="4jdk7compile"
# Line 601  Line 665 
665    </target>    </target>
666    
667    
668    <target name="4jdk7-test-tck"    <target name="4jdk7-tck"
669            depends="4jdk7jar"            depends="4jdk7jar"
670            description="Runs tck tests for jsr166-4jdk7 directly">            description="Runs tck tests for jsr166-4jdk7 directly">
671    
# Line 613  Line 677 
677          <!-- JDK8+ test classes -->          <!-- JDK8+ test classes -->
678          <exclude name="*8Test.java"/>          <exclude name="*8Test.java"/>
679          <exclude name="*9Test.java"/>          <exclude name="*9Test.java"/>
680            <exclude name="*10Test.java"/>
681          <exclude name="DoubleAccumulatorTest.java"/>          <exclude name="DoubleAccumulatorTest.java"/>
682          <exclude name="DoubleAdderTest.java"/>          <exclude name="DoubleAdderTest.java"/>
683          <exclude name="LongAccumulatorTest.java"/>          <exclude name="LongAccumulatorTest.java"/>
# Line 620  Line 685 
685          <exclude name="CompletableFutureTest.java"/>          <exclude name="CompletableFutureTest.java"/>
686          <exclude name="SplittableRandomTest.java"/>          <exclude name="SplittableRandomTest.java"/>
687          <exclude name="StampedLockTest.java"/>          <exclude name="StampedLockTest.java"/>
688            <exclude name="SubmissionPublisherTest.java"/>
689        </javac-elements>        </javac-elements>
690      </run-tck-tests>      </run-tck-tests>
691    </target>    </target>
692    
693    
694    <target name="4jdk7-test-tck-junit"    <target name="4jdk7-tck-junit"
695            depends="4jdk7compile"            depends="4jdk7compile"
696            description="Runs tck tests for jsr166-4jdk7 via junit task (experimental)">            description="Runs tck tests for jsr166-4jdk7 via junit task (experimental)">
697    
# Line 653  Line 719 
719      </junit>      </junit>
720    </target>    </target>
721    
722    <target name="4jdk7-test-jtreg"    <target name="4jdk7-jtreg"
723            depends="4jdk7jar"            depends="4jdk7jar"
724            description="Runs jtreg tests for jsr166-4jdk7 using the jtreg ant task">            description="Runs jtreg tests for jsr166-4jdk7 using the jtreg ant task">
725      <run-jtreg-tests      <run-jtreg-tests
726         target="7"         target="7"
727         workdir="${build.4jdk7.dir}"         workdir="${build.4jdk7.dir}"
728         classes="${4jdk7product.jar}"         classes="${4jdk7product.jar}"/>
        jtregflags="-exclude:${jtreg.src.dir}/jdk8tests"/>  
729    </target>    </target>
730    
731    
732    <target name="4jdk7-test"    <target name="4jdk7-test"
733            depends="4jdk7-test-tck, 4jdk7-test-jtreg"            depends="4jdk7-tck, 4jdk7-jtreg"
734            description="Runs tck and jtreg tests for jsr166-4jdk7">            description="Runs tck and jtreg tests for jsr166-4jdk7">
735    </target>    </target>
736    
# Line 1070  Line 1135 
1135    </target>    </target>
1136    
1137    
1138    <target name="jsr166e-test-tck-one-java-version"    <target name="jsr166e-tck-one-java-version"
1139            depends="jsr166ejar">            depends="jsr166ejar">
1140    
1141      <echo message="Testing with jdk${build.jsr166e.java.version} ..."/>      <echo message="Testing with jdk${build.jsr166e.java.version} ..."/>
# Line 1082  Line 1147 
1147        classes="${jsr166e.jar}"/>        classes="${jsr166e.jar}"/>
1148    </target>    </target>
1149    
1150    <target name="jsr166e-test-tck"    <target name="jsr166e-tck"
1151            description="Runs tck tests for jsr166e for multiple java versions">            description="Runs tck tests for jsr166e for multiple java versions">
1152    
1153  <!--     <antcall target="clean"/> -->  <!--     <antcall target="clean"/> -->
1154  <!--     <antcall target="jsr166e-test-tck-one-java-version"> -->  <!--     <antcall target="jsr166e-tck-one-java-version"> -->
1155  <!--       <param name="build.jsr166e.java.version" value="8"/> -->  <!--       <param name="build.jsr166e.java.version" value="8"/> -->
1156  <!--       <param name="build.jsr166e.javac" value="${javac8}"/> -->  <!--       <param name="build.jsr166e.javac" value="${javac8}"/> -->
1157  <!--     </antcall> -->  <!--     </antcall> -->
1158    
1159      <antcall target="clean"/>      <antcall target="clean"/>
1160      <antcall target="jsr166e-test-tck-one-java-version">      <antcall target="jsr166e-tck-one-java-version">
1161        <param name="build.jsr166e.java.version" value="7"/>        <param name="build.jsr166e.java.version" value="7"/>
1162        <param name="build.jsr166e.javac" value="${javac7}"/>        <param name="build.jsr166e.javac" value="${javac7}"/>
1163      </antcall>      </antcall>
1164    
1165      <antcall target="clean"/>      <antcall target="clean"/>
1166      <antcall target="jsr166e-test-tck-one-java-version">      <antcall target="jsr166e-tck-one-java-version">
1167        <param name="build.jsr166e.java.version" value="6"/>        <param name="build.jsr166e.java.version" value="6"/>
1168        <param name="build.jsr166e.javac" value="${javac6}"/>        <param name="build.jsr166e.javac" value="${javac6}"/>
1169      </antcall>      </antcall>
# Line 1106  Line 1171 
1171    
1172    
1173    <target name="jsr166e-test"    <target name="jsr166e-test"
1174            depends="jsr166e-test-tck"            depends="jsr166e-tck"
1175            description="Runs all tests for jsr166e">            description="Runs all tests for jsr166e">
1176    </target>    </target>
1177    

Legend:
Removed from v.1.164  
changed lines
  Added in v.1.177

dl@cs.oswego.edu
ViewVC Help
Powered by ViewVC 1.1.27