harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hinde...@apache.org
Subject svn commit: r798469 [2/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...
Date Tue, 28 Jul 2009 09:30:48 GMT
Modified: harmony/enhanced/classlib/branches/java6/modules/accessibility/build.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/accessibility/build.xml?rev=798469&r1=798468&r2=798469&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/accessibility/build.xml (original)
+++ harmony/enhanced/classlib/branches/java6/modules/accessibility/build.xml Tue Jul 28 09:30:33 2009
@@ -19,32 +19,12 @@
 <project name="ACCESSIBILITY Build" default="build" basedir=".">
     <description>Build for ACCESSIBILITY component</description>
 
-    <!-- import common properties -->
+    <property name="hy.module" value="accessibility" />
     <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.accessibility.src.main.java}" />
-            <present targetdir="${hy.accessibility.src.main.java}">
-                <mapper type="regexp"
-                        from="^(.*?)(\$$[^/\\\.]*)?\.class$$"
-                        to="\1.java"/>
-            </present>
-        </or>
-    </fileset>
-
-    <fileset id="tests" dir="${hy.accessibility.bin.test}"/>
-
     <property file="../../make/depends.properties" />
 
-    <property name="accessibility.exclude.file" location="${hy.hdk}/build/accessibility.exclude" />
-
     <target name="build" depends="compile-java, copy-resources, build-jar" />
 
     <target name="test" depends="-test-module">
@@ -59,12 +39,12 @@
     </target>
 
     <!-- internal target for local and global test run sequence -->
-    <target name="-test-module" depends="build, compile-tests, prepare-exclude, test-jar, run-tests" />
+    <target name="-test-module" depends="build, run-tests" />
 
     <target name="clean">
-        <delete file="${hy.jdk}/jre/lib/boot/${hy.accessibility.packaging.jarname}.jar" />
-        <delete file="${hy.jdk}/jre/lib/boot/${hy.accessibility.packaging.jarname}-src.jar" />
-        <delete file="${hy.jdk}/build/test/${hy.accessibility.packaging.jarname}_tests.jar" />
+        <delete file="${hy.jdk}/jre/lib/boot/accessibility.jar" />
+        <delete file="${hy.jdk}/jre/lib/boot/accessibility-src.jar" />
+        <delete dir="${tests.hdk.dir}" failonerror="false" />
         <delete failonerror="false">
             <fileset refid="classes" />
         </delete>
@@ -74,11 +54,11 @@
     <target name="compile-java">
         <echo message="Compiling ACCESSIBILITY classes" />
 
-        <mkdir dir="${hy.build}" />
+        <mkdir dir="../../build/classes" />
 
         <javac sourcepath=""
-               srcdir="${hy.accessibility.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}" 
@@ -96,9 +76,9 @@
     </target>
 
     <target name="copy-resources">
-        <mkdir dir="${hy.build}" />
-        <copy todir="${hy.build}" includeemptydirs="false">
-            <fileset dir="${hy.accessibility.src.main.java}">
+        <mkdir dir="../../build/classes" />
+        <copy todir="../../build/classes" includeemptydirs="false">
+            <fileset dir="src/main/java">
                 <exclude name="**/*.java" />
             </fileset>
         </copy>
@@ -106,8 +86,8 @@
 
     <target name="build-jar" depends="svn-info">
         <mkdir dir="${hy.jdk}/jre/lib/boot"/>
-        <jar destfile="${hy.jdk}/jre/lib/boot/${hy.accessibility.packaging.jarname}.jar"
-             manifest="${hy.accessibility}/META-INF/MANIFEST.MF"
+        <jar destfile="${hy.jdk}/jre/lib/boot/accessibility.jar"
+             manifest="META-INF/MANIFEST.MF"
              compress="${hy.jar.compress}">
             <fileset refid="classes" />
             <manifest>
@@ -117,8 +97,8 @@
             <metainf refid="hy.required.metainf-files"/>    
         </jar>
 
-        <jar destfile="${hy.jdk}/jre/lib/boot/${hy.accessibility.packaging.jarname}-src.jar">
-            <fileset dir="${hy.accessibility.src.main.java}" />
+        <jar destfile="${hy.jdk}/jre/lib/boot/accessibility-src.jar">
+            <fileset dir="src/main/java" />
             <manifest>
                 <attribute name="Implementation-Version" value="${svn.info}"/> 
             </manifest>
@@ -128,96 +108,44 @@
 
     </target>
 
-    <target name="test-jar" depends="svn-info">
-	<mkdir dir="${hy.jdk}/build/test"/>
-        <jar destfile="${hy.jdk}/build/test/${hy.accessibility.packaging.jarname}_tests.jar">
-            <fileset refid="tests" />
+    <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}/accessibility_tests.jar">
+            <fileset dir="bin/test" />
             <manifest>
                 <attribute name="Implementation-Version" value="${svn.info}"/> 
             </manifest>
+            <metainf refid="hy.required.metainf-files"/>
         </jar>
-    </target>
-
-    <target name="compile-tests">
-        <echo message="Compiling ACCESSIBILITY tests" />
-
-        <mkdir dir="${hy.accessibility.bin.test}" />
-
-        <javac srcdir="${hy.accessibility.src.test.api}/java/common"
-               destdir="${hy.accessibility.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.hdk}/build/test/support.jar" /> 
-        </javac>
-    </target>
-
-    <target name="prepare-exclude">
-       <prepare-exclude-list moduleName="accessibility" dir="./make"
-                             result="${accessibility.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}" />
-
-            <jvmarg value="-Xbootclasspath/a:${hy.jdk}/build/test/${hy.accessibility.packaging.jarname}_tests.jar${path.separator}../../${junit.jar}${path.separator}${hy.hdk}/build/test/support.jar"/>
-
-            <formatter type="xml" />
-
-            <batchtest todir="${tests.output}" haltonfailure="no">
+        <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>
 
-                <fileset dir="${hy.accessibility.src.test.api}/java/common">
-                    <!-- if ${test.case}     -->
-                    <include name="${converted.tc}" if="test.case" />
-                    <!-- unless ${test.case} -->
-                    <include name="**/*.java" unless="test.case" />
-                    <excludesfile name="${accessibility.exclude.file}" unless="test.case"/>
-                </fileset>  
-            </batchtest>
-        </junit>
-        <antcall target="touch-failures-file" />
-        <antcall target="touch-errors-file" />
+        <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">accessibility${line.separator}</echo>
+    <target name="compile-tests">
+        <compile-tests description="accessibility api tests">
+            <javac-elements>
+                <src>
+                    <pathelement location="src/test/api/java/common" />
+                </src>
+            </javac-elements>
+        </compile-tests>
     </target>
 
-    <target name="touch-errors-file" if="test.errors">
-        <echo file="${tests.output}/test.errors"
-            append="true">accessibility${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/annotation/build.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/annotation/build.xml?rev=798469&r1=798468&r2=798469&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/annotation/build.xml (original)
+++ harmony/enhanced/classlib/branches/java6/modules/annotation/build.xml Tue Jul 28 09:30:33 2009
@@ -19,30 +19,14 @@
 <project name="ANNOTATION Build" default="build" basedir=".">
     <description>Build for ANNOTATION component</description>
 
-    <!-- import common properties -->
+    <property name="hy.module" value="annotation" />
     <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.annotation.src.main.java}" />
-            <present targetdir="${hy.annotation.src.main.java}">
-                <mapper type="regexp"
-                        from="^(.*?)(\$$[^/\\\.]*)?\.class$$"
-                        to="\1.java"/>
-            </present>
-        </or>
-    </fileset>
+    <property file="../../make/depends.properties" />
 
     <target name="build" depends="compile-java, copy-resources, build-jar" />
 
-    <property name="annotation.exclude.file" location="${hy.hdk}/build/annotation.exclude" />
-
     <target name="test" depends="-test-module">
         <fail message="Some tests failed">
             <condition>
@@ -55,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/${hy.annotation.packaging.jarname}.jar" />
-        <delete file="${hy.jdk}/jre/lib/boot/${hy.annotation.packaging.jarname}-src.jar" />
+        <delete file="${hy.jdk}/jre/lib/boot/annotation.jar" />
+        <delete file="${hy.jdk}/jre/lib/boot/annotation-src.jar" />
+        <delete dir="${tests.hdk.dir}" failonerror="false" />
         <delete failonerror="false">
             <fileset refid="classes" />
         </delete>
@@ -69,17 +54,19 @@
     <target name="compile-java">
         <echo message="Compiling ANNOTATION classes" />
 
-        <mkdir dir="${hy.build}" />
+        <mkdir dir="../../build/classes" />
 
         <javac sourcepath=""
-               srcdir="${hy.annotation.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}" 
                target="${hy.javac.target}"
                debug="${hy.javac.debug}">
 
+            <compilerarg line="${build.compilerarg}" />
+
             <bootclasspath>
                 <fileset dir="${hy.jdk}/jre/lib/boot">
                     <include name="**/*.jar" />
@@ -89,18 +76,17 @@
     </target>
 
     <target name="copy-resources">
-        <mkdir dir="${hy.build}" />
-        <copy todir="${hy.build}" includeemptydirs="false">
-            <fileset dir="${hy.annotation.src.main.java}">
+        <mkdir dir="../../build/classes" />
+        <copy todir="../../build/classes" includeemptydirs="false">
+            <fileset dir="src/main/java">
                 <exclude name="**/*.java" />
             </fileset>
         </copy>
     </target>
 
-
     <target name="build-jar" depends="svn-info">
-        <jar destfile="${hy.jdk}/jre/lib/boot/${hy.annotation.packaging.jarname}.jar"
-             manifest="${hy.annotation}/META-INF/MANIFEST.MF"
+        <jar destfile="${hy.jdk}/jre/lib/boot/annotation.jar"
+             manifest="META-INF/MANIFEST.MF"
              compress="${hy.jar.compress}">
             <fileset refid="classes" />
             <manifest>
@@ -110,8 +96,8 @@
             <metainf refid="hy.required.metainf-files"/>
         </jar>
 
-        <jar destfile="${hy.jdk}/jre/lib/boot/${hy.annotation.packaging.jarname}-src.jar">
-            <fileset dir="${hy.annotation.src.main.java}" />
+        <jar destfile="${hy.jdk}/jre/lib/boot/annotation-src.jar">
+            <fileset dir="src/main/java" />
             <manifest>
                 <attribute name="Implementation-Version" value="${svn.info}"/> 
             </manifest>
@@ -120,87 +106,44 @@
         </jar>
     </target>
 
-    <target name="compile-tests">
-        <echo message="Compiling ANNOTATION tests" />
-
-        <mkdir dir="${hy.annotation.bin.test}" />
-
-        <javac srcdir="${hy.annotation.src.test.java}"
-               destdir="${hy.annotation.bin.test}"
-               sourcepath=""
-               compiler="${hy.javac.compiler}"
-               memoryMaximumSize="${hy.javac.maxmem}"
-               source="${hy.javac.source}" 
-               target="${hy.javac.target}"
-               debug="${hy.javac.debug}">
-
-            <bootclasspath>
-                <fileset dir="${hy.jdk}/jre/lib/boot">
-                    <include name="**/*.jar" />
-                </fileset>
-            </bootclasspath>
-            <classpath location="../../build/tests" />
-            <classpath location="${hy.hdk}/build/test/support.jar" />
-        </javac>
-    </target>
-
-    <target name="prepare-exclude">
-       <prepare-exclude-list moduleName="annotation" dir="./make"
-                             result="${annotation.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.annotation.bin.test}"/>
-            </classpath>
-            <classpath location="${hy.hdk}/build/test/support.jar" />
-
-            <formatter type="xml" />
+    <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}/annotation_tests.jar">
+            <fileset dir="bin/test" />
+            <manifest>
+                <attribute name="Implementation-Version" value="${svn.info}"/> 
+            </manifest>
+            <metainf refid="hy.required.metainf-files"/>
+        </jar>
 
-            <batchtest todir="${tests.output}" haltonfailure="no" >
+        <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>
 
-                <fileset dir="${hy.annotation.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="${annotation.exclude.file}" unless="test.case" />
-                </fileset>  
-            </batchtest>
-        </junit>
-        <antcall target="touch-failures-file" />
-        <antcall target="touch-errors-file" />
+        <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">annotation${line.separator}</echo>
+    <target name="compile-tests">
+        <compile-tests description="annotation api 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">annotation${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/applet/build.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/applet/build.xml?rev=798469&r1=798468&r2=798469&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/applet/build.xml (original)
+++ harmony/enhanced/classlib/branches/java6/modules/applet/build.xml Tue Jul 28 09:30:33 2009
@@ -19,30 +19,14 @@
 <project name="APPLET Build" default="build" basedir=".">
     <description>Build for APPLET component</description>
 
-    <!-- import common properties -->
+    <property name="hy.module" value="applet" />
     <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.applet.src.main.java}" />
-            <present targetdir="${hy.applet.src.main.java}">
-                <mapper type="regexp"
-                        from="^(.*?)(\$$[^/\\\.]*)?\.class$$"
-                        to="\1.java"/>
-            </present>
-        </or>
-    </fileset>
+    <property file="../../make/depends.properties" />
 
     <target name="build" depends="compile-java, copy-resources, build-jar" />
 
-    <property name="applet.exclude.file" location="${hy.hdk}/build/applet.exclude" />
-
     <target name="test" depends="-test-module">
         <fail message="Some tests failed">
             <condition>
@@ -55,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/applet.jar" />
         <delete file="${hy.jdk}/jre/lib/boot/applet-src.jar" />
+        <delete dir="${tests.hdk.dir}" failonerror="false" />
         <delete failonerror="false">
             <fileset refid="classes" />
         </delete>
@@ -69,17 +54,19 @@
     <target name="compile-java">
         <echo message="Compiling APPLET classes" />
 
-        <mkdir dir="${hy.build}" />
+        <mkdir dir="../../build/classes" />
 
         <javac sourcepath=""
-               srcdir="${hy.applet.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}" 
                target="${hy.javac.target}"
                debug="${hy.javac.debug}">
 
+            <compilerarg line="${build.compilerarg}" />
+
             <bootclasspath>
                 <fileset dir="${hy.jdk}/jre/lib/boot">
                     <include name="**/*.jar" />
@@ -89,9 +76,9 @@
     </target>
 
     <target name="copy-resources">
-        <mkdir dir="${hy.build}" />
-        <copy todir="${hy.build}" includeemptydirs="false">
-            <fileset dir="${hy.applet.src.main.java}">
+        <mkdir dir="../../build/classes" />
+        <copy todir="../../build/classes" includeemptydirs="false">
+            <fileset dir="src/main/java">
                 <exclude name="**/*.java" />
             </fileset>
         </copy>
@@ -99,7 +86,7 @@
 
     <target name="build-jar" depends="svn-info">
         <jar destfile="${hy.jdk}/jre/lib/boot/applet.jar"
-             manifest="${hy.applet}/META-INF/MANIFEST.MF"
+             manifest="META-INF/MANIFEST.MF"
              compress="${hy.jar.compress}">
             <fileset refid="classes" />
             <manifest>
@@ -110,7 +97,7 @@
         </jar>
 
         <jar destfile="${hy.jdk}/jre/lib/boot/applet-src.jar">
-            <fileset dir="${hy.applet.src.main.java}" />
+            <fileset dir="src/main/java" />
             <manifest>
                 <attribute name="Implementation-Version" value="${svn.info}"/> 
             </manifest>
@@ -120,85 +107,44 @@
 
     </target>
 
-    <target name="compile-tests">
-        <echo message="Compiling APPLET tests" />
-
-        <mkdir dir="${hy.applet.bin.test}" />
-
-        <javac srcdir="${hy.applet.src.test.java}"
-               destdir="${hy.applet.bin.test}"
-               sourcepath=""
-               compiler="${hy.javac.compiler}"
-               memoryMaximumSize="${hy.javac.maxmem}"
-               source="${hy.javac.source}" 
-               target="${hy.javac.target}"
-               debug="${hy.javac.debug}">
-
-            <bootclasspath>
-                <fileset dir="${hy.jdk}/jre/lib/boot">
-                    <include name="**/*.jar" />
-                </fileset>
-            </bootclasspath>
-            <classpath location="../../build/tests" />
-        </javac>
-    </target>
-
-    <target name="prepare-exclude">
-       <prepare-exclude-list moduleName="applet" dir="./make"
-                             result="${applet.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.applet.bin.test}"/>
-            </classpath>
+    <target name="test-jar" depends="svn-info,compile-tests">
+        <mkdir dir="${tests.hdk.dir}" />
 
-            <formatter type="xml" />
-
-            <batchtest todir="${tests.output}" haltonfailure="no" >
+        <copy file="make/run-test.xml" tofile="${tests.hdk.dir}/build.xml" />
+        
+        <jar destfile="${tests.hdk.dir}/applet_tests.jar">
+            <fileset dir="bin/test" />
+            <manifest>
+                <attribute name="Implementation-Version" value="${svn.info}"/> 
+            </manifest>
+            <metainf refid="hy.required.metainf-files"/>
+        </jar>
 
-                <fileset dir="${hy.applet.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="${applet.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">applet${line.separator}</echo>
+    <target name="compile-tests">
+        <compile-tests description="applet 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">applet${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/archive/build.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/archive/build.xml?rev=798469&r1=798468&r2=798469&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/archive/build.xml (original)
+++ harmony/enhanced/classlib/branches/java6/modules/archive/build.xml Tue Jul 28 09:30:33 2009
@@ -19,32 +19,14 @@
 <project name="ARCHIVE Build" default="build" basedir=".">
     <description>Build for ARCHIVE component</description>
 
-    <!-- import common properties -->
+    <property name="hy.module" value="archive" />
     <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.archive.src.main.java}" />
-            <present targetdir="${hy.archive.src.main.java}">
-                <mapper type="regexp"
-                        from="^(.*?)(\$$[^/\\\.]*)?\.class$$"
-                        to="\1.java"/>
-            </present>
-        </or>
-    </fileset>
-
     <property file="../../make/depends.properties" />
 
     <property name="zlib.zip" location="${depends.oss}/zlib_1.2.3.zip" />
 
-    <property name="archive.exclude.file" location="${hy.hdk}/build/archive.exclude" />
-
     <target name="build" depends="compile-java, copy-resources, build-jar" />
     
     <target name="copy-native-includes"
@@ -52,7 +34,7 @@
 
     <target name="copy-zlib-include" unless="hy.skip.zlib">
         <copy todir="${hy.hdk}/include" overwrite="yes">
-            <fileset dir="${hy.archive.src.main.native}/zlib_dist">
+            <fileset dir="src/main/native/zlib_dist">
                 <include name="zlib.h" />
                 <include name="zconf.h" />
             </fileset>
@@ -61,7 +43,7 @@
 	
     <target name="copy-zipsup-include" if="hy.skip.zip.api">
         <copy todir="${hy.hdk}/include" overwrite="yes">
-            <fileset dir="${hy.archive.src.main.native}/include/shared">
+            <fileset dir="src/main/native/include/shared">
                 <include name="zipsup.h" />
             </fileset>
         </copy>
@@ -71,30 +53,30 @@
             unless="hy.skip.zlib" />
         
     <target name="-unzip-oss">
-        <mkdir dir="${hy.archive.src.main.native}/zlib_dist" />
-        <unzip src="${zlib.zip}" dest="${hy.archive.src.main.native}/zlib_dist" />
-        <chmod dir="${hy.archive.src.main.native}/zlib_dist" perm="ugo+r" />
+        <mkdir dir="src/main/native/zlib_dist" />
+        <unzip src="${zlib.zip}" dest="src/main/native/zlib_dist" />
+        <chmod dir="src/main/native/zlib_dist" perm="ugo+r" />
     </target>
 
     <target name="-ascii2ebcdic-conversion" if="is.zos">
-        <move todir="${hy.archive.src.main.native}/zlib_dist_ascii">
-            <fileset dir="${hy.archive.src.main.native}/zlib_dist">
+        <move todir="src/main/native/zlib_dist_ascii">
+            <fileset dir="src/main/native/zlib_dist">
                 <include name="**/*" />
                 <exclude name="**/*.o" />
             </fileset>
         </move>
-        <copy todir="${hy.archive.src.main.native}/zlib_dist" outputencoding="IBM-1047" >
-            <fileset dir="${hy.archive.src.main.native}/zlib_dist_ascii">
+        <copy todir="src/main/native/zlib_dist" outputencoding="IBM-1047" >
+            <fileset dir="src/main/native/zlib_dist_ascii">
                 <include name="**/*" />
                 <exclude name="**/*.o" />
             </fileset>               
         </copy>
-        <fixcrlf srcdir="${hy.archive.src.main.native}/zlib_dist" includes="**/*"  excludes="**/*.o" eol="unix" />
-        <delete dir="${hy.archive.src.main.native}/zlib_dist_ascii" />
+        <fixcrlf srcdir="src/main/native/zlib_dist" includes="**/*"  excludes="**/*.o" eol="unix" />
+        <delete dir="src/main/native/zlib_dist_ascii" />
     </target>
     
     <target name="clean-overlay-oss" unless="hy.skip.zlib" >
-        <delete dir="${hy.archive.src.main.native}/zlib_dist" quiet="true" />
+        <delete dir="src/main/native/zlib_dist" quiet="true" />
     </target>
     
     <!-- Build native code -->
@@ -102,13 +84,13 @@
             depends="-build-native-zip,-build-native-zlib,-build-native-archive" />
 
     <target name="-build-native-zip" if="hy.skip.zip.api">
-        <make dir="${hy.archive.src.main.native}/zip/${hy.os.family}" />
+        <make dir="src/main/native/zip/${hy.os.family}" />
     </target>
         
     <target name="-build-native-zlib" unless="hy.skip.zlib">
-        <make dir="${hy.archive.src.main.native}/zlib/${hy.os.family}" />
+        <make dir="src/main/native/zlib/${hy.os.family}" />
         <copy todir="${hy.jdk}/jre/bin" overwrite="yes">
-            <fileset dir="${hy.archive.src.main.native}/zlib">
+            <fileset dir="src/main/native/zlib">
                 <include name="*${shlib.suffix}*"/>
                 <include name="*${progdb.suffix}*" if="is.windows" />
                 <exclude name="*${manifest.suffix}"/>
@@ -116,16 +98,16 @@
         </copy>
         <!-- Copy link exports file on z/OS -->
         <copy todir="${hy.hdk}/lib" overwrite="yes">
-            <fileset dir="${hy.archive.src.main.native}/zlib/${hy.os.family}">
+            <fileset dir="src/main/native/zlib/${hy.os.family}">
                 <include name="*${linklib.suffix}" if="is.zos" />
             </fileset>
         </copy>
     </target>
         
     <target name="-build-native-archive">
-        <make dir="${hy.archive.src.main.native}/archive/${hy.os.family}" />
+        <make dir="src/main/native/archive/${hy.os.family}" />
         <copy todir="${hy.jdk}/jre/bin" overwrite="yes">
-            <fileset dir="${hy.archive.src.main.native}/archive">
+            <fileset dir="src/main/native/archive">
                 <include name="*${shlib.suffix}*"/>
                 <include name="*${progdb.suffix}*" if="is.windows" />
                 <exclude name="*${manifest.suffix}"/>
@@ -133,7 +115,7 @@
         </copy>
         <!-- Copy link exports file on z/OS -->
         <copy todir="${hy.hdk}/lib" overwrite="yes">
-            <fileset dir="${hy.archive.src.main.native}/archive/${hy.os.family}">
+            <fileset dir="src/main/native/archive/${hy.os.family}">
                 <include name="*${linklib.suffix}" if="is.zos" />
             </fileset>
         </copy>
@@ -144,17 +126,17 @@
             depends="-clean-native-zip,-clean-native-zlib,-clean-native-archive"/>
 
     <target name="-clean-native-zip" if="hy.skip.zip.api">
-        <make dir="${hy.archive.src.main.native}/zip/${hy.os.family}"
+        <make dir="src/main/native/zip/${hy.os.family}"
               target="clean" />
     </target>
 
     <target name="-clean-native-zlib" unless="hy.skip.zlib">
-        <make dir="${hy.archive.src.main.native}/zlib/${hy.os.family}"
+        <make dir="src/main/native/zlib/${hy.os.family}"
               target="clean" />
     </target>
 
     <target name="-clean-native-archive">
-        <make dir="${hy.archive.src.main.native}/archive/${hy.os.family}"
+        <make dir="src/main/native/archive/${hy.os.family}"
               target="clean" />
     </target>
 
@@ -170,11 +152,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" depends="clean-native-includes" >
         <delete file="${hy.jdk}/jre/lib/boot/archive.jar" />
         <delete file="${hy.jdk}/jre/lib/boot/archive-src.jar" />
+        <delete dir="${tests.hdk.dir}" failonerror="false" />
         <delete failonerror="false">
             <fileset refid="classes" />
         </delete>
@@ -192,11 +175,11 @@
     <target name="compile-java">
         <echo message="Compiling ARCHIVE classes" />
 
-        <mkdir dir="${hy.build}" />
+        <mkdir dir="../../build/classes" />
 
         <javac sourcepath=""
-               srcdir="${hy.archive.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}" 
@@ -214,9 +197,9 @@
     </target>
 
     <target name="copy-resources">
-        <mkdir dir="${hy.build}" />
-        <copy todir="${hy.build}" includeemptydirs="false">
-            <fileset dir="${hy.archive.src.main.java}">
+        <mkdir dir="../../build/classes" />
+        <copy todir="../../build/classes" includeemptydirs="false">
+            <fileset dir="src/main/java">
                 <exclude name="**/*.java" />
             </fileset>
         </copy>
@@ -224,7 +207,7 @@
 
     <target name="build-jar" depends="svn-info">
         <jar destfile="${hy.jdk}/jre/lib/boot/archive.jar"
-             manifest="${hy.archive}/META-INF/MANIFEST.MF"
+             manifest="META-INF/MANIFEST.MF"
              compress="${hy.jar.compress}">
             <fileset refid="classes" />
             <manifest>
@@ -235,7 +218,7 @@
         </jar>
 
         <jar destfile="${hy.jdk}/jre/lib/boot/archive-src.jar">
-            <fileset dir="${hy.archive.src.main.java}" />
+            <fileset dir="src/main/java" />
             <manifest>
                 <attribute name="Implementation-Version" value="${svn.info}"/> 
             </manifest>
@@ -244,162 +227,64 @@
         </jar>
     </target>
 
-    <target name="compile-tests" depends="copy-test-resources">
-        <mkdir dir="${hy.archive.bin.internal}" />
-        <mkdir dir="${hy.archive.bin.test}" />
-
-        <echo message="Compiling internal ARCHIVE tests" />
-        <javac srcdir="${hy.archive.src.test.internal}"
-               destdir="${hy.archive.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="${hy.hdk}/build/test/support.jar" />
-        </javac>
-
-        <echo message="Compiling ARCHIVE tests" />
-        <javac srcdir="${hy.archive.src.test.java}"
-               destdir="${hy.archive.bin.test}"
-               sourcepath=""
-               compiler="${hy.javac.compiler}"
-               memoryMaximumSize="${hy.javac.maxmem}"
-               source="${hy.javac.source}" 
-               target="${hy.javac.target}"
-               debug="${hy.javac.debug}">
+    <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}/archive_tests.jar">
+            <fileset dir="bin/test" />
+            <manifest>
+                <attribute name="Implementation-Version" value="${svn.info}"/> 
+            </manifest>
+            <metainf refid="hy.required.metainf-files"/>
+        </jar>
 
-            <compilerarg line="${build.compilerarg}" />
+        <jar destfile="${tests.hdk.dir}/archive_internal_tests.jar">
+            <fileset dir="bin/test-internal" />
+            <manifest>
+                <attribute name="Implementation-Version" value="${svn.info}"/> 
+            </manifest>
+            <metainf refid="hy.required.metainf-files"/>
+        </jar>
 
-            <bootclasspath>
-                <fileset dir="${hy.jdk}/jre/lib/boot">
-                    <include name="**/*.jar" />
-                </fileset>
-            </bootclasspath>
-            <classpath location="${hy.hdk}/build/test/support.jar" />
-        </javac>
-    </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>
 
-    <target name="prepare-exclude">
-       <prepare-exclude-list moduleName="archive" dir="./make"
-                             result="${archive.exclude.file}"/>
-    </target>
-
-    <target name="run-tests">
-
-        <mkdir dir="${tests.output}" />
-
-        <property name="test.jre.home" value="${hy.jdk}/jre" />
-
-        <!-- internal tests that need to run on the bootclasspath -->
-        <echo message="Running internal ARCHIVE 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.archive.bin.internal}${path.separator}../../${junit.jar}"/>         
-            
-            <classpath>
-                <pathelement path="${hy.archive.bin.test}"/>
-            </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.archive.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="${archive.exclude.file}" unless="test.case" />
-                </fileset>
-            </batchtest>
-        </junit>
-        
-        <!-- API tests -->
-        <echo message="Running ARCHIVE 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}" />
-            <!-- Used by Support_Exec.execJava() -->
-            <jvmarg value="-Dhy.test.vmargs=${hy.test.vmargs}" />
-
-            <classpath>
-                <pathelement path="${hy.archive.bin.test}"/>
-            </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.archive.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="${archive.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}">
+            <fileset dir="src/test/resources" />
+        </copy>
 
