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.96 by jsr166, Mon Jan 14 21:06:16 2013 UTC vs.
Revision 1.97 by jsr166, Tue Jan 15 01:15:02 2013 UTC

# Line 38 | Line 38
38    <property name="build.jdk7.dir"              location="${build.dir}/jdk7"/>
39    <property name="build.jdk7.lib.dir"          location="${build.jdk7.dir}"/>
40    <property name="build.jdk7.classes.dir"      location="${build.jdk7.dir}/classes"/>
41 +  <property name="build.jdk7.tck.classes.dir"  location="${build.jdk7.dir}/tck/classes"/>
42    <property name="build.jdk7.docs.dir"         location="${build.jdk7.dir}/docs"/>
43  
44    <property name="build.jsr166x.dir"           location="${build.dir}/jsr166x"/>
# Line 63 | Line 64
64      <attribute name="v"/>
65      <sequential>
66      <property name="jdk@{v}.home"  location="${jdks.home}/jdk@{v}"/>
67 +    <property name="java@{v}"      location="${jdk@{v}.home}/bin/java"/>
68      <property name="javac@{v}"     location="${jdk@{v}.home}/bin/javac"/>
69      <property name="javadoc@{v}"   location="${jdk@{v}.home}/bin/javadoc"/>
70      <property name="bootdir@{v}"   location="${jdk@{v}.home}/jre/lib"/>
71 <    <property name="bootclasspath@{v}"  
71 >    <property name="bootclasspath@{v}"
72       value="${bootdir@{v}}/resources.jar:${bootdir@{v}}/rt.jar:${bootdir@{v}}/jsse.jar:${bootdir@{v}}/jce.jar:${bootdir@{v}}/:${bootdir@{v}}/charsets.jar"/>
73      </sequential>
74    </macrodef>
# Line 75 | Line 77
77    <defjdklocations v="7"/>
78    <defjdklocations v="8"/>
79  
80 +  <macrodef name="run-tck-tests">
81 +    <attribute name="jvm"/>
82 +    <attribute name="tck.classes"/>
83 +    <attribute name="product.jar" default="${product.jar}"/>
84 +    <attribute name="jvmflags" default=""/>
85 +    <sequential>
86 +    <java classname="JSR166TestCase"
87 +          jvm="@{jvm}" fork="true">
88 +        <jvmarg value="-Xbootclasspath/p:@{product.jar}"/>
89 +        <jvmarg line="@{jvmflags}"/>
90 +        <classpath>
91 +          <pathelement location="${junit.jar}"/>
92 +          <pathelement location="@{tck.classes}"/>
93 +        </classpath>
94 +    </java>
95 +    </sequential>
96 +  </macrodef>
97 +
98    <!-- Source locations -->
99    <property name="src.dir"              location="${basedir}/src/main"/>
100    <property name="test.src.dir"         location="${basedir}/src/test"/>
# Line 523 | Line 543
543             bootclasspath="${bootclasspath6}"
544             includeAntRuntime="false"
545             includeJavaRuntime="false"
546 <           executable="${javac6}"
546 >           executable="${javac7}"
547             fork="true">
548  
549        <include name="**/*.java"/>
# Line 533 | Line 553
553  
554      </javac>
555  
536  </target>
537
538
539
540  <target name="jdk7jar"
541          depends="jdk7compile"
542          description="Builds library jar from compiled sources">
543
556      <mkdir dir="${build.jdk7.lib.dir}"/>
557  
558      <jar destfile="${jdk7product.jar}" index="true">
559        <fileset dir="${build.jdk7.classes.dir}"/>
560      </jar>
561  
562 +    <mkdir dir="${build.jdk7.tck.classes.dir}"/>
563 +
564 +    <javac srcdir="${tck.src.dir}"
565 +           destdir="${build.jdk7.tck.classes.dir}"
566 +           debug="${build.debug}"
567 +           debuglevel="${build.debuglevel}"
568 +           deprecation="${build.deprecation}"
569 +           source="1.6"
570 +           classpath="${junit.jar}"
571 +           bootclasspath="${jdk7product.jar}:${bootclasspath6}"
572 +           includeAntRuntime="false"
573 +           includeJavaRuntime="false"
574 +           executable="${javac7}"
575 +           fork="true">
576 +
577 +      <include name="**/*.java"/>
578 +      <compilerarg line="${build.args}"/>
579 +      <compilerarg value="-XDignore.symbol.file=true"/>
580 +      <compilerarg value="-Xlint:all,-unchecked,-rawtypes,-serial,-deprecation"/>
581 +
582 +    </javac>
583 +
584    </target>
585  
586  
587 +  <target name="run-jdk7-tck-tests"
588 +          depends="jdk7compile"
589 +          description="Runs tck tests for jsr166-jdk7 directly">
590 +    <run-tck-tests
591 +      jvm="${java7}"
592 +      tck.classes="${build.jdk7.tck.classes.dir}"
593 +      product.jar="${jdk7product.jar}"/>
594 +  </target>
595 +
596 +
597 +  <target name="run-jdk7-tck-tests-via-junit-task"
598 +          depends="jdk7compile">
599 +
600 +    <junit printsummary="true"
601 +           showoutput="true"
602 +           errorProperty="junit.failed"
603 +           failureProperty="junit.failed"
604 +           includeantruntime="true"
605 +           jvm="${java7}"
606 +           fork="true">
607 +
608 +      <jvmarg value="-Xbootclasspath/p:${jdk7product.jar}"/>
609 +      <jvmarg value="-server"/>
610 +
611 +      <classpath>
612 +        <pathelement location="${junit.jar}"/>
613 +        <pathelement location="${build.jdk7.tck.classes.dir}"/>
614 +      </classpath>
615 +
616 +      <formatter type="brief"/>
617 +
618 +      <test name="JSR166TestCase" haltonfailure="no">
619 +      </test>
620 +
621 +    </junit>
622 +  </target>
623 +
624  
625    <target name="jdk7docs"
626            description="Builds javadocs with custom tags to build folder">
# Line 619 | Line 690
690    </target>
691  
692    <target name="jdk7dist-jar"
693 <          depends="jdk7clean, jdk7jar">
693 >          depends="jdk7clean, jdk7compile">
694  
695      <copy file="${jdk7product.jar}" todir="${dist.dir}"/>
696  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines