You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by hi...@apache.org on 2009/07/28 11:30:48 UTC

svn commit: r798469 [3/28] - in /harmony/enhanced/classlib/branches/java6: ./ depends/build/platform/ depends/files/ depends/jars/ depends/manifests/icu4j_4.0/ depends/manifests/icu4j_4.2.1/ depends/manifests/icu4j_4.2.1/META-INF/ make/ modules/accessi...

Modified: harmony/enhanced/classlib/branches/java6/modules/awt/build.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/awt/build.xml?rev=798469&r1=798468&r2=798469&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/awt/build.xml (original)
+++ harmony/enhanced/classlib/branches/java6/modules/awt/build.xml Tue Jul 28 09:30:33 2009
@@ -19,42 +19,12 @@
 <project name="AWT Build" default="build" basedir=".">
     <description>Build for AWT component</description>
 
-    <!-- import common properties -->
+    <property name="hy.module" value="awt" />
     <property name="hy.hdk" location="${basedir}/../../deploy" />
     <import file="${hy.hdk}/build/ant/properties.xml" />
 
-    <property name="tests.output" location="../../build/test_report" />
-
-    <!-- set global properties for this build. -->
-    <xmlproperty file="make/hyproperties.xml" semanticAttributes="true" />
-
-    <property name="hy.awt.src.main.java.platform"
-              value="${hy.awt.src.main.java}/../${hy.os.family}" />
-
-    <property name="hy.awt.src.test.impl.platform"
-              value="${hy.awt.src.test.impl}/${hy.os.family}" />
-
-    <fileset id="classes" dir="${hy.build}">
-        <or>
-            <present targetdir="${hy.awt.src.main.java}" />
-            <present targetdir="${hy.awt.src.main.java}">
-                <mapper type="regexp"
-                        from="^(.*?)(\$$[^/\\\.]*)?\.class$$"
-                        to="\1.java"/>
-            </present>
-            <present targetdir="${hy.awt.src.main.java.platform}" />
-            <present targetdir="${hy.awt.src.main.java.platform}">
-                <mapper type="regexp"
-                        from="^(.*?)(\$$[^/\\\.]*)?\.class$$"
-                        to="\1.java"/>
-            </present>
-        </or>
-    </fileset>
-
     <property file="../../make/depends.properties" />
 
-    <property name="awt.exclude.file" location="${hy.hdk}/build/awt.exclude" />
-
     <target name="build" depends="compile-java, copy-resources, build-jar" />
 
     <target name="test" depends="-test-module">
@@ -69,11 +39,12 @@
     </target>
 
     <!-- internal target for local and global test run sequence -->
-    <target name="-test-module" depends="build, compile-tests, prepare-exclude, run-tests" />
+    <target name="-test-module" depends="build, run-tests" />
 
     <target name="clean">
         <delete file="${hy.jdk}/jre/lib/boot/awt.jar" />
         <delete file="${hy.jdk}/jre/lib/boot/awt-src.jar" />    
+        <delete dir="${tests.hdk.dir}" failonerror="false" />
         <delete dir="${hy.jdk}/jre/lib/cmm" quiet="true" />
         <delete failonerror="false">
             <fileset refid="classes" />
@@ -84,10 +55,10 @@
     <target name="compile-java">
         <echo message="Compiling AWT classes" />
 
-        <mkdir dir="${hy.build}" />
+        <mkdir dir="../../build/classes" />
 
         <javac sourcepath=""
-               destdir="${hy.build}"
+               destdir="../../build/classes"
                compiler="${hy.javac.compiler}"
                memoryMaximumSize="${hy.javac.maxmem}"
                source="${hy.javac.source}" 
@@ -97,8 +68,8 @@
             <compilerarg line="${build.compilerarg}" />
 
             <src>
-                <pathelement location="${hy.awt.src.main.java}"/>
-                <pathelement location="${hy.awt.src.main.java.platform}" />
+                <pathelement location="src/main/java/common"/>
+                <pathelement location="src/main/java/${hy.os.family}" />
             </src>
 
             <bootclasspath>
@@ -110,29 +81,29 @@
     </target>
 
     <target name="copy-resources" depends="-copy-win-resources">
-        <mkdir dir="${hy.build}" />
+        <mkdir dir="../../build/classes" />
 
-        <copy todir="${hy.build}" includeemptydirs="false">
-            <fileset dir="${hy.awt.src.main.java}">
+        <copy todir="../../build/classes" includeemptydirs="false">
+            <fileset dir="src/main/java/common">
                 <exclude name="**/*.java" />
             </fileset>
         </copy>
 
         <mkdir dir="${hy.jdk}/jre/lib/cmm" />
         <copy todir="${hy.jdk}/jre/lib/cmm">
-            <fileset dir="${hy.awt.src.main.resources}/cmm"/>
+            <fileset dir="src/main/resources/cmm"/>
         </copy>	
     </target>
     
     <target name="-copy-win-resources" if="is.windows">
         <mkdir dir="${hy.jdk}/jre/lib" />
-        <copy file="${hy.awt.src.main.resources}/font.properties.xp"
+        <copy file="src/main/resources/font.properties.xp"
               tofile="${hy.jdk}/jre/lib/font.properties"/>
     </target>
 
     <target name="build-jar" depends="svn-info">
         <jar destfile="${hy.jdk}/jre/lib/boot/awt.jar"
-             manifest="${hy.awt}/META-INF/MANIFEST.MF"
+             manifest="META-INF/MANIFEST.MF"
              compress="${hy.jar.compress}">
             <fileset refid="classes" />
             <manifest>
@@ -143,8 +114,8 @@
         </jar>
 
         <jar destfile="${hy.jdk}/jre/lib/boot/awt-src.jar">
-            <fileset dir="${hy.awt.src.main.java}" />
-            <fileset dir="${hy.awt.src.main.java.platform}" />
+            <fileset dir="src/main/java/common" />
+            <fileset dir="src/main/java/${hy.os.family}" />
             <manifest>
                 <attribute name="Implementation-Version" value="${svn.info}"/> 
             </manifest>
@@ -158,10 +129,10 @@
         depends="-build-native-common,-build-native-unix,-build-native-windows" />
         
     <target name="-build-native-common">
-        <make dir="${hy.awt.src.main.native}/lcmm/${hy.os.family}" />
+        <make dir="src/main/native/lcmm/${hy.os.family}" />
         <!-- Copy the built shared libs over to the jre/bin dir -->
         <copy todir="${hy.jdk}/jre/bin" overwrite="yes">
-            <fileset dir="${hy.awt.src.main.native}/lcmm">
+            <fileset dir="src/main/native/lcmm">
                 <include name="*${shlib.suffix}*"/>
                 <include name="*${progdb.suffix}*" if="is.windows" />
                 <exclude name="*${manifest.suffix}"/>
@@ -169,15 +140,15 @@
         </copy>
         <!-- Copy link exports file on z/OS -->
         <copy todir="${hy.hdk}/lib" overwrite="yes">
-            <fileset dir="${hy.awt.src.main.native}/lcmm/${hy.os.family}">
+            <fileset dir="src/main/native/lcmm/${hy.os.family}">
                 <include name="*${linklib.suffix}" if="is.zos" />
             </fileset>
         </copy>
 
-        <make dir="${hy.awt.src.main.native}/jpegdecoder/${hy.os.family}" />
+        <make dir="src/main/native/jpegdecoder/${hy.os.family}" />
         <!-- Copy the built shared libs over to the jre/bin dir -->
         <copy todir="${hy.jdk}/jre/bin" overwrite="yes">
-            <fileset dir="${hy.awt.src.main.native}/jpegdecoder">
+            <fileset dir="src/main/native/jpegdecoder">
                 <include name="*${shlib.suffix}*"/>
                 <include name="*${progdb.suffix}*" if="is.windows" />
                 <exclude name="*${manifest.suffix}"/>
@@ -185,15 +156,15 @@
         </copy>
         <!-- Copy link exports file on z/OS -->
         <copy todir="${hy.hdk}/lib" overwrite="yes">
-            <fileset dir="${hy.awt.src.main.native}/jpegdecoder/${hy.os.family}">
+            <fileset dir="src/main/native/jpegdecoder/${hy.os.family}">
                 <include name="*${linklib.suffix}" if="is.zos" />
             </fileset>
         </copy>
 
-        <make dir="${hy.awt.src.main.native}/gl/${hy.os.family}" />
+        <make dir="src/main/native/gl/${hy.os.family}" />
         <!-- Copy the built shared libs over to the jre/bin dir -->
         <copy todir="${hy.jdk}/jre/bin" overwrite="yes">
-            <fileset dir="${hy.awt.src.main.native}/gl">
+            <fileset dir="src/main/native/gl">
                 <include name="*${shlib.suffix}*"/>
                 <include name="*${progdb.suffix}*" if="is.windows" />
                 <exclude name="*${manifest.suffix}"/>
@@ -201,15 +172,15 @@
         </copy>
         <!-- Copy link exports file on z/OS -->
         <copy todir="${hy.hdk}/lib" overwrite="yes">
-            <fileset dir="${hy.awt.src.main.native}/gl/${hy.os.family}">
+            <fileset dir="src/main/native/gl/${hy.os.family}">
                 <include name="*${linklib.suffix}" if="is.zos" />
             </fileset>
         </copy>
         
-        <make dir="${hy.awt.src.main.native}/oglwrapper/${hy.os.family}" />
+        <make dir="src/main/native/oglwrapper/${hy.os.family}" />
         <!-- Copy the built shared libs over to the jre/bin dir -->
         <copy todir="${hy.jdk}/jre/bin" overwrite="yes">
-            <fileset dir="${hy.awt.src.main.native}/oglwrapper">
+            <fileset dir="src/main/native/oglwrapper">
                 <include name="*${shlib.suffix}*"/>
                 <include name="*${progdb.suffix}*" if="is.windows" />
                 <exclude name="*${manifest.suffix}"/>
@@ -217,15 +188,15 @@
         </copy>
         <!-- Copy link exports file on z/OS -->
         <copy todir="${hy.hdk}/lib" overwrite="yes">
-            <fileset dir="${hy.awt.src.main.native}/oglwrapper/${hy.os.family}">
+            <fileset dir="src/main/native/oglwrapper/${hy.os.family}">
                 <include name="*${linklib.suffix}" if="is.zos" />
             </fileset>
         </copy>
 
-        <make dir="${hy.awt.src.main.native}/fontlib/${hy.os.family}" />
+        <make dir="src/main/native/fontlib/${hy.os.family}" />
         <!-- Copy the built shared libs over to the jre/bin dir -->
         <copy todir="${hy.jdk}/jre/bin" overwrite="yes">
-            <fileset dir="${hy.awt.src.main.native}/fontlib">
+            <fileset dir="src/main/native/fontlib">
                 <include name="*${shlib.suffix}*"/>
                 <include name="*${progdb.suffix}*" if="is.windows" />
                 <exclude name="*${manifest.suffix}"/>
@@ -233,57 +204,57 @@
         </copy>
         <!-- Copy link exports file on z/OS -->
         <copy todir="${hy.hdk}/lib" overwrite="yes">
-            <fileset dir="${hy.awt.src.main.native}/fontlib/${hy.os.family}">
+            <fileset dir="src/main/native/fontlib/${hy.os.family}">
                 <include name="*${linklib.suffix}" if="is.zos" />
             </fileset>
         </copy>
     </target>
 
     <target name="-build-native-unix" if="is.unix">
-        <make dir="${hy.awt.src.main.native}/x11wrapper/${hy.os.family}" />
+        <make dir="src/main/native/x11wrapper/${hy.os.family}" />
         <!-- Copy the built shared libs over to the jre/bin dir -->
         <copy todir="${hy.jdk}/jre/bin" overwrite="yes">
-            <fileset dir="${hy.awt.src.main.native}/x11wrapper">
+            <fileset dir="src/main/native/x11wrapper">
                 <include name="*${shlib.suffix}*"/>
             </fileset>
         </copy>
         <!-- Copy link exports file on z/OS -->
         <copy todir="${hy.hdk}/lib" overwrite="yes">
-            <fileset dir="${hy.awt.src.main.native}/x11wrapper/${hy.os.family}">
+            <fileset dir="src/main/native/x11wrapper/${hy.os.family}">
                 <include name="*${linklib.suffix}" if="is.zos" />
             </fileset>
         </copy>
 
-        <make dir="${hy.awt.src.main.native}/linuxfont/${hy.os.family}" />
+        <make dir="src/main/native/linuxfont/${hy.os.family}" />
         <!-- Copy the built shared libs over to the jre/bin dir -->
         <copy todir="${hy.jdk}/jre/bin" overwrite="yes">
-            <fileset dir="${hy.awt.src.main.native}/linuxfont">
+            <fileset dir="src/main/native/linuxfont">
                 <include name="*${shlib.suffix}*"/>
             </fileset>
         </copy>
         <!-- Copy link exports file on z/OS -->
         <copy todir="${hy.hdk}/lib" overwrite="yes">
-            <fileset dir="${hy.awt.src.main.native}/linuxfont/${hy.os.family}">
+            <fileset dir="src/main/native/linuxfont/${hy.os.family}">
                 <include name="*${linklib.suffix}" if="is.zos" />
             </fileset>
         </copy>
     </target>
 
     <target name="-build-native-windows" if="is.windows">
-        <make dir="${hy.awt.src.main.native}/win32wrapper/${hy.os.family}" />
+        <make dir="src/main/native/win32wrapper/${hy.os.family}" />
         <!-- Copy the built shared libs over to the jre/bin dir -->
         <copy todir="${hy.jdk}/jre/bin" overwrite="yes">
-            <fileset dir="${hy.awt.src.main.native}/win32wrapper">
+            <fileset dir="src/main/native/win32wrapper">
                 <include name="*${shlib.suffix}*"/>
                 <include name="*${progdb.suffix}*" />
                 <exclude name="*${manifest.suffix}"/>
             </fileset>
         </copy>
 
-        <make dir="${hy.awt.src.main.native}/winfont/${hy.os.family}" />
+        <make dir="src/main/native/winfont/${hy.os.family}" />
         <!-- Copy the built shared libs over to the jre/bin dir -->
         <copy todir="${hy.jdk}/jre/bin" overwrite="yes">
-            <fileset dir="${hy.awt.src.main.native}/winfont">
+            <fileset dir="src/main/native/winfont">
                 <include name="*${shlib.suffix}*"/>
                 <include name="*${progdb.suffix}*" />
                 <exclude name="*${manifest.suffix}"/>
@@ -293,209 +264,102 @@
 
     <target name="clean-native"
             depends="-clean-native-unix,-clean-native-windows">
-        <make dir="${hy.awt.src.main.native}/lcmm/${hy.os.family}"
+        <make dir="src/main/native/lcmm/${hy.os.family}"
               target="clean"/>
-        <make dir="${hy.awt.src.main.native}/jpegdecoder/${hy.os.family}"
+        <make dir="src/main/native/jpegdecoder/${hy.os.family}"
               target="clean"/>
-        <make dir="${hy.awt.src.main.native}/gl/${hy.os.family}"
+        <make dir="src/main/native/gl/${hy.os.family}"
               target="clean"/>
-        <make dir="${hy.awt.src.main.native}/oglwrapper/${hy.os.family}"
+        <make dir="src/main/native/oglwrapper/${hy.os.family}"
               target="clean"/>
-        <make dir="${hy.awt.src.main.native}/fontlib/${hy.os.family}"
+        <make dir="src/main/native/fontlib/${hy.os.family}"
               target="clean"/>
     </target>
 
     <target name="-clean-native-unix" if="is.unix">
-        <make dir="${hy.awt.src.main.native}/x11wrapper/${hy.os.family}"
+        <make dir="src/main/native/x11wrapper/${hy.os.family}"
               target="clean"/>
-        <make dir="${hy.awt.src.main.native}/linuxfont/${hy.os.family}"
+        <make dir="src/main/native/linuxfont/${hy.os.family}"
               target="clean"/>
     </target>
 
     <target name="-clean-native-windows" if="is.windows">
-        <make dir="${hy.awt.src.main.native}/win32wrapper/${hy.os.family}"
+        <make dir="src/main/native/win32wrapper/${hy.os.family}"
               target="clean"/>
-        <make dir="${hy.awt.src.main.native}/winfont/${hy.os.family}"
+        <make dir="src/main/native/winfont/${hy.os.family}"
               target="clean"/>
     </target>
 
-    <target name="compile-tests" depends="copy-test-resources">
-        <echo message="Compiling AWT tests" />
-
-        <mkdir dir="${hy.awt.bin.test.boot}" />
-        <javac destdir="${hy.awt.bin.test.boot}"
-               sourcepath=""
-               compiler="${hy.javac.compiler}"
-               memoryMaximumSize="${hy.javac.maxmem}"
-               source="${hy.javac.source}" 
-               target="${hy.javac.target}"
-               debug="${hy.javac.debug}">
-
-            <compilerarg line="${build.compilerarg}" />
-
-            <src>
-                <pathelement location="${hy.awt.src.test.impl.boot}" />
-            </src>
-               
-            <bootclasspath>
-                <fileset dir="${hy.jdk}/jre/lib/boot">
-                    <include name="**/*.jar" />
-                </fileset>
-            </bootclasspath>
-            <classpath location="${basedir}/../../${junit.jar}" />
-            <classpath location="${hy.hdk}/build/test/support.jar" />
-        </javac>
-
-        <mkdir dir="${hy.awt.bin.test.classes}" />
-        <javac destdir="${hy.awt.bin.test.classes}"
-               sourcepath=""
-               compiler="${hy.javac.compiler}"
-               memoryMaximumSize="${hy.javac.maxmem}"
-               source="${hy.javac.source}" 
-               target="${hy.javac.target}"
-               debug="${hy.javac.debug}">
-
-            <compilerarg line="${build.compilerarg}" />
-
-            <src>
-                <pathelement location="${hy.awt.src.test.api.java}" />
-                <pathelement location="${hy.awt.src.test.impl.platform}" />
-            </src>
-               
-            <bootclasspath>
-                <fileset dir="${hy.jdk}/jre/lib/boot">
-                    <include name="**/*.jar" />
-                </fileset>
-            </bootclasspath>
-            <classpath location="${basedir}/../../${junit.jar}" />
-            <classpath location="${hy.hdk}/build/test/support.jar" />
-        </javac>
-
-    </target>
-
-    <target name="copy-test-resources">
-        <mkdir dir="${hy.awt.bin.test.resources}" />
-        <copy todir="${hy.awt.bin.test.resources}" includeemptydirs="false">
-            <fileset dir="${hy.awt.src.test.api.resources}" />
-        </copy>
-    </target>
-
-    <target name="prepare-exclude">
-       <prepare-exclude-list moduleName="awt" dir="./make"
-                             result="${awt.exclude.file}"/>
-    </target>
-
-    <target name="run-tests">
-        <mkdir dir="${tests.output}" />
-        <property name="test.jre.home" value="${hy.jdk}/jre" />
-
-        <!-- bootclasspath tests -->
-        <junit fork="yes"
-               forkmode="${hy.test.forkmode}"
-               timeout="${hy.test.timeout}"
-               printsummary="withOutAndErr"
-               errorproperty="test.errors"
-               failureproperty="test.failures"
-               showoutput="on"
-               dir="${basedir}"
-               jvm="${test.jre.home}/bin/java">
-
-            <jvmarg line="${hy.test.vmargs}" />
-            <jvmarg value="-Xbootclasspath/a:${hy.awt.bin.test.boot}${path.separator}${basedir}/../../${junit.jar}"/>
-
-            <formatter type="xml" />
-
-            <batchtest todir="${tests.output}" haltonfailure="no">
-                <fileset dir="${hy.awt.src.test.impl.boot}">
-                    <include name="${converted.tc}" if="test.case" />
-                    <include name="**/*Test.java" unless="test.case" />
-                    <excludesfile name="${awt.exclude.file}" unless="test.case" />
-                    <exclude name="**/*Headless*Test.java" />
-                </fileset>
-            </batchtest>
-        </junit>
-
-        <!-- classpath tests -->
-        <junit fork="yes"
-               forkmode="${hy.test.forkmode}"
-               timeout="${hy.test.timeout}"
-               printsummary="withOutAndErr"
-               errorproperty="test.errors"
-               failureproperty="test.failures"
-               showoutput="on"
-               dir="${basedir}"
-               jvm="${test.jre.home}/bin/java">
-
-            <jvmarg line="${hy.test.vmargs}" />
-            <classpath>
-                <pathelement path="${hy.awt.bin.test.classes}" />
-                <fileset dir="${hy.hdk}/build/test/">
-                    <include name="*.jar" />
-                </fileset>
-            </classpath>
-
-            <formatter type="xml" />
-
-            <batchtest todir="${tests.output}">
-                <fileset dir="${hy.awt.src.test.api.java}">
-                    <include name="${converted.tc}" if="test.case" />
-                    <include name="**/*Test.java" unless="test.case" />
-                    <exclude name="**/*Headless*Test.java" unless="test.case" />
-                    <excludesfile name="${awt.exclude.file}" unless="test.case"/>
-                </fileset>
-                <fileset dir="${hy.awt.src.test.impl.platform}">
-                    <include name="${converted.tc}" if="test.case" />
-                    <include name="**/*Test.java" unless="test.case" />
-                    <exclude name="**/*Headless*Test.java" unless="test.case" />
-                    <excludesfile name="${awt.exclude.file}" unless="test.case"/>
-                </fileset>
-            </batchtest>  
-        </junit>
-
-        <!-- headless tests, should be moved to classpath -->
-        <junit fork="yes"
-               forkmode="${hy.test.forkmode}"
-               timeout="${hy.test.timeout}"
-               printsummary="withOutAndErr"
-               errorproperty="test.errors"
-               failureproperty="test.failures"
-               showoutput="on"
-               dir="${basedir}"
-               jvm="${test.jre.home}/bin/java">
-
-            <jvmarg line="${hy.test.vmargs}" />
-            <jvmarg value="-Djava.awt.headless=true"/>
-            <jvmarg value="-Xbootclasspath/a:${hy.awt.bin.test.boot}${path.separator}${basedir}/../../${junit.jar}"/>
-
-            <formatter type="xml" />
-
-            <batchtest todir="${tests.output}" haltonfailure="no" >
-                <fileset dir="${hy.awt.src.test.impl.boot}">
-                    <include name="${converted.tc}" if="test.case" />
-                    <include name="**/*Headless*Test.java" unless="test.case" />
-                    <excludesfile name="${awt.exclude.file}" unless="test.case"/>
-                </fileset>
-                <fileset dir="${hy.awt.src.test.impl.platform}">
-                    <include name="${converted.tc}" if="test.case" />
-                    <include name="**/*Headless*Test.java" unless="test.case" />
-                    <excludesfile name="${awt.exclude.file}" unless="test.case"/>
-                </fileset>
-            </batchtest>  
-        </junit>
-
-        <antcall target="touch-failures-file" />
-        <antcall target="touch-errors-file" />
-
-    </target>
+    <target name="test-jar" depends="svn-info,compile-tests">
+        <mkdir dir="${tests.hdk.dir}" />
+        <copy file="make/run-test.xml" tofile="${tests.hdk.dir}/build.xml" />
+        
+        <jar destfile="${tests.hdk.dir}/awt_boot_tests.jar">
+            <fileset dir="bin/test/boot">
+                <exclude name="**/*Headless*Test.class" />
+            </fileset>
+            <manifest>
+                <attribute name="Implementation-Version" value="${svn.info}"/> 
+            </manifest>
+            <metainf refid="hy.required.metainf-files"/>
+        </jar>
+        <jar destfile="${tests.hdk.dir}/awt_tests.jar">
+            <fileset dir="bin/test/classes" />
+            <manifest>
+                <attribute name="Implementation-Version" value="${svn.info}"/> 
+            </manifest>
+            <metainf refid="hy.required.metainf-files"/>
+        </jar>
+        <jar destfile="${tests.hdk.dir}/awt_headless_tests.jar">
+            <fileset dir="bin/test/boot">
+                <include name="**/*Headless*Test.class" />
+            </fileset>
+            <manifest>
+                <attribute name="Implementation-Version" value="${svn.info}"/> 
+            </manifest>
+            <metainf refid="hy.required.metainf-files"/>
+        </jar>
 
-    <target name="touch-failures-file" if="test.failures">
-        <echo file="${tests.output}/test.failures"
-            append="true">awt${line.separator}</echo>
+        <mkdir dir="${tests.excludes.hdk.dir}"/>
+        <copy todir="${tests.excludes.hdk.dir}">
+            <fileset dir="make" includes="exclude*"/>
+            <filterchain>
+                <tokenfilter>
+                    <replaceregex pattern="\.java" replace="\.class" flags="g"/>
+                </tokenfilter>
+            </filterchain>
+        </copy>
+
+        <mkdir dir="${tests.resources.hdk.dir}" />
+        <copy todir="${tests.resources.hdk.dir}" includeemptydirs="false">
+            <fileset dir="src/test/api/resources" />
+        </copy>
+
+        <copy file="../../${junit.jar}" todir="${hy.hdk}/build/test" />
+    </target>
+
+    <target name="compile-tests">
+        <compile-tests description="awt boot tests"
+                       destdir="bin/test/boot">
+            <javac-elements>
+                <src>
+                    <pathelement location="src/test/impl/boot" />
+                </src>
+            </javac-elements>
+        </compile-tests>
+        <compile-tests description="awt tests"
+                       destdir="bin/test/classes">
+            <javac-elements>
+                <src>
+                    <pathelement location="src/test/api/java" />
+                    <pathelement location="src/test/impl/${hy.os.family}" />
+                </src>
+            </javac-elements>
+        </compile-tests>
     </target>
 
-    <target name="touch-errors-file" if="test.errors">
-        <echo file="${tests.output}/test.errors"
-            append="true">awt${line.separator}</echo>
+    <target name="run-tests" depends="test-jar">
+        <ant dir="${tests.hdk.dir}" target="test-module" />
     </target>
 
 </project>

Modified: harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/common/org/apache/harmony/awt/gl/CommonGraphics2D.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/common/org/apache/harmony/awt/gl/CommonGraphics2D.java?rev=798469&r1=798468&r2=798469&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/common/org/apache/harmony/awt/gl/CommonGraphics2D.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/common/org/apache/harmony/awt/gl/CommonGraphics2D.java Tue Jul 28 09:30:33 2009
@@ -235,8 +235,8 @@
             mra.translate((int)transform.getTranslateX(), (int)transform.getTranslateY());
         } else {
             int type = transform.getType();
-            if(s instanceof Rectangle && (type & (AffineTransform.TYPE_IDENTITY |
-                AffineTransform.TYPE_TRANSLATION)) != 0){
+            if(s instanceof Rectangle && (type == AffineTransform.TYPE_IDENTITY ||
+                type == AffineTransform.TYPE_TRANSLATION )) {
                     mra = new MultiRectArea((Rectangle)s);
                     if(type == AffineTransform.TYPE_TRANSLATION){
                         mra.translate((int)transform.getTranslateX(), (int)transform.getTranslateY());
@@ -931,8 +931,8 @@
             setTransformedClip(nclip);
         } else {
             int type = transform.getType();
-            if(s instanceof Rectangle && (type & (AffineTransform.TYPE_IDENTITY |
-                AffineTransform.TYPE_TRANSLATION)) != 0){
+            if(s instanceof Rectangle && (type == AffineTransform.TYPE_IDENTITY ||
+                type == AffineTransform.TYPE_TRANSLATION )) {
                     MultiRectArea nclip = new MultiRectArea((Rectangle)s);
                     if(type == AffineTransform.TYPE_TRANSLATION){
                         nclip.translate((int)transform.getTranslateX(), (int)transform.getTranslateY());

Modified: harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/common/org/apache/harmony/awt/gl/image/PngDecoder.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/common/org/apache/harmony/awt/gl/image/PngDecoder.java?rev=798469&r1=798468&r2=798469&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/common/org/apache/harmony/awt/gl/image/PngDecoder.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/common/org/apache/harmony/awt/gl/image/PngDecoder.java Tue Jul 28 09:30:33 2009
@@ -107,27 +107,17 @@
     public void decodeImage() throws IOException {
         try {
             int bytesRead = 0;
-            int needBytes, offset, bytesInBuffer = 0;
             // Read from the input stream
             for (;;) {
-                needBytes = buffer_size - bytesInBuffer;
-                offset = bytesInBuffer;
+                bytesRead = inputStream.read(buffer, 0, buffer_size);
 
-                bytesRead = inputStream.read(buffer, offset, needBytes);
-
-                if (bytesRead < 0) { // Break, nothing to read from buffer, image truncated?
+                if (bytesRead < 0) {
+                    // Break, nothing to read from buffer, image truncated?
                     releaseNativeDecoder(hNativeDecoder);
                     break;
                 }
 
-                // Keep track on how much bytes left in buffer
-                bytesInBuffer += bytesRead;
-                hNativeDecoder = decode(buffer, bytesInBuffer, hNativeDecoder);
-                // PNG decoder always consumes all bytes at once
-                bytesInBuffer = 0;
-
-                // if (bytesConsumed < 0)
-                //break; // Error exit
+                hNativeDecoder = decode(buffer, bytesRead, hNativeDecoder);
 
                 returnData();
 

Propchange: harmony/enhanced/classlib/branches/java6/modules/awt/src/main/native/fontlib/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Tue Jul 28 09:30:33 2009
@@ -2,4 +2,5 @@
 *.map
 *.pdb
 *.manifest
-libFL.so
+*.so
+*.dylib

Modified: harmony/enhanced/classlib/branches/java6/modules/awt/src/main/native/fontlib/unix/makefile
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/awt/src/main/native/fontlib/unix/makefile?rev=798469&r1=798468&r2=798469&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/awt/src/main/native/fontlib/unix/makefile (original)
+++ harmony/enhanced/classlib/branches/java6/modules/awt/src/main/native/fontlib/unix/makefile Tue Jul 28 09:30:33 2009
@@ -37,11 +37,11 @@
 endif
 
 MDLLIBFILES += \
-	$(LIBPATH)libhypool.a $(LIBPATH)libvmi.so
+	$(LIBPATH)libhypool.a $(LIBPATH)libvmi$(HY_LINKLIB_SUFFIX)
 
 OSLIBS += $(STDCLIBS)
 
-DLLNAME=../libFL.so
+DLLNAME=../libFL$(HY_LINKLIB_SUFFIX)
 EXPNAME=HYFONTLIB_0.1
 
 include $(HY_HDK)/build/make/rules.mk

Modified: harmony/enhanced/classlib/branches/java6/modules/awt/src/main/native/gl/shared/SurfaceDataStructure.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/awt/src/main/native/gl/shared/SurfaceDataStructure.h?rev=798469&r1=798468&r2=798469&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/awt/src/main/native/gl/shared/SurfaceDataStructure.h (original)
+++ harmony/enhanced/classlib/branches/java6/modules/awt/src/main/native/gl/shared/SurfaceDataStructure.h Tue Jul 28 09:30:33 2009
@@ -30,7 +30,7 @@
 #include "gl_GDIPlus.h"
 #endif
 
-#ifdef unix
+#if defined(unix) || defined(MACOSX)
 #include "XSurfaceInfo.h"
 #endif
 
@@ -158,7 +158,7 @@
     BOOL isTrueColor;
 #endif
 
-#ifdef unix
+#if defined(unix) || defined(MACOSX)
     // XVolatileImage
     XImage *ximage;
 

Modified: harmony/enhanced/classlib/branches/java6/modules/awt/src/main/native/lcmm/shared/NativeCMM.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/awt/src/main/native/lcmm/shared/NativeCMM.c?rev=798469&r1=798468&r2=798469&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/awt/src/main/native/lcmm/shared/NativeCMM.c (original)
+++ harmony/enhanced/classlib/branches/java6/modules/awt/src/main/native/lcmm/shared/NativeCMM.c Tue Jul 28 09:30:33 2009
@@ -29,7 +29,7 @@
 int gl_cmsErrorHandler(int errorCode, const char *msg) {
   if(errorCode == LCMS_ERRC_ABORTED) {
     // Throw exception later, after returning control from cmm
-#if defined(ZOS) || defined(LINUX) || defined(FREEBSD)
+#if defined(ZOS) || defined(LINUX) || defined(FREEBSD) || defined(MACOSX)
     errMsg = strdup(msg);
 #else
     errMsg = _strdup(msg);

Modified: harmony/enhanced/classlib/branches/java6/modules/awt/src/main/native/lcmm/shared/NativeImageFormat.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/awt/src/main/native/lcmm/shared/NativeImageFormat.c?rev=798469&r1=798468&r2=798469&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/awt/src/main/native/lcmm/shared/NativeImageFormat.c (original)
+++ harmony/enhanced/classlib/branches/java6/modules/awt/src/main/native/lcmm/shared/NativeImageFormat.c Tue Jul 28 09:30:33 2009
@@ -23,6 +23,14 @@
 #include "NativeImageFormat.h"
 #include "exceptions.h"
 
+jfieldID clr_NIF_cmmFormatID;
+jfieldID clr_NIF_colsID;
+jfieldID clr_NIF_rowsID;
+jfieldID clr_NIF_scanlineStrideID;
+jfieldID clr_NIF_imageDataID;
+jfieldID clr_NIF_dataOffsetID;
+jfieldID clr_NIF_alphaOffsetID;
+
 /*
  * Class:     org_apache_harmony_awt_gl_color_NativeImageFormat
  * Method:    initIDs

Modified: harmony/enhanced/classlib/branches/java6/modules/awt/src/main/native/lcmm/shared/NativeImageFormat.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/awt/src/main/native/lcmm/shared/NativeImageFormat.h?rev=798469&r1=798468&r2=798469&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/awt/src/main/native/lcmm/shared/NativeImageFormat.h (original)
+++ harmony/enhanced/classlib/branches/java6/modules/awt/src/main/native/lcmm/shared/NativeImageFormat.h Tue Jul 28 09:30:33 2009
@@ -25,14 +25,6 @@
 
 #include "NativeCMM.h"
 
-jfieldID clr_NIF_cmmFormatID;
-jfieldID clr_NIF_colsID;
-jfieldID clr_NIF_rowsID;
-jfieldID clr_NIF_scanlineStrideID;
-jfieldID clr_NIF_imageDataID;
-jfieldID clr_NIF_dataOffsetID;
-jfieldID clr_NIF_alphaOffsetID;
-
 // Represents NativeImageFormat java class
 typedef struct {
     int cmmFormat;

Modified: harmony/enhanced/classlib/branches/java6/modules/awt/src/main/native/lcmm/unix/makefile
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/awt/src/main/native/lcmm/unix/makefile?rev=798469&r1=798468&r2=798469&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/awt/src/main/native/lcmm/unix/makefile (original)
+++ harmony/enhanced/classlib/branches/java6/modules/awt/src/main/native/lcmm/unix/makefile Tue Jul 28 09:30:33 2009
@@ -18,11 +18,11 @@
 INCLUDES += -I$(SHARED)common -I$(SHAREDSUB)/include $(LCMS_INCLUDES)
 
 BUILDFILES = \
-  $(SHAREDSUB)/cmmerror.o \
-  $(SHAREDSUB)/cmmio.o \
-  $(SHAREDSUB)/cmmxforms.o \
-  $(SHAREDSUB)/NativeCMM.o \
-  $(SHAREDSUB)/NativeImageFormat.o
+  $(SHAREDSUB)cmmerror.o \
+  $(SHAREDSUB)cmmio.o \
+  $(SHAREDSUB)cmmxforms.o \
+  $(SHAREDSUB)NativeCMM.o \
+  $(SHAREDSUB)NativeImageFormat.o
 
 OSLIBS += -llcms
 

Modified: harmony/enhanced/classlib/branches/java6/modules/awt/src/main/native/linuxfont/unix/makefile
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/awt/src/main/native/linuxfont/unix/makefile?rev=798469&r1=798468&r2=798469&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/awt/src/main/native/linuxfont/unix/makefile (original)
+++ harmony/enhanced/classlib/branches/java6/modules/awt/src/main/native/linuxfont/unix/makefile Tue Jul 28 09:30:33 2009
@@ -21,7 +21,7 @@
 INCLUDES += -I/usr/local/include -I/usr/local/include/freetype2
 endif
 ifeq ($(HY_OS),macosx)
-INCLUDES += -I/sw/lib/freetype2/include/freetype2 -I/sw/lib/freetype2/include
+INCLUDES += -I/opt/local/include/freetype2 -I/opt/local/include/freetype2
 endif
 
 BUILDFILES = LinuxNativeFont.o
@@ -31,7 +31,7 @@
 endif
 
 MDLLIBFILES += $(LIBPATH)libhypool.a \
-	$(LIBPATH)libvmi$(HY_LINKLIB_SUFFIX) ../../fontlib/libFL.so
+	$(LIBPATH)libvmi$(HY_LINKLIB_SUFFIX) ../../fontlib/libFL$(HY_LINKLIB_SUFFIX)
 
 OSLIBS += $(XLIBS)
 

Modified: harmony/enhanced/classlib/branches/java6/modules/beans/build.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/beans/build.xml?rev=798469&r1=798468&r2=798469&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/beans/build.xml (original)
+++ harmony/enhanced/classlib/branches/java6/modules/beans/build.xml Tue Jul 28 09:30:33 2009
@@ -19,30 +19,12 @@
 <project name="BEANS Build" default="build" basedir=".">
     <description>Build for BEANS component</description>
 
-    <!-- import common properties -->
+    <property name="hy.module" value="beans" />
     <property name="hy.hdk" location="${basedir}/../../deploy" />
     <import file="${hy.hdk}/build/ant/properties.xml" />
 
-    <property name="tests.output" location="../../build/test_report" />
-
-    <!-- set global properties for this build. -->
-    <xmlproperty file="make/hyproperties.xml" semanticAttributes="true" />
-
-    <fileset id="classes" dir="${hy.build}">
-        <or>
-            <present targetdir="${hy.beans.src.main.java}" />
-            <present targetdir="${hy.beans.src.main.java}">
-                <mapper type="regexp"
-                        from="^(.*?)(\$$[^/\\\.]*)?\.class$$"
-                        to="\1.java"/>
-            </present>
-        </or>
-    </fileset>
-
     <property file="../../make/depends.properties" />
 
-    <property name="beans.exclude.file" location="${hy.hdk}/build/beans.exclude" />
-
     <target name="build" depends="compile-java, copy-resources, build-jar" />
 
     <target name="test" depends="-test-module">
@@ -57,11 +39,12 @@
     </target>
 
     <!-- internal target for local and global test run sequence -->
-    <target name="-test-module" depends="build, compile-tests, prepare-exclude, run-tests" />
+    <target name="-test-module" depends="build, run-tests" />
 
     <target name="clean">
         <delete file="${hy.jdk}/jre/lib/boot/beans.jar" />
         <delete file="${hy.jdk}/jre/lib/boot/beans-src.jar" />
+        <delete dir="${tests.hdk.dir}" failonerror="false" />
         <delete failonerror="false">
             <fileset refid="classes" />
         </delete>
@@ -71,11 +54,11 @@
     <target name="compile-java">
         <echo message="Compiling BEANS classes" />
 
-        <mkdir dir="${hy.build}" />
+        <mkdir dir="../../build/classes" />
 
         <javac sourcepath=""
-               srcdir="${hy.beans.src.main.java}"
-               destdir="${hy.build}"
+               srcdir="src/main/java"
+               destdir="../../build/classes"
                compiler="${hy.javac.compiler}"
                memoryMaximumSize="${hy.javac.maxmem}"
                source="${hy.javac.source}" 
@@ -93,9 +76,9 @@
     </target>
 
     <target name="copy-resources">
-        <mkdir dir="${hy.build}" />
-        <copy todir="${hy.build}" includeemptydirs="false">
-            <fileset dir="${hy.beans.src.main.java}">
+        <mkdir dir="../../build/classes" />
+        <copy todir="../../build/classes" includeemptydirs="false">
+            <fileset dir="src/main/java">
                 <exclude name="**/*.java" />
             </fileset>
         </copy>
@@ -103,7 +86,7 @@
 
     <target name="build-jar" depends="svn-info">
         <jar destfile="${hy.jdk}/jre/lib/boot/beans.jar"
-             manifest="${hy.beans}/META-INF/MANIFEST.MF"
+             manifest="META-INF/MANIFEST.MF"
              compress="${hy.jar.compress}">
             <fileset refid="classes" />
             <manifest>
@@ -114,7 +97,7 @@
         </jar>
 
         <jar destfile="${hy.jdk}/jre/lib/boot/beans-src.jar">
-            <fileset dir="${hy.beans.src.main.java}" />
+            <fileset dir="src/main/java" />
             <manifest>
                 <attribute name="Implementation-Version" value="${svn.info}"/> 
             </manifest>
@@ -123,192 +106,87 @@
         </jar>
     </target>
 
-    <target name="compile-tests" depends="copy-test-resources" > 
-        <mkdir dir="${hy.beans.bin.internal}" />
-        <mkdir dir="${hy.beans.bin.test}" />
-        <mkdir dir="${hy.beans.bin.test.support}" />
+    <target name="test-jar" depends="svn-info,compile-tests">
+        <mkdir dir="${tests.hdk.dir}" />
         
-        <echo message="Compiling support classes for BEANS tests" />
-        <javac srcdir="${hy.beans.src.test.support}"
-               destdir="${hy.beans.bin.test.support}"
-               sourcepath=""
-               compiler="${hy.javac.compiler}"
-               memoryMaximumSize="${hy.javac.maxmem}"
-               source="${hy.javac.source}" 
-               target="${hy.javac.target}"
-               debug="${hy.javac.debug}">
-
-            <compilerarg line="${build.compilerarg}" />
-
-            <bootclasspath>
-                <fileset dir="${hy.jdk}/jre/lib/boot">
-                    <include name="**/*.jar" />
-                </fileset>
-            </bootclasspath>
-            <classpath location="../../build/tests" />
-        </javac>
-
-        <echo message="Compiling internal BEANS tests" />
-        <javac srcdir="${hy.beans.src.test.internal}"
-               destdir="${hy.beans.bin.internal}"
-               sourcepath=""
-               compiler="${hy.javac.compiler}"
-               memoryMaximumSize="${hy.javac.maxmem}"
-               source="${hy.javac.source}" 
-               target="${hy.javac.target}"
-               debug="${hy.javac.debug}">
-
-            <compilerarg line="${build.compilerarg}" />
-
-            <bootclasspath>
-                <fileset dir="${hy.jdk}/jre/lib/boot">
-                    <include name="**/*.jar" />
-                </fileset>
-            </bootclasspath>
-            <classpath location="../../build/tests" />
-            <classpath location="${hy.beans.bin.test.support}" />
-            <classpath location="${hy.hdk}/build/test/support.jar" />
-        </javac>
-
-        <echo message="Compiling BEANS tests" />
-        <javac srcdir="${hy.beans.src.test.java}"
-               destdir="${hy.beans.bin.test}"
-               sourcepath=""
-               compiler="${hy.javac.compiler}"
-               memoryMaximumSize="${hy.javac.maxmem}"
-               source="${hy.javac.source}" 
-               target="${hy.javac.target}"
-               debug="${hy.javac.debug}">
-
-            <compilerarg line="${build.compilerarg}" />
-
-            <bootclasspath>
-                <fileset dir="${hy.jdk}/jre/lib/boot">
-                    <include name="**/*.jar" />
-                </fileset>
-            </bootclasspath>
-            <classpath location="../../build/tests" />
-            <classpath location="${hy.beans.bin.test.support}" />
-            <classpath location="${hy.hdk}/build/test/support.jar" />
-        </javac>
-    </target>
-
-    <target name="prepare-exclude">
-       <prepare-exclude-list moduleName="beans" dir="./make"
-                             result="${beans.exclude.file}"/>
-    </target>
+        <copy file="make/run-test.xml" tofile="${tests.hdk.dir}/build.xml" />
+        
+        <jar destfile="${tests.hdk.dir}/beans_test_support.jar">
+            <fileset dir="bin/test_support" />
+            <manifest>
+                <attribute name="Implementation-Version" value="${svn.info}"/> 
+            </manifest>
+            <metainf refid="hy.required.metainf-files"/>
+        </jar>
 
-    <target name="run-tests">
+        <jar destfile="${tests.hdk.dir}/beans_tests.jar">
+            <fileset dir="bin/test" />
+            <manifest>
+                <attribute name="Implementation-Version" value="${svn.info}"/> 
+            </manifest>
+            <metainf refid="hy.required.metainf-files"/>
+        </jar>
 
-        <mkdir dir="${tests.output}" />
+        <jar destfile="${tests.hdk.dir}/beans_impl_tests.jar">
+            <fileset dir="bin/test-internal" />
+            <manifest>
+                <attribute name="Implementation-Version" value="${svn.info}"/> 
+            </manifest>
+            <metainf refid="hy.required.metainf-files"/>
+        </jar>
 
-        <property name="test.jre.home" value="${hy.jdk}/jre" />
+        <mkdir dir="${tests.excludes.hdk.dir}"/>
+        <copy todir="${tests.excludes.hdk.dir}">
+            <fileset dir="make" includes="exclude*"/>
+            <filterchain>
+                <tokenfilter>
+                    <replaceregex pattern="\.java" replace="\.class" flags="g"/>
+                </tokenfilter>
+            </filterchain>
+        </copy>
 
-        <!-- internal tests that need to run on the bootclasspath -->
-        <echo message="Running internal BEANS tests" />
-        <junit fork="yes"
-               forkmode="${hy.test.forkmode}"
-               timeout="${hy.test.timeout}"
-               printsummary="withOutAndErr"
-               errorproperty="test.errors"
-               failureproperty="test.failures"
-               showoutput="on"
-               dir="${basedir}"
-               jvm="${test.jre.home}/bin/java">
-
-            <assertions enableSystemAssertions="true">
-                <enable />
-            </assertions>
-
-            <jvmarg line="${hy.test.vmargs}" />
-
-            <jvmarg value="-Xbootclasspath/a:${hy.beans.bin.internal}${path.separator}../../${junit.jar}"/>         
-            
-            <classpath>
-                <pathelement path="${hy.beans.bin.test}"/>
-                <pathelement path="${hy.beans.bin.test.support}"/>
-                <pathelement path="${hy.beans.src.test.resources}"/>
-            </classpath>
-            <classpath location="../../build/tests" />
-
-            <formatter type="xml" />
-
-            <batchtest todir="${tests.output}" haltonfailure="no" >
-
-                <fileset dir="${hy.beans.src.test.internal}">
-                    <!-- if ${test.case}     -->
-                    <include name="${converted.tc}" if="test.case" />
-                    <!-- unless ${test.case} -->
-                    <include name="**/*Test.java" unless="test.case" />
-                    <excludesfile name="${beans.exclude.file}" unless="test.case" />
-                </fileset>
-            </batchtest>
-        </junit>
-        
-        <!-- API tests -->
-        <echo message="Running BEANS tests" />
-        <junit fork="yes"
-               forkmode="${hy.test.forkmode}"
-               timeout="${hy.test.timeout}"
-               printsummary="withOutAndErr"
-               errorproperty="test.errors"
-               failureproperty="test.failures"
-               showoutput="on"
-               dir="${basedir}"
-               jvm="${test.jre.home}/bin/java">
-
-            <assertions enableSystemAssertions="true">
-                <enable />
-            </assertions>
-
-            <jvmarg line="${hy.test.vmargs}" />
-
-            <classpath>
-                <pathelement path="${hy.beans.bin.test}"/>
-                <pathelement path="${hy.beans.bin.test.support}"/>
-                <pathelement path="${hy.beans.src.test.resources}"/>
-                <pathelement path="${hy.beans}"/>
-            </classpath>
-            <classpath location="../../build/tests" />
-            <classpath location="${hy.hdk}/build/test/support.jar" />
-
-            <formatter type="xml" />
-
-            <batchtest todir="${tests.output}" haltonfailure="no" >
-
-                <fileset dir="${hy.beans.src.test.java}">
-                    <!-- if ${test.case}     -->
-                    <include name="${converted.tc}" if="test.case" />
-                    <!-- unless ${test.case} -->
-                    <include name="**/*Test.java" unless="test.case" />
-                    <excludesfile name="${beans.exclude.file}" unless="test.case" />
-                </fileset>
-            </batchtest>
-        </junit>
-        <antcall target="touch-failures-file" />
-        <antcall target="touch-errors-file" />
-    </target>
+        <copy todir="${tests.resources.hdk.dir}" includeemptydirs="false">
+            <fileset dir="src/test/resources">
+                <exclude name="**/*.java" />
+            </fileset>
+            <fileset dir="src/test/support/java">
+                <exclude name="**/*.java" />
+            </fileset>
+        </copy>
 
-    <target name="touch-failures-file" if="test.failures">
-        <echo file="${tests.output}/test.failures"
-            append="true">beans${line.separator}</echo>
+        <copy file="../../${junit.jar}" todir="${hy.hdk}/build/test" />
     </target>
 
-    <target name="touch-errors-file" if="test.errors">
-        <echo file="${tests.output}/test.errors"
-            append="true">beans${line.separator}</echo>
+    <target name="compile-tests"> 
+        <compile-tests description="beans test support"
+                       destdir="bin/test_support">
+            <javac-elements>
+                <src>
+                    <pathelement location="src/test/support/java" />
+                </src>
+            </javac-elements>
+        </compile-tests>
+        <compile-tests description="beans internal tests"
+                       destdir="bin/test-internal">
+            <javac-elements>
+                <src>
+                    <pathelement location="src/test/java-internal" />
+                </src>
+                <classpath location="bin/test_support" />
+            </javac-elements>
+        </compile-tests>
+        <compile-tests description="beans api tests">
+            <javac-elements>
+                <src>
+                    <pathelement location="src/test/java" />
+                </src>
+                <classpath location="bin/test_support" />
+            </javac-elements>
+        </compile-tests>
     </target>
 
-    <target name="copy-test-resources">
-        <mkdir dir="${hy.beans.bin.test}" />
-        <copy todir="${hy.beans.bin.test}" includeemptydirs="false">
-            <fileset dir="${hy.beans.src.test.resources}">
-                <exclude name="**/*.java" />
-            </fileset>
-        	<fileset dir="${hy.beans.src.test.support}">
-                <exclude name="**/*.java" />
-        	</fileset>
-        </copy>  	
+    <target name="run-tests" depends="test-jar">
+        <ant dir="${tests.hdk.dir}" target="test-module" />
     </target>
 
 </project>

Modified: harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/java/beans/Statement.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/java/beans/Statement.java?rev=798469&r1=798468&r2=798469&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/java/beans/Statement.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/java/beans/Statement.java Tue Jul 28 09:30:33 2009
@@ -489,17 +489,22 @@
     }
 
     static String convertClassName(Class<?> type) {
-        Class<?> componentType = type.getComponentType();
-        Class<?> resultType = (componentType == null) ? type : componentType;
-        String result = resultType.getName();
-        int k = result.lastIndexOf('.');
-        if (k != -1 && k < result.length()) {
-            result = result.substring(k + 1);
+        StringBuilder clazzNameSuffix = new StringBuilder();
+        Class<?> componentType = null;
+        Class<?> clazzType = type;
+        while ((componentType = clazzType.getComponentType()) != null) {
+            clazzNameSuffix.append("Array"); //$NON-NLS-1$
+            clazzType = componentType;
+        }
+        String clazzName = clazzType.getName();
+        int k = clazzName.lastIndexOf('.');
+        if (k != -1 && k < clazzName.length()) {
+            clazzName = clazzName.substring(k + 1);
         }
-        if (componentType != null) {
-            result += "Array"; //$NON-NLS-1$
+        if (clazzNameSuffix.length() == 0 && "String".equals(clazzName)) { //$NON-NLS-1$
+            return "\"\""; //$NON-NLS-1$
         }
-        return result;
+        return clazzName + clazzNameSuffix.toString();
     }
 
     private static Class<?>[] getClasses(Object[] arguments) {

Modified: harmony/enhanced/classlib/branches/java6/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/ExpressionTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/ExpressionTest.java?rev=798469&r1=798468&r2=798469&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/ExpressionTest.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/ExpressionTest.java Tue Jul 28 09:30:33 2009
@@ -392,6 +392,17 @@
     }
 
     /*
+     * Test the constructor(value, ...) with a expression value.
+     */
+    public void testConstructor_EmptyTarget_EmptyMethod_ExpressionArguments() {
+        Object[] objectArray = new Object[] { new Expression((Object) null,
+                (String) null, (Object[]) null) };
+        Expression expression = new Expression(objectArray, new String(),
+                new String(), objectArray);
+        assertEquals("ObjectArray=\"\".(Expression);", expression.toString());
+    }
+
+    /*
      * Test the setValue() method with a non-null value when the value of the
      * expression is still unbounded.
      */

Modified: harmony/enhanced/classlib/branches/java6/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/StatementTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/StatementTest.java?rev=798469&r1=798468&r2=798469&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/StatementTest.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/StatementTest.java Tue Jul 28 09:30:33 2009
@@ -338,6 +338,34 @@
         assertEquals("Object.method(null);", t.toString());
     }
 
+    public void testConstructor_EmptyTarget_EmptyMethod_NullArguments() {
+        Statement statement = new Statement(new String(), new String(),
+                (Object[]) null);
+        assertEquals("\"\".();", statement.toString());
+    }
+
+    public void testConstructor_StringArrayTarget_EmptyMethod_NullArguments() {
+        Object target = new String[2];
+        Statement statement = new Statement(target, new String(),
+                (Object[]) null);
+        assertEquals("StringArray.();", statement.toString());
+    }
+
+    public void testConstructor_StringArrayArrayTarget_EmptyMethod_NullArguments() {
+        Object target = new String[2][];
+        Statement statement = new Statement(target, new String(),
+                (Object[]) null);
+        assertEquals("StringArrayArray.();", statement.toString());
+    }
+
+    public void testConstructor_StringArrayArrayTarget_EmptyMethod_StringArrayArrayTarget() {
+        Object target = new String[2][];
+        Statement statement = new Statement(target, new String(),
+                new Object[] { target });
+        assertEquals("StringArrayArray.(StringArrayArray);", statement
+                .toString());
+    }
+
     // public void testGetArguments() {
     // // Covered in the testcases for the constructor
     // }

Modified: harmony/enhanced/classlib/branches/java6/modules/concurrent/build.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/concurrent/build.xml?rev=798469&r1=798468&r2=798469&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/concurrent/build.xml (original)
+++ harmony/enhanced/classlib/branches/java6/modules/concurrent/build.xml Tue Jul 28 09:30:33 2009
@@ -19,29 +19,11 @@
 <project name="CONCURRENT Build" default="build" basedir=".">
     <description>Build for CONCURRENT component</description>
 
-    <!-- import common properties -->
+    <property name="hy.module" value="concurrent" />
     <property name="hy.hdk" location="${basedir}/../../deploy" />
     <import file="${hy.hdk}/build/ant/properties.xml" />
 
-    <property name="tests.output" location="../../build/test_report" />
-
-    <!-- set global properties for this build. -->
-    <xmlproperty file="make/hyproperties.xml" semanticAttributes="true" />
-
-    <fileset id="classes" dir="${hy.build}">
-        <or>
-            <present targetdir="${hy.concurrent.src.main.java}" />
-            <present targetdir="${hy.concurrent.src.main.java}">
-                <mapper type="regexp"
-                        from="^(.*?)(\$$[^/\\\.]*)?\.class$$"
-                        to="\1.java"/>
-            </present>
-        </or>
-    </fileset>
-
-    <property name="concurrent.exclude.file" location="${hy.hdk}/build/concurrent.exclude" />
-
-    <property name="exclude.file" location="${hy.hdk}/build/concurrent.exclude" />
+    <property file="../../make/depends.properties" />
 
     <target name="build" depends="compile-java, build-jar" />
 
@@ -57,11 +39,12 @@
     </target>
 
     <!-- internal target for local and global test run sequence -->
-    <target name="-test-module" depends="build, compile-tests, prepare-exclude, run-tests" />
+    <target name="-test-module" depends="build, run-tests" />
 
     <target name="clean">
         <delete file="${hy.jdk}/jre/lib/boot/concurrent.jar" />
         <delete file="${hy.jdk}/jre/lib/boot/concurrent-src.jar" />
+        <delete dir="${tests.hdk.dir}" failonerror="false" />
         <delete failonerror="false">
             <fileset refid="classes" />
         </delete>
@@ -71,11 +54,11 @@
     <target name="compile-java">
         <echo message="Compiling CONCURRENT classes" />
 
-        <mkdir dir="${hy.build}" />
+        <mkdir dir="../../build/classes" />
 
         <javac sourcepath=""
-               srcdir="${hy.concurrent.src.main.java}"
-               destdir="${hy.build}"
+               srcdir="src/main/java"
+               destdir="../../build/classes"
                compiler="${hy.javac.compiler}"
                memoryMaximumSize="${hy.javac.maxmem}"
                source="${hy.javac.source}" 
@@ -94,7 +77,7 @@
 
     <target name="build-jar" depends="svn-info">
         <jar destfile="${hy.jdk}/jre/lib/boot/concurrent.jar"
-             manifest="${hy.concurrent}/META-INF/MANIFEST.MF"
+             manifest="META-INF/MANIFEST.MF"
              compress="${hy.jar.compress}">
             <fileset refid="classes" />
             <manifest>
@@ -105,7 +88,7 @@
         </jar>
 
         <jar destfile="${hy.jdk}/jre/lib/boot/concurrent-src.jar">
-            <fileset dir="${hy.concurrent.src.main.java}" />
+            <fileset dir="src/main/java" />
             <manifest>
                 <attribute name="Implementation-Version" value="${svn.info}"/> 
             </manifest>
@@ -114,85 +97,44 @@
         </jar>
     </target>
 
-    <target name="compile-tests">
-        <echo message="Compiling CONCURRENT tests" />
-
-        <mkdir dir="${hy.concurrent.bin.test}" />
+    <target name="test-jar" depends="svn-info,compile-tests">
+        <mkdir dir="${tests.hdk.dir}" />
 
-        <javac sourcepath=""
-               srcdir="${hy.concurrent.src.test.java}"
-               destdir="${hy.concurrent.bin.test}"
-               compiler="${hy.javac.compiler}"
-               memoryMaximumSize="${hy.javac.maxmem}"
-               source="${hy.javac.source}" 
-               target="${hy.javac.target}"
-               debug="${hy.javac.debug}">
-            <compilerarg line="${build.compilerarg}" />
-            <bootclasspath>
-                <fileset dir="${hy.jdk}/jre/lib/boot">
-                    <include name="**/*.jar" />
-                </fileset>
-            </bootclasspath>
-            <classpath location="../../build/tests" />
-        </javac>
-    </target>
+        <copy file="make/run-test.xml" tofile="${tests.hdk.dir}/build.xml" />
+        
+        <jar destfile="${tests.hdk.dir}/concurrent_tests.jar">
+            <fileset dir="bin/test" />
+            <manifest>
+                <attribute name="Implementation-Version" value="${svn.info}"/> 
+            </manifest>
+            <metainf refid="hy.required.metainf-files"/>
+        </jar>
 
-    <target name="prepare-exclude">
-       <prepare-exclude-list moduleName="concurrent" dir="./make"
-                             result="${concurrent.exclude.file}"/>
-    </target>
-
-    <target name="run-tests">
-
-        <mkdir dir="${tests.output}" />
-
-        <property name="test.jre.home" value="${hy.jdk}/jre" />
-
-        <junit fork="yes"
-               forkmode="${hy.test.forkmode}"
-               timeout="${hy.test.timeout}"
-               printsummary="withOutAndErr"
-               errorproperty="test.errors"
-               failureproperty="test.failures"
-               showoutput="on"
-               dir="${basedir}"
-               jvm="${test.jre.home}/bin/java">
-
-            <assertions enableSystemAssertions="true">
-                <enable />
-            </assertions>
-
-            <jvmarg line="${hy.test.vmargs}" />
-
-            <classpath>
-                <pathelement path="${hy.concurrent.bin.test}"/>
-            </classpath>
-            <classpath location="${hy.hdk}/build/test/support.jar" />
-
-            <formatter type="xml" />
-
-            <batchtest todir="${tests.output}" haltonfailure="no" >
-                <fileset dir="${hy.concurrent.src.test.java}">
-                    <!-- if ${test.case}     -->
-                    <include name="${converted.tc}" if="test.case" />
-                    <!-- unless ${test.case} -->
-                    <include name="**/*Test.java" unless="test.case" />
-                    <excludesfile name="${concurrent.exclude.file}" unless="test.case" />
-                </fileset>
-            </batchtest>
-        </junit>
-        <antcall target="touch-failures-file" />
-        <antcall target="touch-errors-file" />
-    </target>
+        <mkdir dir="${tests.excludes.hdk.dir}"/>
+        <copy todir="${tests.excludes.hdk.dir}">
+            <fileset dir="make" includes="exclude*"/>
+            <filterchain>
+                <tokenfilter>
+                    <replaceregex pattern="\.java" replace="\.class" flags="g"/>
+                </tokenfilter>
+            </filterchain>
+        </copy>
+ 
+        <copy file="../../${junit.jar}" todir="${hy.hdk}/build/test" />
+      </target>
 
-    <target name="touch-failures-file" if="test.failures">
-        <echo file="${tests.output}/test.failures"
-            append="true">concurrent${line.separator}</echo>
+    <target name="compile-tests">
+        <compile-tests description="concurrent tests">
+            <javac-elements>
+                <src>
+                    <pathelement location="src/test/java" />
+                </src>
+            </javac-elements>
+        </compile-tests>
     </target>
 
-    <target name="touch-errors-file" if="test.errors">
-        <echo file="${tests.output}/test.errors"
-            append="true">concurrent${line.separator}</echo>
+    <target name="run-tests" depends="test-jar">
+        <ant dir="${tests.hdk.dir}" target="test-module" />
     </target>
 
 </project>

Modified: harmony/enhanced/classlib/branches/java6/modules/concurrent/src/main/java/java/util/concurrent/AbstractExecutorService.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/concurrent/src/main/java/java/util/concurrent/AbstractExecutorService.java?rev=798469&r1=798468&r2=798469&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/concurrent/src/main/java/java/util/concurrent/AbstractExecutorService.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/concurrent/src/main/java/java/util/concurrent/AbstractExecutorService.java Tue Jul 28 09:30:33 2009
@@ -5,11 +5,10 @@
  */
 
 package java.util.concurrent;
-
 import java.util.*;
 
 /**
- * Provides default implementation of {@link ExecutorService}
+ * Provides default implementations of {@link ExecutorService}
  * execution methods. This class implements the <tt>submit</tt>,
  * <tt>invokeAny</tt> and <tt>invokeAll</tt> methods using the default
  * {@link FutureTask} class provided in this package.  For example,
@@ -24,6 +23,10 @@
  */
 public abstract class AbstractExecutorService implements ExecutorService {
 
+    /**
+     * @throws RejectedExecutionException {@inheritDoc}
+     * @throws NullPointerException       {@inheritDoc}
+     */
     public Future<?> submit(Runnable task) {
         if (task == null) throw new NullPointerException();
         FutureTask<Object> ftask = new FutureTask<Object>(task, null);
@@ -31,6 +34,10 @@
         return ftask;
     }
 
+    /**
+     * @throws RejectedExecutionException {@inheritDoc}
+     * @throws NullPointerException       {@inheritDoc}
+     */
     public <T> Future<T> submit(Runnable task, T result) {
         if (task == null) throw new NullPointerException();
         FutureTask<T> ftask = new FutureTask<T>(task, result);
@@ -38,6 +45,10 @@
         return ftask;
     }
 
+    /**
+     * @throws RejectedExecutionException {@inheritDoc}
+     * @throws NullPointerException       {@inheritDoc}
+     */
     public <T> Future<T> submit(Callable<T> task) {
         if (task == null) throw new NullPointerException();
         FutureTask<T> ftask = new FutureTask<T>(task);
@@ -57,7 +68,7 @@
         if (ntasks == 0)
             throw new IllegalArgumentException();
         List<Future<T>> futures= new ArrayList<Future<T>>(ntasks);
-        ExecutorCompletionService<T> ecs = 
+        ExecutorCompletionService<T> ecs =
             new ExecutorCompletionService<T>(this);
 
         // For efficiency, especially in executors with limited
@@ -79,14 +90,14 @@
             int active = 1;
 
             for (;;) {
-                Future<T> f = ecs.poll(); 
+                Future<T> f = ecs.poll();
                 if (f == null) {
                     if (ntasks > 0) {
                         --ntasks;
                         futures.add(ecs.submit(it.next()));
                         ++active;
                     }
-                    else if (active == 0) 
+                    else if (active == 0)
                         break;
                     else if (timed) {
                         f = ecs.poll(nanos, TimeUnit.NANOSECONDS);
@@ -96,29 +107,29 @@
                         nanos -= now - lastTime;
                         lastTime = now;
                     }
-                    else 
+                    else
                         f = ecs.take();
                 }
                 if (f != null) {
                     --active;
                     try {
                         return f.get();
-                    } catch(InterruptedException ie) {
+                    } catch (InterruptedException ie) {
                         throw ie;
-                    } catch(ExecutionException eex) {
+                    } catch (ExecutionException eex) {
                         ee = eex;
-                    } catch(RuntimeException rex) {
+                    } catch (RuntimeException rex) {
                         ee = new ExecutionException(rex);
                     }
                 }
-            }    
+            }
 
             if (ee == null)
                 ee = new ExecutionException();
             throw ee;
 
         } finally {
-            for (Future<T> f : futures) 
+            for (Future<T> f : futures)
                 f.cancel(true);
         }
     }
@@ -133,8 +144,8 @@
         }
     }
 
-    public <T> T invokeAny(Collection<Callable<T>> tasks, 
-                           long timeout, TimeUnit unit) 
+    public <T> T invokeAny(Collection<Callable<T>> tasks,
+                           long timeout, TimeUnit unit)
         throws InterruptedException, ExecutionException, TimeoutException {
         return doInvokeAny(tasks, true, unit.toNanos(timeout));
     }
@@ -153,10 +164,10 @@
             }
             for (Future<T> f : futures) {
                 if (!f.isDone()) {
-                    try { 
-                        f.get(); 
-                    } catch(CancellationException ignore) {
-                    } catch(ExecutionException ignore) {
+                    try {
+                        f.get();
+                    } catch (CancellationException ignore) {
+                    } catch (ExecutionException ignore) {
                     }
                 }
             }
@@ -164,13 +175,13 @@
             return futures;
         } finally {
             if (!done)
-                for (Future<T> f : futures) 
+                for (Future<T> f : futures)
                     f.cancel(true);
         }
     }
 
-    public <T> List<Future<T>> invokeAll(Collection<Callable<T>> tasks, 
-                                         long timeout, TimeUnit unit) 
+    public <T> List<Future<T>> invokeAll(Collection<Callable<T>> tasks,
+                                         long timeout, TimeUnit unit)
         throws InterruptedException {
         if (tasks == null || unit == null)
             throw new NullPointerException();
@@ -178,7 +189,7 @@
         List<Future<T>> futures = new ArrayList<Future<T>>(tasks.size());
         boolean done = false;
         try {
-            for (Callable<T> t : tasks) 
+            for (Callable<T> t : tasks)
                 futures.add(new FutureTask<T>(t));
 
             long lastTime = System.nanoTime();
@@ -192,18 +203,18 @@
                 nanos -= now - lastTime;
                 lastTime = now;
                 if (nanos <= 0)
-                    return futures; 
+                    return futures;
             }
 
             for (Future<T> f : futures) {
                 if (!f.isDone()) {
-                    if (nanos <= 0) 
-                        return futures; 
-                    try { 
-                        f.get(nanos, TimeUnit.NANOSECONDS); 
-                    } catch(CancellationException ignore) {
-                    } catch(ExecutionException ignore) {
-                    } catch(TimeoutException toe) {
+                    if (nanos <= 0)
+                        return futures;
+                    try {
+                        f.get(nanos, TimeUnit.NANOSECONDS);
+                    } catch (CancellationException ignore) {
+                    } catch (ExecutionException ignore) {
+                    } catch (TimeoutException toe) {
                         return futures;
                     }
                     long now = System.nanoTime();
@@ -215,7 +226,7 @@
             return futures;
         } finally {
             if (!done)
-                for (Future<T> f : futures) 
+                for (Future<T> f : futures)
                     f.cancel(true);
         }
     }