-    <target name="touch-failures-file" if="test.failures">
-        <echo file="${tests.output}/test.failures"
-            append="true">archive${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">archive${line.separator}</echo>
+    <target name="compile-tests">
+        <compile-tests description="archive internal tests"
+                       destdir="bin/test-internal">
+            <javac-elements>
+                <src>
+                    <pathelement location="src/test/java-internal" />
+                </src>
+            </javac-elements>
+        </compile-tests>
+        <compile-tests description="archive api tests">
+            <javac-elements>
+                <src>
+                    <pathelement location="src/test/java" />
+                </src>
+            </javac-elements>
+        </compile-tests>
     </target>
 
-    <target name="copy-test-resources">
-        <mkdir dir="${hy.archive.bin.test}" />
-        <copy todir="${hy.archive.bin.test}" includeemptydirs="false">
-            <fileset dir="${hy.archive.src.test.resources}">
-                <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/archive/src/test/java/org/apache/harmony/archive/tests/java/util/jar/ManifestTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/archive/src/test/java/org/apache/harmony/archive/tests/java/util/jar/ManifestTest.java?rev=798469&r1=798468&r2=798469&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/archive/src/test/java/org/apache/harmony/archive/tests/java/util/jar/ManifestTest.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/archive/src/test/java/org/apache/harmony/archive/tests/java/util/jar/ManifestTest.java Tue Jul 28 09:30:33 2009
@@ -43,6 +43,8 @@
 
     private final String MANIFEST_NAME = "manifest/hyts_MANIFEST.MF";
 
+    private static final String MANIFEST_CONTENTS = "Manifest-Version: 1.0\nBundle-Name: ClientSupport\nBundle-Description: Provides SessionService, AuthenticationService. Extends RegistryService.\nBundle-Activator: com.ibm.ive.eccomm.client.support.ClientSupportActivator\nImport-Package: com.ibm.ive.eccomm.client.services.log,\n com.ibm.ive.eccomm.client.services.registry,\n com.ibm.ive.eccomm.service.registry; specification-version=1.0.0,\n com.ibm.ive.eccomm.service.session; specification-version=1.0.0,\n com.ibm.ive.eccomm.service.framework; specification-version=1.2.0,\n org.osgi.framework; specification-version=1.0.0,\n org.osgi.service.log; specification-version=1.0.0,\n com.ibm.ive.eccomm.flash; specification-version=1.2.0,\n com.ibm.ive.eccomm.client.xml,\n com.ibm.ive.eccomm.client.http.common,\n com.ibm.ive.eccomm.client.http.client\nImport-Service: org.osgi.service.log.LogReaderService\n org.osgi.service.log.LogService,\n com.ibm.ive.eccomm.service.registry.Regis
 tryService\nExport-Package: com.ibm.ive.eccomm.client.services.authentication; specification-version=1.0.0,\n com.ibm.ive.eccomm.service.authentication; specification-version=1.0.0,\n com.ibm.ive.eccomm.common; specification-version=1.0.0,\n com.ibm.ive.eccomm.client.services.registry.store; specification-version=1.0.0\nExport-Service: com.ibm.ive.eccomm.service.authentication.AuthenticationService,\n com.ibm.ive.eccomm.service.session.SessionService\nBundle-Vendor: IBM\nBundle-Version: 1.2.0\n";
+
     private File resources;
 
     @Override
@@ -79,8 +81,8 @@
      * @tests java.util.jar.Manifest#Manifest(java.util.jar.Manifest)
      */
     public void testCopyingConstructor() throws IOException {
-        Manifest firstManifest = new Manifest(new URL(Support_Resources
-                .getURL(MANIFEST_NAME)).openStream());
+        Manifest firstManifest = new Manifest(new ByteArrayInputStream(
+                MANIFEST_CONTENTS.getBytes("ISO-8859-1")));
         Manifest secondManifest = new Manifest(firstManifest);
         assertEquals(firstManifest, secondManifest);
     }
@@ -127,8 +129,8 @@
         Manifest mCopy = new Manifest(is);
         assertEquals(m, mCopy);
 
-        Manifest manifest = new Manifest(new URL(Support_Resources
-                .getURL(MANIFEST_NAME)).openStream());
+        Manifest manifest = new Manifest(new ByteArrayInputStream(
+                MANIFEST_CONTENTS.getBytes("ISO-8859-1")));
         checkManifest(manifest);
 
         // regression test for HARMONY-5424
@@ -174,10 +176,10 @@
      * @tests java.util.jar.Manifest#equals(java.lang.Object)
      */
     public void testEquals() throws IOException {
-        Manifest firstManifest = new Manifest(new URL(Support_Resources
-                .getURL(MANIFEST_NAME)).openStream());
-        Manifest secondManifest = new Manifest(new URL(Support_Resources
-                .getURL(MANIFEST_NAME)).openStream());
+        Manifest firstManifest = new Manifest(new ByteArrayInputStream(
+                MANIFEST_CONTENTS.getBytes("ISO-8859-1")));
+        Manifest secondManifest = new Manifest(new ByteArrayInputStream(
+                MANIFEST_CONTENTS.getBytes("ISO-8859-1")));
 
         assertEquals(firstManifest, secondManifest);
     }

Modified: harmony/enhanced/classlib/branches/java6/modules/archive/src/test/java/org/apache/harmony/archive/tests/java/util/zip/ZipFileTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/archive/src/test/java/org/apache/harmony/archive/tests/java/util/zip/ZipFileTest.java?rev=798469&r1=798468&r2=798469&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/archive/src/test/java/org/apache/harmony/archive/tests/java/util/zip/ZipFileTest.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/archive/src/test/java/org/apache/harmony/archive/tests/java/util/zip/ZipFileTest.java Tue Jul 28 09:30:33 2009
@@ -182,7 +182,7 @@
                 r = in.read(buf);
                 in.close();
                 assertEquals("incorrect contents",
-                             "This is also text", new String(buf, 0, r));
+                             "This is also text", new String(buf, 0, r, "UTF-8"));
 	}
 
     public void test_getEntryLjava_lang_String_Ex() throws IOException {
@@ -212,7 +212,7 @@
 			int r;
 			is.read(rbuf, 0, r = (int) zentry.getSize());
 			assertEquals("getInputStream read incorrect data", "This is text", new String(rbuf,
-					0, r));
+					0, r, "UTF-8"));
 		} catch (java.io.IOException e) {
 			fail("IOException during getInputStream");
 		} finally {

Modified: harmony/enhanced/classlib/branches/java6/modules/archive/src/test/java/org/apache/harmony/archive/tests/java/util/zip/ZipOutputStreamTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/archive/src/test/java/org/apache/harmony/archive/tests/java/util/zip/ZipOutputStreamTest.java?rev=798469&r1=798468&r2=798469&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/archive/src/test/java/org/apache/harmony/archive/tests/java/util/zip/ZipOutputStreamTest.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/archive/src/test/java/org/apache/harmony/archive/tests/java/util/zip/ZipOutputStreamTest.java Tue Jul 28 09:30:33 2009
@@ -67,7 +67,7 @@
         ZipEntry ze = new ZipEntry("testEntry");
         ze.setTime(System.currentTimeMillis());
         zos.putNextEntry(ze);
-        zos.write("Hello World".getBytes());
+        zos.write("Hello World".getBytes("UTF-8"));
         zos.closeEntry();
         assertTrue("closeEntry failed to update required fields",
                 ze.getSize() == 11 && ze.getCompressedSize() == 13);

Modified: harmony/enhanced/classlib/branches/java6/modules/auth/build.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/auth/build.xml?rev=798469&r1=798468&r2=798469&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/auth/build.xml (original)
+++ harmony/enhanced/classlib/branches/java6/modules/auth/build.xml Tue Jul 28 09:30:33 2009
@@ -20,42 +20,12 @@
 <project name="AUTH Build" default="build" basedir=".">
     <description>Build for AUTH component</description>
 
-    <!-- import common properties -->
+    <property name="hy.module" value="auth" />
     <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.auth.src.main.java.platform"
-              value="${hy.auth.src.main.java}/../${hy.os.family}" />
-
-    <property name="hy.auth.src.test.java.platform"
-              value="${hy.auth.src.test.java}/../${hy.os.family}" />
-
-    <fileset id="classes" dir="${hy.build}">
-        <or>
-            <present targetdir="${hy.auth.src.main.java}" />
-            <present targetdir="${hy.auth.src.main.java}">
-                <mapper type="regexp"
-                        from="^(.*?)(\$$[^/\\\.]*)?\.class$$"
-                        to="\1.java"/>
-            </present>
-            <present targetdir="${hy.auth.src.main.java.platform}" />
-            <present targetdir="${hy.auth.src.main.java.platform}">
-                <mapper type="regexp"
-                        from="^(.*?)(\$$[^/\\\.]*)?\.class$$"
-                        to="\1.java"/>
-            </present>
-        </or>
-    </fileset>
-
     <property file="../../make/depends.properties" />
 
-    <property name="auth.exclude.file" location="${hy.hdk}/build/auth.exclude" />
-
     <target name="build" depends="compile-java, copy-resources, build-jar" />
 
     <target name="test" depends="-test-module">
@@ -70,16 +40,16 @@
     </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" />
     
     <!-- Build native code -->
     <target name="build-native" depends="build-native-all" />
     <target name="build-native-all" >
-        <make dir="${hy.auth.src.main.native}/auth/${hy.os.family}" />
+        <make dir="src/main/native/auth/${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.auth.src.main.native}/auth">
+            <fileset dir="src/main/native/auth">
                 <include name="*${shlib.suffix}*"/>
                 <include name="*${progdb.suffix}*" if="is.windows" />
                 <exclude name="*${manifest.suffix}"/>
@@ -87,7 +57,7 @@
         </copy>
         <!-- Copy link exports file on z/OS -->
         <copy todir="${hy.hdk}/lib" overwrite="yes">
-            <fileset dir="${hy.auth.src.main.native}/auth/${hy.os.family}">
+            <fileset dir="src/main/native/auth/${hy.os.family}">
                 <include name="*${linklib.suffix}" if="is.zos" />
             </fileset>
         </copy>
@@ -95,12 +65,13 @@
     
     <!-- Clean natives -->
     <target name="clean-native">
-    <make dir="${hy.auth.src.main.native}/auth/${hy.os.family}" target="clean" />
+    <make dir="src/main/native/auth/${hy.os.family}" target="clean" />
     </target>
 
     <target name="clean">
-        <delete file="${hy.jdk}/jre/lib/boot/${hy.auth.packaging.jarname}.jar" />
-        <delete file="${hy.jdk}/jre/lib/boot/${hy.auth.packaging.jarname}-src.jar" />
+        <delete file="${hy.jdk}/jre/lib/boot/auth.jar" />
+        <delete file="${hy.jdk}/jre/lib/boot/auth-src.jar" />
+        <delete dir="${tests.hdk.dir}" failonerror="false" />
         <delete failonerror="false">
             <fileset refid="classes" />
         </delete>
@@ -110,10 +81,10 @@
     <target name="compile-java">
         <echo message="Compiling AUTH 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}" 
@@ -121,8 +92,8 @@
                debug="${hy.javac.debug}">
 
             <src>
-                <pathelement location="${hy.auth.src.main.java}"/>
-                <pathelement location="${hy.auth.src.main.java.platform}" />
+                <pathelement location="src/main/java/common"/>
+                <pathelement location="src/main/java/${hy.os.family}" />
             </src>
 
             <bootclasspath>
@@ -134,17 +105,17 @@
     </target>
 
     <target name="copy-resources">
-        <mkdir dir="${hy.build}" />
-        <copy todir="${hy.build}" includeemptydirs="false">
-            <fileset dir="${hy.auth.src.main.java}">
+        <mkdir dir="../../build/classes" />
+        <copy todir="../../build/classes" includeemptydirs="false">
+            <fileset dir="src/main/java/common">
                 <exclude name="**/*.java" />
             </fileset>
         </copy>
     </target>
 
     <target name="build-jar" depends="svn-info">
-        <jar destfile="${hy.jdk}/jre/lib/boot/${hy.auth.packaging.jarname}.jar"
-             manifest="${hy.auth}/META-INF/MANIFEST.MF"
+        <jar destfile="${hy.jdk}/jre/lib/boot/auth.jar"
+             manifest="META-INF/MANIFEST.MF"
              compress="${hy.jar.compress}">
             <fileset refid="classes" />
             <manifest>
@@ -154,9 +125,9 @@
             <metainf refid="hy.required.metainf-files"/>
         </jar>
 
-        <jar destfile="${hy.jdk}/jre/lib/boot/${hy.auth.packaging.jarname}-src.jar">
-            <fileset dir="${hy.auth.src.main.java}" />
-            <fileset dir="${hy.auth.src.main.java.platform}" />
+        <jar destfile="${hy.jdk}/jre/lib/boot/auth-src.jar">
+            <fileset dir="src/main/java/common" />
+            <fileset dir="src/main/java/${hy.os.family}" />
             <manifest>
                 <attribute name="Implementation-Version" value="${svn.info}"/> 
             </manifest>
@@ -165,111 +136,49 @@
         </jar>
     </target>
 
-    <target name="compile-tests">
-        <echo message="Compiling AUTH tests" />
-
-        <mkdir dir="${hy.auth.bin.test}" />
-
-        <javac  destdir="${hy.auth.bin.test}"
-               compiler="${hy.javac.compiler}"
-               memoryMaximumSize="${hy.javac.maxmem}"
-               source="${hy.javac.source}" 
-               target="${hy.javac.target}"
-               debug="${hy.javac.debug}">
-
-            <src>
-                <pathelement location="${hy.auth.src.test.java}"/>
-                <pathelement location="${hy.auth.src.test.java.platform}"/>
-            </src>
-
-            <include name="javax/security/auth/**/*Test*.java" />
-            <include name="javax/security/sasl/**/*Test*.java" />
-            <include name="org/ietf/jgss/*Test.java" />
-            <include name="org/apache/harmony/auth/**/*Test.java" />
-            <include name="tests/api/javax/security/auth/x500/X500PrincipalTest.java" />
-
-            <bootclasspath>
-                <fileset dir="${hy.jdk}/jre/lib/boot">
-                    <include name="**/*.jar" />
-                </fileset>
-            </bootclasspath>
-            <classpath location="${hy.hdk}/build/test/support.jar" />
-        </javac>
-    </target>
-
-    <target name="prepare-exclude">
-       <prepare-exclude-list moduleName="auth" dir="./make"
-                             result="${auth.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}" />
-            <!-- Used by Support_Exec.execJava() -->
-            <jvmarg value="-Dhy.test.vmargs=${hy.test.vmargs}" />
-
-
-            <!-- to pick up junit.jar -->
-            <jvmarg value="-Xbootclasspath/a:${hy.auth.bin.test}${path.separator}../../${junit.jar}${path.separator}${hy.hdk}/build/test/support.jar"/>
-
-            <classpath>
-                <pathelement path="${hy.auth.src.test.resources}"/>
-                <pathelement path="${hy.auth.bin.test}"/>
-            </classpath>
-
-            <formatter type="xml" />
+    <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}/auth_tests.jar">
+            <fileset dir="bin/test" />
+            <manifest>
+                <attribute name="Implementation-Version" value="${svn.info}"/> 
+            </manifest>
+            <metainf refid="hy.required.metainf-files"/>
+        </jar>
 
-            <batchtest todir="${tests.output}" haltonfailure="no" >
+        <copy todir="${tests.resources.hdk.dir}">
+            <fileset dir="src/test/resources" />
+        </copy>
 
-                <fileset dir="${hy.auth.src.test.java.platform}">
-                    <!-- if ${test.case}     -->
-                    <include name="${converted.tc}" if="test.case" />
-                    <!-- unless ${test.case} -->
-                    <include name="**/*Test.java" unless="test.case" />
-                    <excludesfile name="${auth.exclude.file}" unless="test.case" />
-                </fileset>
-                <fileset dir="${hy.auth.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="${auth.exclude.file}" unless="test.case" />
+        <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>
 
-                    <!-- Not a test -->
-                    <exclude name="org/apache/harmony/auth/internal/SecurityTest.java"/>
-                </fileset>
-            </batchtest>
-        </junit>
-        <antcall target="touch-failures-file" />
-        <antcall target="touch-errors-file" />
+        <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">auth${line.separator}</echo>
+    <target name="compile-tests">
+        <compile-tests description="auth api tests">
+            <javac-elements>
+                <src>
+                    <pathelement location="src/test/java/common"/>
+                    <pathelement location="src/test/java/${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">auth${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/auth/src/main/native/auth/unix/authnix.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/auth/src/main/native/auth/unix/authnix.c?rev=798469&r1=798468&r2=798469&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/auth/src/main/native/auth/unix/authnix.c (original)
+++ harmony/enhanced/classlib/branches/java6/modules/auth/src/main/native/auth/unix/authnix.c Tue Jul 28 09:30:33 2009
@@ -131,6 +131,7 @@
     (*jenv)->SetObjectField (jenv, thiz, jf_groupname, (*jenv)->NewStringUTF (jenv, pg->gr_name));
 
     gcount = getgroups(0, NULL);
+    
     if( 0 != gcount ) {
 
         gid_t * gids;
@@ -138,10 +139,13 @@
         jlong * jgs_raw;
         jobjectArray jgsnames;
         int i;
+        int gcount_temp;
 
         gids = (gid_t*)hymem_allocate_memory(gcount*sizeof(gid_t));
 
-        getgroups(gcount, gids);
+        /* capture return code to fix compiler warning */
+        gcount_temp = getgroups(gcount, gids);
+        
         jgs = (*jenv)->NewLongArray (jenv, gcount);
         jgs_raw = (*jenv)->GetLongArrayElements (jenv, jgs, NULL);
         jgsnames = (*jenv)->NewObjectArray (jenv, gcount, jclassString, NULL);



Mime
View raw message