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.137 by jsr166, Wed Feb 6 19:55:06 2013 UTC vs.
Revision 1.143 by dl, Wed Jul 10 17:09:45 2013 UTC

# Line 44 | Line 44 | As of 2013-02, the very latest lambda 8
44    <property name="build.deprecation"    value="false"/>
45    <property name="build.javadoc.access" value="protected"/>
46  
47 +  <!-- Tck options; see JSR166TestCase.java -->
48 +  <!-- 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 +  <!-- Allow running an individual tck test class -->
53 +  <!-- ant -Djsr166.tckTestClass=CountedCompleterTest -Djsr166.runsPerTest=100 test-tck -->
54 +  <property name="jsr166.tckTestClass"     value="JSR166TestCase"/>
55 +
56    <!-- Build locations -->
57    <property name="build.dir"                   location="build"/>
58    <property name="build.classes.dir"           location="${build.dir}/classes"/>
# Line 170 | Line 179 | As of 2013-02, the very latest lambda 8
179  
180    <macrodef name="run-tck-tests">
181      <attribute name="tck.src.dir" default="${tck.src.dir}"/>
173    <attribute name="source" default="6"/>
182      <attribute name="target"/>
183 +    <attribute name="compile-target" default="@{target}"/>
184      <attribute name="workdir"/>
185      <attribute name="classes"/>
186      <attribute name="jvmflags" default=""/>
# Line 185 | Line 194 | As of 2013-02, the very latest lambda 8
194             debug="${build.debug}"
195             debuglevel="${build.debuglevel}"
196             deprecation="${build.deprecation}"
197 <           source="@{source}"
197 >           source="@{compile-target}"
198 >           target="@{compile-target}"
199             classpath="${junit.jar}"
200 <           bootclasspath="@{classes}:${bootclasspath@{source}}"
200 >           bootclasspath="@{classes}:${bootclasspath@{compile-target}}"
201             includeAntRuntime="false"
202             includeJavaRuntime="false"
203 <           executable="${javac@{target}}"
203 >           executable="${javac@{compile-target}}"
204             fork="true">
205  
206        <include name="*.java"/>
# Line 201 | Line 211 | As of 2013-02, the very latest lambda 8
211  
212      </javac>
213  
214 <    <java classname="JSR166TestCase"
214 >    <java classname="${jsr166.tckTestClass}"
215            failonerror="true"
216            jvm="${java@{target}}"
217            fork="true">
218          <jvmarg value="-Xbootclasspath/p:@{classes}"/>
219          <jvmarg line="@{jvmflags}"/>
220 +        <sysproperty key="jsr166.profileTests"     value="${jsr166.profileTests}"/>
221 +        <sysproperty key="jsr166.profileThreshold" value="${jsr166.profileThreshold}"/>
222 +        <sysproperty key="jsr166.runsPerTest"      value="${jsr166.runsPerTest}"/>
223          <classpath>
224            <pathelement location="${junit.jar}"/>
225            <pathelement location="@{workdir}/tck-classes"/>
# Line 296 | Line 309 | As of 2013-02, the very latest lambda 8
309    </target>
310  
311  
299  <target name="test"
300          depends="configure-tests, report-tests"
301          description="Runs all tests (requires JUnit 3.8.1 in ${ant.home}/lib)" />
302
303
312    <target name="docs"
313            description="Builds javadocs for src/main to dist dir">
314  
# Line 324 | Line 332 | As of 2013-02, the very latest lambda 8
332        <arg value="-XDignore.symbol.file=true"/>
333        <arg value="-tag"/>
334        <arg value="${javadoc.jls.option}"/>
335 +      <arg value="-tag"/>
336 +      <arg value="apiNote:a:&lt;em&gt;API Note:&lt;/em&gt;"/>
337 +      <arg value="-tag"/>
338 +      <arg value="implSpec:a:&lt;em&gt;Implementation Requirements:&lt;/em&gt;"/>
339 +      <arg value="-tag"/>
340 +      <arg value="implNote:a:&lt;em&gt;Implementation Note:&lt;/em&gt;"/>
341      </javadoc>
342    </target>
343  
# Line 367 | Line 381 | As of 2013-02, the very latest lambda 8
381    </target>
382  
383  
370  <!-- Internal targets -->
371
372
384    <target name="dist-jar"
385            depends="clean, jar">
386      <copy file="${product.jar}" todir="${dist.dir}"/>
# Line 381 | Line 392 | As of 2013-02, the very latest lambda 8
392    </target>
393  
394  
384  <target name="compile-tests"
385          depends="jar">
386
387    <mkdir dir="${build.testcases.dir}"/>
388
389    <javac srcdir="${tck.src.dir}"
390           destdir="${build.testcases.dir}"
391           debug="${build.debug}"
392           debuglevel="${build.debuglevel}"
393           deprecation="${build.deprecation}"
394           source="6"
395           classpath="${junit.jar}"
396           bootclasspath="@{product.jar}:${bootclasspath6}"
397           includeAntRuntime="false"
398           includeJavaRuntime="false"
399           executable="${javac8}"
400           fork="true">
401
402      <include name="**/*.java"/>
403      <compilerarg value="-XDignore.symbol.file=true"/>
404      <compilerarg value="-Xlint:all,-unchecked,-rawtypes,-serial,-deprecation"/>
405      <compilerarg line="${build.args}"/>
406
407    </javac>
408
409    <javac srcdir="${test.src.dir}"
410           destdir="${build.testcases.dir}"
411           debug="${build.debug}"
412           debuglevel="${build.debuglevel}"
413           deprecation="${build.deprecation}"
414           source="6"
415           classpath=""
416           bootclasspath="@{product.jar}:${bootclasspath6}"
417           includeAntRuntime="false"
418           includeJavaRuntime="false"
419           executable="${javac8}"
420           fork="true">
421
422      <include name="jsr166/test/**/*.java"/>
423      <compilerarg value="-XDignore.symbol.file=true"/>
424      <compilerarg value="-Xlint:all,-unchecked,-rawtypes,-serial,-deprecation"/>
425      <compilerarg line="${build.args}"/>
426
427    </javac>
428
429 <!--
430    <javac srcdir="${jtreg.src.dir}"
431          destdir="${build.testcases.dir}"
432            debug="${build.debug}"
433       debuglevel="${build.debuglevel}"
434      deprecation="${build.deprecation}"
435           source="${build.sourcelevel}"
436             fork="true">
437
438      <compilerarg value="-Xbootclasspath/p:${product.jar}"/>
439      <compilerarg value="-XDignore.symbol.file=true"/>
440      <compilerarg line="${build.args}"/>
441
442    </javac>
443 -->
444
445  </target>
446
395    <target name="test-tck"
396            depends="jar"
397            description="Runs tck tests for main directly">
# Line 463 | Line 411 | As of 2013-02, the very latest lambda 8
411         classes="${product.jar}"/>
412    </target>
413  
414 <  <target name="test-ng"
414 >  <target name="test"
415            depends="test-tck, test-jtreg"
416            description="Runs tck and jtreg tests for main">
417    </target>
418  
471  <target name="run-tests"
472          depends="compile-tests">
473
474    <!-- May be overridden by user.properties -->
475    <property name="testcase" value="*"/>
476
477    <mkdir dir="${build.reports.dir}"/>
478
479    <junit printsummary="true"
480             showoutput="true"
481          errorProperty="junit.failed"
482        failureProperty="junit.failed"
483                    dir="${build.reports.dir}"
484                    jvm="${java8}"
485                   fork="true">
486
487      <jvmarg value="-Xbootclasspath/p:${product.jar}"/>
488      <jvmarg value="-server"/>
489      <jvmarg value="-showversion"/>
490
491      <classpath refid="test.classpath"/>
492
493      <formatter type="xml"/>
494
495      <batchtest todir="${build.reports.dir}" unless="no.test.tck">
496        <fileset dir="${tck.src.dir}">
497          <include name="**/${testcase}Test.java"/>
498        </fileset>
499      </batchtest>
500
501      <batchtest todir="${build.reports.dir}" if="do.test.old">
502        <fileset dir="${test.src.dir}">
503          <include name="jsr166/test/**/${testcase}Test.java"/>
504        </fileset>
505      </batchtest>
506
507 <!--
508      <batchtest todir="${build.reports.dir}" if="do.test.jtreg">
509        <fileset dir="${jtreg.src.dir}">
510          <include name="**/${testcase}Test.java"/>
511        </fileset>
512      </batchtest>
513 -->
514
515    </junit>
516
517  </target>
518
519
520  <target name="report-tests"
521          depends="run-tests">
522
523    <!-- Sets junit.report.format to frames if redirection is present,
524         otherwise sets it to noframes. -->
525    <available property="junit.report.format"
526                  value="frames"
527              classname="org.apache.xalan.lib.Redirect"
528    />
529    <property name="junit.report.format" value="noframes"/>
530
531    <junitreport todir="${build.reports.dir}">
532      <fileset dir="${build.reports.dir}">
533        <include name="TEST-*.xml"/>
534      </fileset>
535      <report format="${junit.report.format}" todir="${build.reports.dir}"
536      />
537    </junitreport>
538
539    <fail message="Test Cases Failed" if="junit.failed"/>
540
541  </target>
419  
420  
421    <target name="configure-compiler">
# Line 558 | Line 435 | As of 2013-02, the very latest lambda 8
435    </target>
436  
437  
561  <target name="configure-tests"
562       depends="configure-compiler">
563
564    <!-- junit.framework.Protectable is in JUnit 3.8.1 but not in 3.7 -->
565    <available property="junit.available"
566               classname="junit.framework.Protectable"/>
567
568    <!-- Xalan -->
569    <available property="xalan.available"
570               classname="org.apache.xalan.Version"/>
571
572
573    <!-- Ant 1.6beta and later don't need or want this check -->
574    <!--
575    <fail message="Need JUnit 3.8.1 in ${ant.home}${file.separator}lib to run tests"
576          unless="junit.available"/>
577
578    <fail message="Need Xalan 2.5.1 jar in ${ant.home}${file.separator}lib to run tests"
579          unless="xalan.available"/>
580    -->
581
582  </target>
583
438  
439    <!-- Various demos and test programs -->
440  
# Line 664 | Line 518 | As of 2013-02, the very latest lambda 8
518        <javac-elements>
519          <!-- JDK8+ test classes -->
520          <exclude name="*8Test.java"/>
521 +        <exclude name="DoubleAccumulatorTest.java"/>
522 +        <exclude name="DoubleAdderTest.java"/>
523 +        <exclude name="LongAccumulatorTest.java"/>
524 +        <exclude name="LongAdderTest.java"/>
525          <exclude name="CompletableFutureTest.java"/>
526          <exclude name="StampedLockTest.java"/>
527        </javac-elements>
# Line 693 | Line 551 | As of 2013-02, the very latest lambda 8
551  
552        <formatter type="brief"/>
553  
554 <      <test name="JSR166TestCase" haltonfailure="no">
554 >      <test name="${jsr166.tckTestClass}" haltonfailure="no">
555        </test>
556  
557      </junit>
# Line 705 | Line 563 | As of 2013-02, the very latest lambda 8
563      <run-jtreg-tests
564         target="7"
565         workdir="${build.4jdk7.dir}"
566 <       classes="${4jdk7product.jar}"/>
566 >       classes="${4jdk7product.jar}"
567 >       jtregflags="-exclude:${jtreg.src.dir}/jdk8tests"/>
568    </target>
569  
570  
# Line 1103 | Line 962 | As of 2013-02, the very latest lambda 8
962  
963      <run-tck-tests
964        tck.src.dir="${test.src.dir}/tck-jsr166e"
965 <      source="7"
1107 <      target="8"
965 >      target="7"
966        workdir="${build.jsr166e.dir}"
967        classes="${jsr166e.jar}"/>
968    </target>

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines