harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hinde...@apache.org
Subject svn commit: r798469 [27/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/access...
Date Tue, 28 Jul 2009 09:30:48 GMT
Modified: harmony/enhanced/classlib/branches/java6/modules/rmi/build.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/rmi/build.xml?rev=798469&r1=798468&r2=798469&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/rmi/build.xml (original)
+++ harmony/enhanced/classlib/branches/java6/modules/rmi/build.xml Tue Jul 28 09:30:33 2009
@@ -19,30 +19,12 @@
 <project name="RMI Build" default="build" basedir=".">
     <description>Build for RMI component</description>
 
-    <!-- import common properties -->
+    <property name="hy.module" value="rmi" />
     <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.rmi.src.main.java}" />
-            <present targetdir="${hy.rmi.src.main.java}">
-                <mapper type="regexp"
-                        from="^(.*?)(\$$[^/\\\.]*)?\.class$$"
-                        to="\1.java"/>
-            </present>
-        </or>
-    </fileset>
-
     <property file="../../make/depends.properties" />
 
-    <property name="rmi.exclude.file" location="${hy.hdk}/build/rmi.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/${hy.rmi.packaging.jarname}.jar" />
-        <delete file="${hy.jdk}/jre/lib/boot/${hy.rmi.packaging.jarname}-src.jar" />
+        <delete file="${hy.jdk}/jre/lib/boot/rmi.jar" />
+        <delete file="${hy.jdk}/jre/lib/boot/rmi-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 RMI classes" />
 
-        <mkdir dir="${hy.build}" />
+        <mkdir dir="../../build/classes" />
 
         <javac sourcepath=""
-               srcdir="${hy.rmi.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,17 +76,17 @@
     </target>
 
     <target name="copy-resources">
-        <mkdir dir="${hy.build}" />
-        <copy todir="${hy.build}" includeemptydirs="false">
-            <fileset dir="${hy.rmi.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.rmi.packaging.jarname}.jar"
-             manifest="${hy.rmi}/META-INF/MANIFEST.MF"
+        <jar destfile="${hy.jdk}/jre/lib/boot/rmi.jar"
+             manifest="META-INF/MANIFEST.MF"
              compress="${hy.jar.compress}">
             <fileset refid="classes" />
             <manifest>
@@ -113,8 +96,8 @@
             <metainf refid="hy.required.metainf-files"/>
         </jar>
 
-        <jar destfile="${hy.jdk}/jre/lib/boot/${hy.rmi.packaging.jarname}-src.jar">
-            <fileset dir="${hy.rmi.src.main.java}" />
+        <jar destfile="${hy.jdk}/jre/lib/boot/rmi-src.jar">
+            <fileset dir="src/main/java" />
             <manifest>
                 <attribute name="Implementation-Version" value="${svn.info}"/> 
             </manifest>
@@ -123,134 +106,51 @@
         </jar>
     </target>
 
-    <target name="compile-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}/rmi_tests.jar">
+            <fileset dir="bin/test/api" />
+            <manifest>
+                <attribute name="Implementation-Version" value="${svn.info}"/> 
+            </manifest>
+            <metainf refid="hy.required.metainf-files"/>
+        </jar>
 
-        <compile-tests description="api tests" destdir="${hy.rmi.bin.test}/api">
+        <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 todir="${tests.resources.hdk.dir}">
+            <fileset dir="src/test/resources" />
+        </copy>
+        <copy file="make/all.policy" todir="${tests.resources.hdk.dir}" />
+
+        <copy file="../../${junit.jar}" todir="${hy.hdk}/build/test" />
+    </target>
+
+    <target name="compile-tests">
+        <compile-tests description="rmi api tests" destdir="bin/test/api">
             <javac-elements>
                 <src>
-                    <pathelement location="${hy.rmi.src.test}/api/java"/>
+                    <pathelement location="src/test/api/java"/>
                 </src>
 
                 <include name="**/*Test.java"/>
             </javac-elements>
         </compile-tests>
-
     </target>
 
-    <target name="prepare-exclude">
-       <prepare-exclude-list moduleName="rmi" dir="./make"
-                             result="${rmi.exclude.file}"/>
+    <target name="run-tests" depends="test-jar">
+        <ant dir="${tests.hdk.dir}" target="test-module" />
     </target>
 
-    <target name="run-tests" depends="run-tests-api" />
-
-    <target name="run-tests-api">
-
-        <run-tests description="api tests">
-            <junit-elements>
-
-                <classpath>
-                    <pathelement path="${hy.rmi.bin.test}/api"/>
-                    <pathelement path="../../build/tests"/>
-                </classpath>
-
-                <batchtest todir="${tests.output}" haltonfailure="no" >
-                    <fileset dir="${hy.rmi.src.test}/api/java">
-                        <!-- if ${test.case}     -->
-                        <include name="${converted.tc}" if="test.case" />
-                        <!-- unless ${test.case} -->
-                        <include name="**/*Test.java" unless="test.case" />
-                        <excludesfile name="${rmi.exclude.file}" unless="test.case"  />
-                    </fileset>
-                </batchtest>
-
-            </junit-elements>
-        </run-tests>
-
-        <antcall target="touch-failures-file" />
-        <antcall target="touch-errors-file" />
-    </target>
-
-    <target name="touch-failures-file" if="test.failures">
-        <echo file="${tests.output}/test.failures"
-            append="true">rmi${line.separator}</echo>
-    </target>
-
-    <target name="touch-errors-file" if="test.errors">
-        <echo file="${tests.output}/test.errors"
-            append="true">rmi${line.separator}</echo>
-    </target>
-
-    <macrodef name="compile-tests">
-        <attribute name="description" default="" />
-        <attribute name="destdir"  />
-        <element name="javac-elements" />
-        <sequential>
-            <echo message="Compiling RMI @{description}" />
-
-            <mkdir dir="@{destdir}" />
-
-            <javac destdir="@{destdir}"
-               compiler="${hy.javac.compiler}"
-               memoryMaximumSize="${hy.javac.maxmem}"
-               source="${hy.javac.source}" 
-               target="${hy.javac.target}"
-               debug="${hy.javac.debug}">
-
-                <javac-elements />
-
-                <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>
-        </sequential>
-    </macrodef>
-
-
-    <macrodef name="run-tests">
-        <attribute name="description" default="" />
-        <element name="junit-elements" />
-        <sequential>
-            <echo message="Running RMI @{description}" />
-
-            <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="-Djava.security.policy=make/all.policy"/>
-
-                <junit-elements />
-
-                <classpath>
-                    <pathelement path="${hy.rmi.src.test.resources}"/>
-                    <pathelement location="${hy.hdk}/build/test/support.jar"/>
-                </classpath>
-
-                <formatter type="xml" />
-            </junit>
-        </sequential>
-    </macrodef>
-
 </project>

Modified: harmony/enhanced/classlib/branches/java6/modules/security-kernel/build.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/security-kernel/build.xml?rev=798469&r1=798468&r2=798469&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/security-kernel/build.xml (original)
+++ harmony/enhanced/classlib/branches/java6/modules/security-kernel/build.xml Tue Jul 28 09:30:33 2009
@@ -21,26 +21,13 @@
 
     <description>Build for security kernel stub jar</description>
 
-    <!-- import common properties -->
+    <property name="hy.module" value="security-kernel" />
     <property name="hy.hdk" location="${basedir}/../../deploy" />
     <import file="${hy.hdk}/build/ant/properties.xml" />
 
-    <property name="hy.jdk" location="../../deploy/jdk" />
-    <property name="hy.build" location="../../build/classes" />
     <property name="stub.jar"
               location="${hy.jdk}/jre/lib/boot/security-kernel-stubs.jar" />
 
-    <fileset id="classes" dir="${hy.build}">
-        <or>
-            <present targetdir="src/main/java" />
-            <present targetdir="src/main/java">
-                <mapper type="regexp"
-                        from="^(.*?)(\$$[^/\\\.]*)?\.class$$"
-                        to="\1.java"/>
-            </present>
-        </or>
-    </fileset>
-
     <target name="warn">
         <fail>...
 
@@ -68,8 +55,4 @@
         </delete>
     </target>
 
-    <target name="-test-module">
-        <!-- just to match "API" for other modules. -->
-    </target>
-
 </project>

Modified: harmony/enhanced/classlib/branches/java6/modules/security/build.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/security/build.xml?rev=798469&r1=798468&r2=798469&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/security/build.xml (original)
+++ harmony/enhanced/classlib/branches/java6/modules/security/build.xml Tue Jul 28 09:30:33 2009
@@ -19,49 +19,12 @@
 <project name="SECURITY Build" default="build" basedir=".">
     <description>Build for SECURITY component</description>
 
-    <!-- import common properties -->
+    <property name="hy.module" value="security" />
     <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.security.src.main.java.platform"
-              value="${hy.security.src.main.java}/../${hy.os.family}" />
-
-    <property name="hy.security.src.test.java.platform"
-              value="${hy.security.src.test.java}/../${hy.os.family}" />
-
-    <fileset id="classes" dir="${hy.build}">
-        <or>
-            <present targetdir="${hy.security.src.main.java}" />
-            <present targetdir="${hy.security.src.main.java}">
-                <mapper type="regexp"
-                        from="^(.*?)(\$$[^/\\\.]*)?\.class$$"
-                        to="\1.java"/>
-            </present>
-            <present targetdir="${hy.security.src.main.java.platform}" />
-            <present targetdir="${hy.security.src.main.java.platform}">
-                <mapper type="regexp"
-                        from="^(.*?)(\$$[^/\\\.]*)?\.class$$"
-                        to="\1.java"/>
-            </present>
-        </or>
-    </fileset>
-
-    <fileset id="tests.api" dir="${hy.security.bin.test}/api"/>
-    <fileset id="tests.api.in" dir="${hy.security.bin.test}/api.injected"/>
-    <fileset id="tests.impl" dir="${hy.security.bin.test}/impl"/>
-    <fileset id="tests.impl.in" dir="${hy.security.bin.test}/impl.injected"/>
-    <fileset id="tests.support" dir="${hy.security.bin.test}/support"/>
-    <fileset id="resources" dir="${hy.security}/src/test/resources"/>
-
     <property file="../../make/depends.properties" />
 
-    <property name="security.exclude.file" location="${hy.hdk}/build/security.exclude" />
-
     <target name="build" depends="compile-java, copy-resources, build-jar" />
 
     <target name="test" depends="-test-module">
@@ -76,25 +39,24 @@
     </target>
 
     <!-- internal target for local and global test run sequence -->
-    <target name="-test-module" depends="build, compile-tests, test-jar, copy-tests-resources, prepare-exclude, run-tests" />
+    <target name="-test-module" depends="build, run-tests" />
 
     <!-- Build native code -->
-    <available file="${hy.security.src.main.native}/security/${hy.os.family}" property="native.present" />
-
+    <available file="src/main/native/security/${hy.os.family}" property="native.present" />
 
     <target name="build-native" depends="build-native-all" />
     <target name="build-native-all" if="native.present" >
-        <make dir="${hy.security.src.main.native}/security/${hy.os.family}" />
+        <make dir="src/main/native/security/${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.security.src.main.native}/security">
+            <fileset dir="src/main/native/security">
                 <include name="*${shlib.suffix}*"/>
                 <include name="*${progdb.suffix}*" if="is.windows" />
                 <exclude name="*${manifest.suffix}"/>
             </fileset>
             <!-- Copy link exports file on z/OS -->
-            <fileset dir="${hy.security.src.main.native}/security/${hy.os.family}">
+            <fileset dir="src/main/native/security/${hy.os.family}">
                 <include name="*${linklib.suffix}*" if="is.zos" />
             </fileset>
         </copy>
@@ -102,21 +64,13 @@
     
     <!-- Clean natives -->
     <target name="clean-native" if="native.present" >
-        <make dir="${hy.security.src.main.native}/security/${hy.os.family}" target="clean" />
+        <make dir="src/main/native/security/${hy.os.family}" target="clean" />
     </target>
 
-
-    <property name="tests.hdk.dir" value="${hy.hdk}/build/test" />
-    <property name="tests.resources.dir" value="${tests.hdk.dir}/resources/${hy.security.packaging.jarname}" />
     <target name="clean">
-        <delete file="${hy.jdk}/jre/lib/boot/${hy.security.packaging.jarname}.jar" />
-        <delete file="${hy.jdk}/jre/lib/boot/${hy.security.packaging.jarname}-src.jar" />
-        <delete file="${tests.hdk.dir}/${hy.security.packaging.jarname}_tests_api.jar" />
-        <delete file="${tests.hdk.dir}/${hy.security.packaging.jarname}_tests_api_in.jar" />
-        <delete file="${tests.hdk.dir}/${hy.security.packaging.jarname}_tests_impl.jar" />
-        <delete file="${tests.hdk.dir}/${hy.security.packaging.jarname}_tests_impl_in.jar" />
-        <delete file="${tests.hdk.dir}/${hy.security.packaging.jarname}_tests_support.jar" />
-        <delete dir="${tests.resources.dir}" />
+        <delete file="${hy.jdk}/jre/lib/boot/security.jar" />
+        <delete file="${hy.jdk}/jre/lib/boot/security-src.jar" />
+        <delete dir="${tests.hdk.dir}" failonerror="false" />
         <delete failonerror="false">
             <fileset refid="classes" />
         </delete>
@@ -126,10 +80,10 @@
     <target name="compile-java">
         <echo message="Compiling SECURITY 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}" 
@@ -139,8 +93,8 @@
             <compilerarg line="${build.compilerarg}" />
 
             <src>
-                <pathelement location="${hy.security.src.main.java}"/>
-                <pathelement location="${hy.security.src.main.java.platform}" />
+                <pathelement location="src/main/java/common"/>
+                <pathelement location="src/main/java/${hy.os.family}" />
             </src>
 
             <bootclasspath>
@@ -152,17 +106,17 @@
     </target>
 
     <target name="copy-resources">
-        <mkdir dir="${hy.build}" />
-        <copy todir="${hy.build}" includeemptydirs="false">
-            <fileset dir="${hy.security.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.security.packaging.jarname}.jar"
-             manifest="${hy.security}/META-INF/MANIFEST.MF"
+        <jar destfile="${hy.jdk}/jre/lib/boot/security.jar"
+             manifest="META-INF/MANIFEST.MF"
              compress="${hy.jar.compress}">
             <fileset refid="classes" />
             <manifest>
@@ -172,9 +126,9 @@
             <metainf refid="hy.required.metainf-files"/>
         </jar>
 
-        <jar destfile="${hy.jdk}/jre/lib/boot/${hy.security.packaging.jarname}-src.jar">
-            <fileset dir="${hy.security.src.main.java}" />
-            <fileset dir="${hy.security.src.main.java.platform}" />
+        <jar destfile="${hy.jdk}/jre/lib/boot/security-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>
@@ -183,273 +137,123 @@
         </jar>
     </target>
 
-    <target name="test-jar" depends="svn-info">
+    <target name="test-jar" depends="svn-info, compile-tests">
 	<mkdir dir="${tests.hdk.dir}"/>
-        <jar destfile="${tests.hdk.dir}/${hy.security.packaging.jarname}_tests_api.jar">
-            <fileset refid="tests.api" />
+
+        <copy file="make/run-test.xml" tofile="${tests.hdk.dir}/build.xml" />
+
+        <jar destfile="${tests.hdk.dir}/security_tests_api.jar">
+            <fileset dir="bin/test/api" />
             <manifest>
                 <attribute name="Implementation-Version" value="${svn.info}"/> 
             </manifest>
+            <metainf refid="hy.required.metainf-files"/>
         </jar>
-        <jar destfile="${tests.hdk.dir}/${hy.security.packaging.jarname}_tests_api_in.jar">
-            <fileset refid="tests.api.in" />
+        <jar destfile="${tests.hdk.dir}/security_tests_api_in.jar">
+            <fileset dir="bin/test/api.injected" />
             <manifest>
                 <attribute name="Implementation-Version" value="${svn.info}"/> 
             </manifest>
+            <metainf refid="hy.required.metainf-files"/>
         </jar>
-        <jar destfile="${tests.hdk.dir}/${hy.security.packaging.jarname}_tests_impl.jar">
-            <fileset refid="tests.impl" />
+        <jar destfile="${tests.hdk.dir}/security_tests_impl.jar">
+            <fileset dir="bin/test/impl" />
             <manifest>
                 <attribute name="Implementation-Version" value="${svn.info}"/> 
             </manifest>
+            <metainf refid="hy.required.metainf-files"/>
         </jar>
-        <jar destfile="${tests.hdk.dir}/${hy.security.packaging.jarname}_tests_impl_in.jar">
-            <fileset refid="tests.impl.in" />
+        <jar destfile="${tests.hdk.dir}/security_tests_impl_in.jar">
+            <fileset dir="bin/test/impl.injected" />
             <manifest>
                 <attribute name="Implementation-Version" value="${svn.info}"/> 
             </manifest>
+            <metainf refid="hy.required.metainf-files"/>
         </jar>
-        <jar destfile="${tests.hdk.dir}/${hy.security.packaging.jarname}_tests_support.jar">
-            <fileset refid="tests.support" />
+        <jar destfile="${tests.hdk.dir}/security_tests_support.jar">
+            <fileset dir="bin/test/support" />
             <manifest>
                 <attribute name="Implementation-Version" value="${svn.info}"/> 
             </manifest>
+            <metainf refid="hy.required.metainf-files"/>
         </jar>
-    </target>
 
-    <target name="copy-tests-resources">
-        <mkdir dir="${tests.resources.dir}" />
-        <copy todir="${tests.resources.dir}" includeemptydirs="false">
-            <fileset refid="resources" />
+        <copy todir="${tests.resources.hdk.dir}">
+            <fileset dir="src/test/resources" />
         </copy>
+
+        <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="compile-tests">
 
-        <compile-tests description="test support files" destdir="${hy.security.bin.test}/support">
+        <compile-tests description="security test support files"
+                       destdir="bin/test/support">
             <javac-elements>
                 <src>
-                    <pathelement location="${hy.security.src.test}/support/common/java"/>
+                    <pathelement location="src/test/support/common/java"/>
                 </src>
                 <include name="**/*.java" />
             </javac-elements>
         </compile-tests>
 
-
-        <compile-tests description="api tests" destdir="${hy.security.bin.test}/api">
+        <compile-tests description="security api tests" destdir="bin/test/api">
             <javac-elements>
                 <src>
-                    <pathelement location="${hy.security.src.test}/api/java"/>
+                    <pathelement location="src/test/api/java"/>
                 </src>
 
                 <include name="**/*Test.java" />
+                <classpath location="bin/test/support" />
             </javac-elements>
         </compile-tests>
 
-        <compile-tests description="api injected tests" destdir="${hy.security.bin.test}/api.injected">
+        <compile-tests description="security api injected tests"
+                       destdir="bin/test/api.injected">
             <javac-elements>
-                <src path="${hy.security.src.test}/api/java.injected"/>
+                <src path="src/test/api/java.injected"/>
                 <include name="**/*Test.java" />
+                <classpath location="bin/test/support" />
             </javac-elements>
         </compile-tests>
 
-        <compile-tests description="impl injected tests" destdir="${hy.security.bin.test}/impl.injected">
+        <compile-tests description="security impl injected tests"
+                       destdir="bin/test/impl.injected">
             <javac-elements>
                 <src>
-                    <pathelement location="${hy.security.src.test}/impl/java.injected"/>
+                    <pathelement location="src/test/impl/java.injected"/>
                 </src>
 
                 <include name="**/*Test.java" />
+                <classpath location="bin/test/support" />
             </javac-elements>
         </compile-tests>
 
-        <compile-tests description="impl tests" destdir="${hy.security.bin.test}/impl">
+        <compile-tests description="security impl tests"
+                       destdir="bin/test/impl">
             <javac-elements>
                 <src>
-                    <pathelement location="${hy.security.src.test}/impl/java"/>
+                    <pathelement location="src/test/impl/java"/>
                 </src>
 
                 <include name="**/*Test.java" />
+                <classpath location="bin/test/support" />
             </javac-elements>
         </compile-tests>
     </target>
 
-
-    <target name="prepare-exclude">
-       <prepare-exclude-list moduleName="security" dir="./make"
-                             result="${security.exclude.file}"/>
+    <target name="run-tests" depends="test-jar">
+        <ant dir="${tests.hdk.dir}" target="test-module" />
     </target>
 
-    <target name="run-tests" depends="run-tests-api, run-tests-impl" />
-
-    <target name="run-tests-api">
-
-        <run-tests description="api tests">
-            <junit-elements>
-                <classpath>
-                    <pathelement path="${tests.hdk.dir}/${hy.security.packaging.jarname}_tests_api.jar"/>
-                    <pathelement path="${tests.hdk.dir}/${hy.security.packaging.jarname}_tests_support.jar"/>
-                    <pathelement path="${tests.resources.dir}"/>
-                    <pathelement path="${hy.hdk}/build/test/support.jar" />
-                </classpath>
-
-                <batchtest todir="${tests.output}" haltonfailure="no" >
-                    <fileset dir="${hy.security.src.test}/api/java">
-                        <!-- if ${test.case}     -->
-                        <include name="${converted.tc}" if="test.case" />
-                        <!-- unless ${test.case} -->
-                        <include name="**/*Test.java" unless="test.case" />
-                        <excludesfile name="${security.exclude.file}" unless="test.case" />
-                    </fileset>
-                </batchtest>
-
-            </junit-elements>
-        </run-tests>
-
-        <run-tests description="api.injected tests">
-            <junit-elements>
-                <!-- to pick up junit.jar               -->
-                <jvmarg value="-Xbootclasspath/a:${tests.hdk.dir}/${hy.security.packaging.jarname}_tests_api_in.jar${path.separator}../../${junit.jar}${path.separator}../../build/tests${path.separator}${hy.hdk}/build/test/support.jar${path.separator}${tests.hdk.dir}/${hy.security.packaging.jarname}_tests_support.jar"/>
-
-                <batchtest todir="${tests.output}" haltonfailure="no" >
-                    <fileset dir="${hy.security.src.test}/api/java.injected">
-                        <!-- if ${test.case}     -->
-                        <include name="${converted.tc}" if="test.case" />
-                        <!-- unless ${test.case} -->
-                        <include name="**/*Test.java" unless="test.case" />
-                        <excludesfile name="${security.exclude.file}" unless="test.case" />
-                    </fileset>
-                </batchtest>
-
-            </junit-elements>
-        </run-tests>
-
-        <antcall target="touch-failures-file" />
-        <antcall target="touch-errors-file" />
-    </target>
-
-    <target name="run-tests-impl" unless="test.noimpl">
-        <run-tests description="impl tests">
-            <junit-elements>
-                <classpath>
-                    <pathelement path="${tests.hdk.dir}/${hy.security.packaging.jarname}_tests_impl.jar"/>
-                    <pathelement path="${tests.hdk.dir}/${hy.security.packaging.jarname}_tests_support.jar"/>
-                    <pathelement path="${hy.hdk}/build/test/support.jar" />
-                </classpath>
-                
-                <batchtest todir="${tests.output}" haltonfailure="no" >
-                    <fileset dir="${hy.security.src.test}/impl/java">
-                        <!-- if ${test.case}     -->
-                        <include name="${converted.tc}" if="test.case" />
-                        <!-- unless ${test.case} -->
-                        <include name="**/*Test.java" unless="test.case" />
-                        <excludesfile name="${security.exclude.file}" unless="test.case" />
-                    </fileset>
-                </batchtest>
-
-            </junit-elements>
-        </run-tests>
-
-        <run-tests description="impl injected tests">
-            <junit-elements>
-                <!-- to pick up junit.jar               -->
-                <jvmarg value="-Xbootclasspath/a:${tests.hdk.dir}/${hy.security.packaging.jarname}_tests_impl_in.jar${path.separator}../../${junit.jar}${path.separator}${hy.hdk}/build/test/support.jar${path.separator}${tests.hdk.dir}/${hy.security.packaging.jarname}_tests_support.jar"/>
-
-                <batchtest todir="${tests.output}" haltonfailure="no" >
-                    <fileset dir="${hy.security.src.test}/impl/java.injected">
-                        <!-- if ${test.case}     -->
-                        <include name="${converted.tc}" if="test.case" />
-                        <!-- unless ${test.case} -->
-                        <include name="**/*Test.java" unless="test.case" />
-                        <excludesfile name="${security.exclude.file}" unless="test.case" />
-                    </fileset>
-                </batchtest>
-
-            </junit-elements>
-        </run-tests>
-
-        <antcall target="touch-failures-file" />
-        <antcall target="touch-errors-file" />
-    </target>
-
-    <target name="touch-failures-file" if="test.failures">
-        <echo file="${tests.output}/test.failures"
-            append="true">security${line.separator}</echo>
-    </target>
-
-    <target name="touch-errors-file" if="test.errors">
-        <echo file="${tests.output}/test.errors"
-            append="true">security${line.separator}</echo>
-    </target>
-
-    <macrodef name="compile-tests">
-        <attribute name="description" default="" />
-        <attribute name="destdir"  />
-        <element name="javac-elements" />
-        <sequential>
-            <echo message="Compiling SECURITY @{description}" />
-
-            <mkdir dir="@{destdir}" />
-
-            <javac destdir="@{destdir}"
-               compiler="${hy.javac.compiler}"
-               memoryMaximumSize="${hy.javac.maxmem}"
-               source="${hy.javac.source}" 
-               target="${hy.javac.target}"
-               debug="${hy.javac.debug}">
-
-                <javac-elements />
-
-                <compilerarg line="${build.compilerarg}" />
-
-                <bootclasspath>
-                    <fileset dir="${hy.jdk}/jre/lib/boot">
-                        <include name="**/*.jar" />
-                    </fileset>
-                </bootclasspath>
-                <classpath location="${hy.security.bin.test}/support" />
-                <classpath location="${hy.hdk}/build/test/support.jar" />
-            </javac>
-        </sequential>
-    </macrodef>
-
-    <macrodef name="run-tests">
-        <attribute name="description" default="" />
-        <element name="junit-elements" />
-        <sequential>
-            <echo message="Running SECURITY @{description}" />
-
-            <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}" />
-
-                <junit-elements />
-
-                <classpath>
-                    <pathelement path="${tests.resources.dir}"/>
-                </classpath>
-
-                <formatter type="xml" />
-            </junit>
-        </sequential>
-    </macrodef>
-
 </project>

Modified: harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/org/apache/harmony/security/asn1/ASN1GeneralizedTime.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/org/apache/harmony/security/asn1/ASN1GeneralizedTime.java?rev=798469&r1=798468&r2=798469&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/org/apache/harmony/security/asn1/ASN1GeneralizedTime.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/org/apache/harmony/security/asn1/ASN1GeneralizedTime.java Tue Jul 28 09:30:33 2009
@@ -23,6 +23,7 @@
 package org.apache.harmony.security.asn1;
 
 import java.io.IOException;
+import java.io.UnsupportedEncodingException;
 import java.text.SimpleDateFormat;
 import java.util.TimeZone;
 
@@ -111,7 +112,13 @@
         if (temp.charAt(currLength) == '.') {
             temp = temp.substring(0, currLength);
         }
-        out.content = (temp + "Z").getBytes(); //$NON-NLS-1$
+
+        try {
+            out.content = (temp + "Z").getBytes("UTF-8"); //$NON-NLS-1$ //$NON-NLS-2$
+        } catch (UnsupportedEncodingException e) {
+            throw new RuntimeException(e.getMessage());
+        }
+        
         out.length = ((byte[]) out.content).length;
     }
 }
\ No newline at end of file

Modified: harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/org/apache/harmony/security/x509/DNParser.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/org/apache/harmony/security/x509/DNParser.java?rev=798469&r1=798468&r2=798469&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/org/apache/harmony/security/x509/DNParser.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/org/apache/harmony/security/x509/DNParser.java Tue Jul 28 09:30:33 2009
@@ -293,6 +293,9 @@
         case '#':
         case ';':
         case ' ':
+        case '*':
+        case '%':
+        case '_':
             //FIXME: escaping is allowed only for leading or trailing space char 
             return chars[pos];
         default:

Propchange: harmony/enhanced/classlib/branches/java6/modules/security/src/main/native/security/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Tue Jul 28 09:30:33 2009
@@ -3,3 +3,4 @@
 hysecurity.pdb
 *.manifest
 libhysecurity.so
+libhysecurity.dylib

Modified: harmony/enhanced/classlib/branches/java6/modules/security/src/test/api/java/org/apache/harmony/security/tests/java/security/DigestInputStream2Test.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/security/src/test/api/java/org/apache/harmony/security/tests/java/security/DigestInputStream2Test.java?rev=798469&r1=798468&r2=798469&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/security/src/test/api/java/org/apache/harmony/security/tests/java/security/DigestInputStream2Test.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/security/src/test/api/java/org/apache/harmony/security/tests/java/security/DigestInputStream2Test.java Tue Jul 28 09:30:33 2009
@@ -19,6 +19,7 @@
 
 import java.io.ByteArrayInputStream;
 import java.io.IOException;
+import java.io.UnsupportedEncodingException;
 import java.security.DigestInputStream;
 import java.security.MessageDigest;
 import java.security.NoSuchAlgorithmException;
@@ -149,13 +150,14 @@
 	/**
 	 * Sets up the fixture, for example, open a network connection. This method
 	 * is called before a test is executed.
+	 * @throws UnsupportedEncodingException 
 	 */
-	protected void setUp() {
+	protected void setUp() throws UnsupportedEncodingException {
 		// create a ByteArrayInputStream to perform digesting on
 		inStream = new ByteArrayInputStream(
-				"This is a test string for digesting".getBytes());
+				"This is a test string for digesting".getBytes("UTF-8"));
 		inStream1 = new ByteArrayInputStream(
-				"This is a test string for digesting".getBytes());
+				"This is a test string for digesting".getBytes("UTF-8"));
 		try {
 			digest = MessageDigest.getInstance("SHA-1");
 		} catch (NoSuchAlgorithmException e) {

Modified: harmony/enhanced/classlib/branches/java6/modules/security/src/test/api/java/org/apache/harmony/security/tests/java/security/MessageDigest2Test.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/security/src/test/api/java/org/apache/harmony/security/tests/java/security/MessageDigest2Test.java?rev=798469&r1=798468&r2=798469&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/security/src/test/api/java/org/apache/harmony/security/tests/java/security/MessageDigest2Test.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/security/src/test/api/java/org/apache/harmony/security/tests/java/security/MessageDigest2Test.java Tue Jul 28 09:30:33 2009
@@ -20,6 +20,7 @@
 import java.io.ByteArrayOutputStream;
 import java.io.DataOutputStream;
 import java.io.IOException;
+import java.io.UnsupportedEncodingException;
 import java.security.DigestException;
 import java.security.MessageDigest;
 import java.security.NoSuchAlgorithmException;
@@ -207,9 +208,10 @@
 	}
 
 	/**
+	 * @throws UnsupportedEncodingException 
 	 * @tests java.security.MessageDigest#digest()
 	 */
-	public void test_digest() {
+	public void test_digest() throws UnsupportedEncodingException {
 		MessageDigest sha = null;
 		try {
 			sha = MessageDigest.getInstance("SHA");
@@ -217,7 +219,7 @@
 		} catch (NoSuchAlgorithmException e) {
 			fail("getInstance did not find algorithm");
 		}
-		sha.update(MESSAGE.getBytes());
+		sha.update(MESSAGE.getBytes("UTF-8"));
 		byte[] digest = sha.digest();
 		assertTrue("bug in SHA", MessageDigest.isEqual(digest, MESSAGE_DIGEST));
 

Modified: harmony/enhanced/classlib/branches/java6/modules/security/src/test/impl/java/org/apache/harmony/security/tests/asn1/der/DerGeneralizedTimeEDTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/security/src/test/impl/java/org/apache/harmony/security/tests/asn1/der/DerGeneralizedTimeEDTest.java?rev=798469&r1=798468&r2=798469&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/security/src/test/impl/java/org/apache/harmony/security/tests/asn1/der/DerGeneralizedTimeEDTest.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/security/src/test/impl/java/org/apache/harmony/security/tests/asn1/der/DerGeneralizedTimeEDTest.java Tue Jul 28 09:30:33 2009
@@ -54,28 +54,28 @@
         Date myDate = getGmtDate(1101980374187L);
         byte[] encoded =
             new DerOutputStream(gTime, myDate).encoded;
-        String rep = new String(encoded, 2, encoded[1] & 0xff);
+        String rep = new String(encoded, 2, encoded[1] & 0xff, "UTF-8");
         assertEquals("full", "20041202093934.187Z", rep);
 
         // 2 digit fractional seconds (last 0 must be trimmed out)
         myDate = getGmtDate(1101980374180L);
         encoded =
             new DerOutputStream(gTime, myDate).encoded;
-        rep = new String(encoded, 2, encoded[1] & 0xff);
+        rep = new String(encoded, 2, encoded[1] & 0xff, "UTF-8");
         assertEquals("2 fraction", "20041202093934.18Z", rep);
 
         // 1 digit fractional seconds (last 2 0s must be trimmed out)
         myDate = getGmtDate(1101980374100L);
         encoded =
             new DerOutputStream(gTime, myDate).encoded;
-        rep = new String(encoded, 2, encoded[1] & 0xff);
+        rep = new String(encoded, 2, encoded[1] & 0xff, "UTF-8");
         assertEquals("1 fraction", "20041202093934.1Z", rep);
 
         // no fractional seconds (last 3 0s and "." must be trimmed out)
         myDate = getGmtDate(1101980374000L);
         encoded =
             new DerOutputStream(gTime, myDate).encoded;
-        rep = new String(encoded, 2, encoded[1] & 0xff);
+        rep = new String(encoded, 2, encoded[1] & 0xff, "UTF-8");
         assertEquals("no fraction", "20041202093934Z", rep);
 
         // midnight
@@ -85,7 +85,7 @@
         myDate = sdf.parse("06.06.2004 00:00");
         encoded =
             new DerOutputStream(gTime, myDate).encoded;
-        rep = new String(encoded, 2, encoded[1] & 0xff);
+        rep = new String(encoded, 2, encoded[1] & 0xff, "UTF-8");
         assertEquals("midnight", "20040606000000Z", rep);
     }
 

Modified: harmony/enhanced/classlib/branches/java6/modules/security/src/test/impl/java/org/apache/harmony/security/tests/asn1/der/DerUTCTimeEDTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/security/src/test/impl/java/org/apache/harmony/security/tests/asn1/der/DerUTCTimeEDTest.java?rev=798469&r1=798468&r2=798469&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/security/src/test/impl/java/org/apache/harmony/security/tests/asn1/der/DerUTCTimeEDTest.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/security/src/test/impl/java/org/apache/harmony/security/tests/asn1/der/DerUTCTimeEDTest.java Tue Jul 28 09:30:33 2009
@@ -56,7 +56,7 @@
         Date myDate = getGmtDate(1101980374187L);
         byte[] encoded =
             new DerOutputStream(uTime, myDate).encoded;
-        String rep = new String(encoded, 2, encoded[1] & 0xff);
+        String rep = new String(encoded, 2, encoded[1] & 0xff, "UTF-8");
         assertEquals("no fraction", "041202093934Z", rep);
 
         // midnight
@@ -66,7 +66,7 @@
         myDate = sdf.parse("06.06.2004 00:00");
         encoded =
             new DerOutputStream(uTime, myDate).encoded;
-        rep = new String(encoded, 2, encoded[1] & 0xff);
+        rep = new String(encoded, 2, encoded[1] & 0xff, "UTF-8");
         assertEquals("midnight", "040606000000Z", rep);
     }
 

Modified: harmony/enhanced/classlib/branches/java6/modules/security/src/test/impl/java/org/apache/harmony/security/tests/java/security/cert/CertificateFactory_ImplTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/security/src/test/impl/java/org/apache/harmony/security/tests/java/security/cert/CertificateFactory_ImplTest.java?rev=798469&r1=798468&r2=798469&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/security/src/test/impl/java/org/apache/harmony/security/tests/java/security/cert/CertificateFactory_ImplTest.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/security/src/test/impl/java/org/apache/harmony/security/tests/java/security/cert/CertificateFactory_ImplTest.java Tue Jul 28 09:30:33 2009
@@ -214,7 +214,7 @@
         try {
             X509EncodedKeySpec publicKeySpec =
                 new X509EncodedKeySpec(
-                        Base64.decode(b64PublicKeySpec.getBytes()));
+                        Base64.decode(b64PublicKeySpec.getBytes("UTF-8")));
             KeyFactory keyFactory =
                 KeyFactory.getInstance(publicKeyAlgorithm);
             publicKey = keyFactory.generatePublic(publicKeySpec);
@@ -260,7 +260,7 @@
 
         // Testing the CRLs generation on the base of PKCS7 SignedData object
         ByteArrayInputStream bais = new ByteArrayInputStream(
-                Base64.decode(pkcs7so.getBytes()));
+                Base64.decode(pkcs7so.getBytes("UTF-8")));
 
         Collection crls = factory.generateCRLs(bais);
         assertNotNull("Factory returned null on correct PKCS7 data", crls);
@@ -284,12 +284,12 @@
         CertificateFactory factory = CertificateFactory.getInstance("X.509");
 
         ByteArrayInputStream bais = new ByteArrayInputStream(
-                Base64.decode(pkcs7so.getBytes()));
+                Base64.decode(pkcs7so.getBytes("UTF-8")));
         try {
             factory.generateCRL(bais);
             fail("Expected exception was not thrown");
         } catch (Exception e) { }
-        bais = new ByteArrayInputStream(Base64.decode(pkcs7so.getBytes()));
+        bais = new ByteArrayInputStream(Base64.decode(pkcs7so.getBytes("UTF-8")));
         try {
             factory.generateCertificate(bais);
             fail("Expected exception was not thrown");
@@ -305,7 +305,7 @@
         
         for (int i=0; i<good.length; i++) {
             bais = new ByteArrayInputStream(
-                    (good[i][0] + x509crl + good[i][1]).getBytes());
+                    (good[i][0] + x509crl + good[i][1]).getBytes("UTF-8"));
 
             X509CRL crl = (X509CRL) factory.generateCRL(bais);
             assertNotNull("Factory returned null on correct data", crl);
@@ -318,7 +318,7 @@
 
         for (int i=0; i<bad_content.length; i++) {
             bais = new ByteArrayInputStream(
-                    (good[0][0] + bad_content[i] + good[0][1]).getBytes());
+                    (good[0][0] + bad_content[i] + good[0][1]).getBytes("UTF-8"));
             try {
                 factory.generateCRL(bais);
                 fail("Expected exception was not thrown");
@@ -329,7 +329,7 @@
 
         for (int i=0; i<bad.length; i++) {
             bais = new ByteArrayInputStream(
-                    (bad[i][0] + x509crl + bad[i][1]).getBytes());
+                    (bad[i][0] + x509crl + bad[i][1]).getBytes("UTF-8"));
             try {
                 factory.generateCRL(bais);
                 fail("Expected exception was not thrown");
@@ -399,10 +399,10 @@
         };
         // actual encodings
         byte[][] data = new byte[num_of_variants][];
-        data[pem_x509] = (good[0][0] + x509crl + good[0][1] + "\n").getBytes();
-        data[asn_x509] = Base64.decode(x509crl.getBytes());
-        data[pem_pkcs] = (good[0][0] + pkcs7so + good[0][1] + "\n").getBytes();
-        data[asn_pkcs] = Base64.decode(pkcs7so.getBytes());
+        data[pem_x509] = (good[0][0] + x509crl + good[0][1] + "\n").getBytes("UTF-8");
+        data[asn_x509] = Base64.decode(x509crl.getBytes("UTF-8"));
+        data[pem_pkcs] = (good[0][0] + pkcs7so + good[0][1] + "\n").getBytes("UTF-8");
+        data[asn_pkcs] = Base64.decode(pkcs7so.getBytes("UTF-8"));
         data[bad] = new byte[] {0, 1, 1, 1, 1, 1, 0, 1};
         data[npe_bad] = new byte[] {0, 1, 1, 1, 1, 1, 1, 0};
         data[npe_bad2] = new byte[] {48, 0, 3, 4, 5, 6, 7};
@@ -498,10 +498,10 @@
         };
         // actual encodings
         byte[][] data = new byte[num_of_variants][];
-        data[pem_x509] = (good[0][0] + x509cert + good[0][1] + "\n").getBytes();
-        data[asn_x509] = Base64.decode(x509cert.getBytes());
-        data[pem_pkcs] = (good[0][0] + pkcs7so + good[0][1] + "\n").getBytes();
-        data[asn_pkcs] = Base64.decode(pkcs7so.getBytes());
+        data[pem_x509] = (good[0][0] + x509cert + good[0][1] + "\n").getBytes("UTF-8");
+        data[asn_x509] = Base64.decode(x509cert.getBytes("UTF-8"));
+        data[pem_pkcs] = (good[0][0] + pkcs7so + good[0][1] + "\n").getBytes("UTF-8");
+        data[asn_pkcs] = Base64.decode(pkcs7so.getBytes("UTF-8"));
         data[bad] = new byte[] {0, 1, 1, 1, 1, 1, 0, 1};
         data[bad1] = new byte[] {0, 1, 1, 1, 1, 1, 1, 0};
         data[bad2] = new byte[] {48, 0, 3, 4, 5, 6, 7};
@@ -562,7 +562,7 @@
         ByteArrayInputStream bais;
         for (int i=0; i<good.length; i++) {
             bais = new ByteArrayInputStream(
-                    (good[i][0] + pkcs7so + good[i][1]).getBytes());
+                    (good[i][0] + pkcs7so + good[i][1]).getBytes("UTF-8"));
             Collection crls = factory.generateCRLs(bais);
             assertNotNull("Factory returned null on correct PKCS7 data", crls);
             assertEquals("The size of collection differs from expected",
@@ -574,7 +574,7 @@
                 }
             }
             bais = new ByteArrayInputStream(
-                    (good[i][0] + pkcs7so + good[i][1]).getBytes());
+                    (good[i][0] + pkcs7so + good[i][1]).getBytes("UTF-8"));
             Collection certs = factory.generateCertificates(bais);
             assertNotNull("Factory returned null on correct PKCS7 data", certs);
             assertEquals("The size of collection differs from expected",
@@ -589,13 +589,13 @@
 
         for (int i=0; i<bad_content.length; i++) {
             bais = new ByteArrayInputStream(
-                    (good[0][0] + bad_content[i] + good[0][1]).getBytes());
+                    (good[0][0] + bad_content[i] + good[0][1]).getBytes("UTF-8"));
             try {
                 factory.generateCertificates(bais);
                 fail("Expected exception was not thrown");
             } catch (Exception e) { }
             bais = new ByteArrayInputStream(
-                    (good[0][0] + bad_content[i] + good[0][1]).getBytes());
+                    (good[0][0] + bad_content[i] + good[0][1]).getBytes("UTF-8"));
             try {
                 factory.generateCRLs(bais);
                 fail("Expected exception was not thrown");
@@ -604,13 +604,13 @@
 
         for (int i=0; i<bad.length; i++) {
             bais = new ByteArrayInputStream(
-                    (bad[i][0] + pkcs7so + bad[i][1]).getBytes());
+                    (bad[i][0] + pkcs7so + bad[i][1]).getBytes("UTF-8"));
             try {
                 factory.generateCRLs(bais);
                 fail("Expected exception was not thrown");
             } catch (Exception e) { }
             bais = new ByteArrayInputStream(
-                    (bad[i][0] + pkcs7so + bad[i][1]).getBytes());
+                    (bad[i][0] + pkcs7so + bad[i][1]).getBytes("UTF-8"));
             try {
                 factory.generateCertificates(bais);
                 fail("Expected exception was not thrown");
@@ -628,7 +628,7 @@
         List certificates;
         for (int i=0; i<good.length; i++) {
             bais = new ByteArrayInputStream(
-                    (good[i][0] + pkiPath + good[i][1]).getBytes());
+                    (good[i][0] + pkiPath + good[i][1]).getBytes("UTF-8"));
 
             certificates = factory.generateCertPath(bais).getCertificates();
             assertEquals("The size of the list differs from expected",
@@ -642,7 +642,7 @@
             }
 
             bais = new ByteArrayInputStream(
-                    (good[i][0] + pkiPath + good[i][1]).getBytes());
+                    (good[i][0] + pkiPath + good[i][1]).getBytes("UTF-8"));
 
             certificates = 
                 factory.generateCertPath(bais, "PkiPath").getCertificates();
@@ -657,7 +657,7 @@
             }
 
             bais = new ByteArrayInputStream(
-                    (good[i][0] + pkcs7so + good[i][1]).getBytes());
+                    (good[i][0] + pkcs7so + good[i][1]).getBytes("UTF-8"));
 
             certificates = 
                 factory.generateCertPath(bais, "PKCS7").getCertificates();
@@ -674,7 +674,7 @@
 
         // testing empty PkiPath structure (ASN.1 such as 0x30, 0x00)
         bais = new ByteArrayInputStream(
-                (good[0][0] + "MAB=" + good[0][1]).getBytes()); // "MABCDEFG"
+                (good[0][0] + "MAB=" + good[0][1]).getBytes("UTF-8")); // "MABCDEFG"
         assertEquals("The size of the list differs from expected",
                 0, factory.generateCertPath(bais, "PkiPath")
                                 .getCertificates().size());
@@ -682,19 +682,19 @@
         // testing with bad PEM content
         for (int i=0; i<bad_content.length; i++) {
             bais = new ByteArrayInputStream(
-                    (good[0][0] + bad_content[i] + good[0][1]).getBytes());
+                    (good[0][0] + bad_content[i] + good[0][1]).getBytes("UTF-8"));
             try {
                 factory.generateCertPath(bais);
                 fail("Expected exception was not thrown");
             } catch (Exception e) { }
             bais = new ByteArrayInputStream(
-                    (good[0][0] + bad_content[i] + good[0][1]).getBytes());
+                    (good[0][0] + bad_content[i] + good[0][1]).getBytes("UTF-8"));
             try {
                 factory.generateCertPath(bais, "PkiPath");
                 fail("Expected exception was not thrown");
             } catch (Exception e) { }
             bais = new ByteArrayInputStream(
-                    (good[0][0] + bad_content[i] + good[0][1]).getBytes());
+                    (good[0][0] + bad_content[i] + good[0][1]).getBytes("UTF-8"));
             try {
                 factory.generateCertPath(bais, "PKCS7");
                 fail("Expected exception was not thrown");
@@ -703,19 +703,19 @@
 
         for (int i=0; i<bad.length; i++) {
             bais = new ByteArrayInputStream(
-                    (bad[i][0] + pkiPath + bad[i][1]).getBytes());
+                    (bad[i][0] + pkiPath + bad[i][1]).getBytes("UTF-8"));
             try {
                 factory.generateCertPath(bais);
                 fail("Expected exception was not thrown");
             } catch (Exception e) { }
             bais = new ByteArrayInputStream(
-                    (bad[i][0] + pkiPath + bad[i][1]).getBytes());
+                    (bad[i][0] + pkiPath + bad[i][1]).getBytes("UTF-8"));
             try {
                 factory.generateCertPath(bais, "PkiPath");
                 fail("Expected exception was not thrown");
             } catch (Exception e) { }
             bais = new ByteArrayInputStream(
-                    (bad[i][0] + pkcs7so + bad[i][1]).getBytes());
+                    (bad[i][0] + pkcs7so + bad[i][1]).getBytes("UTF-8"));
             try {
                 factory.generateCertPath(bais, "PKCS7");
                 fail("Expected exception was not thrown");
@@ -732,7 +732,7 @@
         // Testing the Certificates generation
         // on the base of PKCS7 SignedData object
         ByteArrayInputStream bais = new ByteArrayInputStream(
-                Base64.decode(pkcs7so.getBytes()));
+                Base64.decode(pkcs7so.getBytes("UTF-8")));
 
         Collection certs = factory.generateCertificates(bais);
         assertNotNull("Factory returned null on correct PKCS7 data", certs);
@@ -756,7 +756,7 @@
         // Testing the CertPath generation
         // on the base of PKCS7 SignedData object
         ByteArrayInputStream bais = new ByteArrayInputStream(
-                Base64.decode(pkcs7so.getBytes()));
+                Base64.decode(pkcs7so.getBytes("UTF-8")));
 
         Collection certPath =
             factory.generateCertPath(bais, "PKCS7").getCertificates();

Modified: harmony/enhanced/classlib/branches/java6/modules/sound/build.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/sound/build.xml?rev=798469&r1=798468&r2=798469&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/sound/build.xml (original)
+++ harmony/enhanced/classlib/branches/java6/modules/sound/build.xml Tue Jul 28 09:30:33 2009
@@ -19,29 +19,11 @@
 <project name="SOUND Build" default="build" basedir=".">
     <description>Build for SOUND component</description>
 
-    <!-- import common properties -->
+    <property name="hy.module" value="sound" />
     <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.sound.src.main.java}" />
-            <present targetdir="${hy.sound.src.main.java}">
-                <mapper type="regexp"
-                        from="^(.*?)(\$$[^/\\\.]*)?\.class$$"
-                        to="\1.java"/>
-            </present>
-        </or>
-    </fileset>
-
-    <fileset id="resources" dir="${hy.sound}/src/test/resources"/>
-
-    <property name="sound.exclude.file" location="${hy.hdk}/build/sound.exclude" />
+    <property file="../../make/depends.properties" />
 
     <target name="build" depends="compile-java, copy-resources, build-jar" />
 
@@ -57,14 +39,12 @@
     </target>
 
     <!-- internal target for local and global test run sequence -->
-    <target name="-test-module" depends="build, compile-tests, prepare-exclude, copy-tests-resources, run-tests" />
-
-    <property name="tests.hdk.dir" value="${hy.hdk}/build/test" />
-    <property name="tests.resources.dir" value="${tests.hdk.dir}/resources/${hy.sound.packaging.jarname}" />
+    <target name="-test-module" depends="build, run-tests" />
 
     <target name="clean">
-        <delete file="${hy.jdk}/jre/lib/boot/${hy.sound.packaging.jarname}.jar" />
-        <delete file="${hy.jdk}/jre/lib/boot/${hy.sound.packaging.jarname}-src.jar" />
+        <delete file="${hy.jdk}/jre/lib/boot/sound.jar" />
+        <delete file="${hy.jdk}/jre/lib/boot/sound-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 SOUND classes" />
 
-        <mkdir dir="${hy.build}" />
+        <mkdir dir="../../build/classes" />
 
         <javac sourcepath=""
-               srcdir="${hy.sound.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,17 +76,17 @@
     </target>
 
     <target name="copy-resources">
-        <mkdir dir="${hy.build}" />
-        <copy todir="${hy.build}" includeemptydirs="false">
-            <fileset dir="${hy.sound.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.sound.packaging.jarname}.jar"
-             manifest="${hy.sound}/META-INF/MANIFEST.MF"
+        <jar destfile="${hy.jdk}/jre/lib/boot/sound.jar"
+             manifest="META-INF/MANIFEST.MF"
              compress="${hy.jar.compress}">
             <fileset refid="classes" />
             <manifest>
@@ -116,8 +96,8 @@
             <metainf refid="hy.required.metainf-files"/>
         </jar>
 
-        <jar destfile="${hy.jdk}/jre/lib/boot/${hy.sound.packaging.jarname}-src.jar">
-            <fileset dir="${hy.sound.src.main.java}" />
+        <jar destfile="${hy.jdk}/jre/lib/boot/sound-src.jar">
+            <fileset dir="src/main/java" />
             <manifest>
                 <attribute name="Implementation-Version" value="${svn.info}"/> 
             </manifest>
@@ -126,95 +106,51 @@
         </jar>
     </target>
 
-    <target name="copy-tests-resources">
-        <mkdir dir="${tests.resources.dir}" />
-        <copy todir="${tests.resources.dir}" includeemptydirs="false">
-            <fileset refid="resources" />
-        </copy>
-    </target>
-
-    <target name="compile-tests">
-        <echo message="Compiling SOUND tests" />
+    <target name="test-jar" depends="svn-info,compile-tests">
+        <mkdir dir="${tests.hdk.dir}" />
 
-        <mkdir dir="${hy.sound.bin.test}" />
+        <copy file="make/run-test.xml" tofile="${tests.hdk.dir}/build.xml" />
+        
+        <jar destfile="${tests.hdk.dir}/sound_tests.jar">
+            <fileset dir="bin/test" />
+            <manifest>
+                <attribute name="Implementation-Version" value="${svn.info}"/> 
+            </manifest>
+            <metainf refid="hy.required.metainf-files"/>
+        </jar>
 
-        <javac srcdir="${hy.sound.src.test.java}"
-               destdir="${hy.sound.bin.test}"
-               sourcepath=""
-               compiler="${hy.javac.compiler}"
-               memoryMaximumSize="${hy.javac.maxmem}"
-               source="${hy.javac.source}" 
-               target="${hy.javac.target}"
-               debug="${hy.javac.debug}">
+        <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>
 
-            <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" />
-            <classpath location="${hy.hdk}/build/test/resources/sound/org/apache/harmony/sound/tests/javax/sound/sampled/soundProvider.jar" />
-        </javac>
+        <copy file="../../${junit.jar}" todir="${hy.hdk}/build/test" />
     </target>
 
-    <target name="prepare-exclude">
-       <prepare-exclude-list moduleName="sound" dir="./make"
-                             result="${sound.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.sound.bin.test}"/>
-            </classpath>
-            <classpath location="${hy.hdk}/build/test/support.jar" />
-            <classpath location="${hy.hdk}/build/test/resources/sound/org/apache/harmony/sound/tests/javax/sound/sampled/soundProvider.jar" />
-            <formatter type="xml" />
-
-            <batchtest todir="${tests.output}" haltonfailure="no" >
-
-                <fileset dir="${hy.sound.src.test.java}">
-                    <!-- if ${test.case}     -->
-                    <include name="${converted.tc}" if="test.case" />
-                    <!-- unless ${test.case} -->
-                    <include name="**/*.java" unless="test.case" />
-                    <excludesfile name="${sound.exclude.file}" unless="test.case" />
-                </fileset>
-            </batchtest>
-        </junit>
-        <antcall target="touch-failures-file" />
-        <antcall target="touch-errors-file" />
+    <target name="copy-test-resources">
+        <copy todir="${tests.resources.hdk.dir}" includeemptydirs="false">
+            <fileset dir="src/test/resources" />
+        </copy>
     </target>
 
-    <target name="touch-failures-file" if="test.failures">
-        <echo file="${tests.output}/test.failures"
-            append="true">sound${line.separator}</echo>
+    <target name="compile-tests" depends="copy-test-resources">
+        <compile-tests description="sound tests">
+            <javac-elements>
+                <classpath location="${tests.resources.hdk.dir}/org/apache/harmony/sound/tests/javax/sound/sampled/soundProvider.jar" />
+                <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">sound${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/sql/build.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/sql/build.xml?rev=798469&r1=798468&r2=798469&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/sql/build.xml (original)
+++ harmony/enhanced/classlib/branches/java6/modules/sql/build.xml Tue Jul 28 09:30:33 2009
@@ -19,27 +19,11 @@
 <project name="SQL Build" default="build" basedir=".">
     <description>Build for SQL component</description>
 
-    <!-- import common properties -->
+    <property name="hy.module" value="sql" />
     <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.sql.src.main.java}" />
-            <present targetdir="${hy.sql.src.main.java}">
-                <mapper type="regexp"
-                        from="^(.*?)(\$$[^/\\\.]*)?\.class$$"
-                        to="\1.java"/>
-            </present>
-        </or>
-    </fileset>
-
-    <property name="sql.exclude.file" location="${hy.hdk}/build/sql.exclude" />
+    <property file="../../make/depends.properties" />
 
     <target name="build" depends="compile-java, copy-resources, build-jar" />
 
@@ -55,24 +39,24 @@
     </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/sql.jar" />
         <delete file="${hy.jdk}/jre/lib/boot/sql-src.jar" />
+        <delete dir="${tests.hdk.dir}" failonerror="false" />
         <delete failonerror="false">
             <fileset refid="classes" />
         </delete>
         <delete failonerror="false" dir="bin"/>
-        <delete failonerror="false" dir="src/test/resources/TESTDB"/>
     </target>
 
     <target name="compile-java">
         <echo message="Compiling SQL classes" />
 
         <javac sourcepath=""
-               srcdir="${hy.sql.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}" 
@@ -90,9 +74,9 @@
     </target>
 
     <target name="copy-resources">
-        <mkdir dir="${hy.build}" />
-        <copy todir="${hy.build}" includeemptydirs="false">
-            <fileset dir="${hy.sql.src.main.java}">
+        <mkdir dir="../../build/classes" />
+        <copy todir="../../build/classes" includeemptydirs="false">
+            <fileset dir="src/main/java">
                 <exclude name="**/*.java" />
             </fileset>
         </copy>
@@ -100,7 +84,7 @@
 
     <target name="build-jar" depends="svn-info">
         <jar destfile="${hy.jdk}/jre/lib/boot/sql.jar"
-             manifest="${hy.sql}/META-INF/MANIFEST.MF"
+             manifest="META-INF/MANIFEST.MF"
              compress="${hy.jar.compress}">
             <fileset refid="classes" />
             <manifest>
@@ -111,7 +95,7 @@
         </jar>
 
         <jar destfile="${hy.jdk}/jre/lib/boot/sql-src.jar">
-            <fileset dir="${hy.sql.src.main.java}" />
+            <fileset dir="src/main/java" />
             <manifest>
                 <attribute name="Implementation-Version" value="${svn.info}"/> 
             </manifest>
@@ -120,91 +104,49 @@
         </jar>
     </target>
 
-    <target name="compile-tests">
-        <echo message="Compiling SQL tests" />
-
-        <mkdir dir="${hy.sql.bin.test}" />
-
-        <javac srcdir="${hy.sql.src.test.java}"
-               destdir="${hy.sql.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}" />
+    <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}/sql_tests.jar">
+            <fileset dir="bin/test" />
+            <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="sql" dir="./make"
-                             result="${sql.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.sql.bin.test}"/>
-                <pathelement path="${hy.sql.src.test.resources}"/>
-                <pathelement path="${hy.hdk}/build/test/support.jar"/>
-                <pathelement path="${hy.hdk}/build/test/derby.jar"/>
-            </classpath>
-            <classpath location="../../build/tests" />
-
-            <formatter type="xml" />
-
-            <batchtest todir="${tests.output}" haltonfailure="no" >
-
-                <fileset dir="${hy.sql.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="${sql.exclude.file}" unless="test.case" />
-                </fileset>
-            </batchtest>
-        </junit>
-        <antcall target="touch-failures-file" />
-        <antcall target="touch-errors-file" />
+        <copy todir="${tests.resources.hdk.dir}">
+            <fileset dir="src/test/resources" />
+        </copy>
+        
+        <copy file="../../${junit.jar}" todir="${hy.hdk}/build/test" />
+        <copy file="../../${derby.jar}" todir="${hy.hdk}/build/test" />
     </target>
 
-    <target name="touch-failures-file" if="test.failures">
-        <echo file="${tests.output}/test.failures"
-            append="true">sql${line.separator}</echo>
+    <target name="compile-tests">
+        <compile-tests description="sql 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">sql${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/sql/src/test/java/org/apache/harmony/sql/tests/internal/rowset/CachedRowSetTestCase.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/sql/src/test/java/org/apache/harmony/sql/tests/internal/rowset/CachedRowSetTestCase.java?rev=798469&r1=798468&r2=798469&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/sql/src/test/java/org/apache/harmony/sql/tests/internal/rowset/CachedRowSetTestCase.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/sql/src/test/java/org/apache/harmony/sql/tests/internal/rowset/CachedRowSetTestCase.java Tue Jul 28 09:30:33 2009
@@ -34,9 +34,9 @@
 import junit.framework.TestCase;
 
 public class CachedRowSetTestCase extends TestCase {
-    public static final String DERBY_URL_Create = "jdbc:derby:src/test/resources/TESTDB;create=true";
+    public static final String DERBY_URL_Create = "jdbc:derby:resources/TESTDB;create=true";
 
-    public static final String DERBY_URL = "jdbc:derby:src/test/resources/TESTDB";
+    public static final String DERBY_URL = "jdbc:derby:resources/TESTDB";
 
     protected Connection conn = null;
 

Modified: harmony/enhanced/classlib/branches/java6/modules/sql/src/test/java/org/apache/harmony/sql/tests/internal/rowset/XmlReaderTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/sql/src/test/java/org/apache/harmony/sql/tests/internal/rowset/XmlReaderTest.java?rev=798469&r1=798468&r2=798469&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/sql/src/test/java/org/apache/harmony/sql/tests/internal/rowset/XmlReaderTest.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/sql/src/test/java/org/apache/harmony/sql/tests/internal/rowset/XmlReaderTest.java Tue Jul 28 09:30:33 2009
@@ -31,11 +31,11 @@
 
 public class XmlReaderTest extends TestCase {
 
-    public final String XML_SRC_URL_RI = "src/test/resources/org/apache/harmony/sql/internal/rowset/XmlReaderTest_RI.xml";
+    public final String XML_SRC_URL_RI = "resources/org/apache/harmony/sql/internal/rowset/XmlReaderTest_RI.xml";
 
-    public final String XML_SRC_URL_HY = "src/test/resources/org/apache/harmony/sql/internal/rowset/XmlReaderTest_HY.xml";
+    public final String XML_SRC_URL_HY = "resources/org/apache/harmony/sql/internal/rowset/XmlReaderTest_HY.xml";
 
-    public final String XML_SRC_URL_INVALID_HEADER = "src/test/resources/org/apache/harmony/sql/internal/rowset/XmlFile_InvalidHeader.xml";
+    public final String XML_SRC_URL_INVALID_HEADER = "resources/org/apache/harmony/sql/internal/rowset/XmlFile_InvalidHeader.xml";
 
     public String currentUrl;
 

Modified: harmony/enhanced/classlib/branches/java6/modules/suncompat/build.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/suncompat/build.xml?rev=798469&r1=798468&r2=798469&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/suncompat/build.xml (original)
+++ harmony/enhanced/classlib/branches/java6/modules/suncompat/build.xml Tue Jul 28 09:30:33 2009
@@ -19,27 +19,11 @@
 <project name="Sun Compat Build" default="build" basedir=".">
     <description>Build for Sun Compat component</description>
 
-    <!-- import common properties -->
+    <property name="hy.module" value="suncompat" />
     <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.suncompat.src.main.java}" />
-            <present targetdir="${hy.suncompat.src.main.java}">
-                <mapper type="regexp"
-                        from="^(.*?)(\$$[^/\\\.]*)?\.class$$"
-                        to="\1.java"/>
-            </present>
-        </or>
-    </fileset>
-
-    <property name="suncompat.exclude.file" location="${hy.hdk}/build/suncompat.exclude" />
+    <property file="../../make/depends.properties" />
 
     <target name="build" depends="compile-java, build-jar" />
 
@@ -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/suncompat.jar" />
         <delete file="${hy.jdk}/jre/lib/boot/suncompat-src.jar" />
+        <delete dir="${tests.hdk.dir}" failonerror="false" />
         <delete failonerror="false">
             <fileset refid="classes" />
         </delete>
@@ -70,8 +55,8 @@
         <echo message="Compiling Sun Compat classes" />
 
         <javac sourcepath=""
-               srcdir="${hy.suncompat.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}" 
@@ -89,9 +74,9 @@
     </target>
 
     <target name="copy-resources">
-        <mkdir dir="${hy.build}" />
-        <copy todir="${hy.build}" includeemptydirs="false">
-            <fileset dir="${hy.suncompat.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 +84,7 @@
 
     <target name="build-jar" depends="svn-info">
         <jar destfile="${hy.jdk}/jre/lib/boot/suncompat.jar"
-             manifest="${hy.suncompat}/META-INF/MANIFEST.MF"
+             manifest="META-INF/MANIFEST.MF"
              compress="${hy.jar.compress}">
             <fileset refid="classes" />
             <manifest>
@@ -110,7 +95,7 @@
         </jar>
 
         <jar destfile="${hy.jdk}/jre/lib/boot/suncompat-src.jar">
-            <fileset dir="${hy.suncompat.src.main.java}" />
+            <fileset dir="src/main/java" />
             <manifest>
                 <attribute name="Implementation-Version" value="${svn.info}"/> 
             </manifest>
@@ -119,88 +104,44 @@
         </jar>
     </target>
 
-    <target name="compile-tests">
-        <echo message="Compiling SUNCOMPAT tests" />
-
-        <mkdir dir="${hy.suncompat.bin.test}" />
-
-        <javac srcdir="${hy.suncompat.src.test.java}"
-               destdir="${hy.suncompat.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" />
-        </javac>
-    </target>
-
-    <target name="prepare-exclude">
-       <prepare-exclude-list moduleName="suncompat" dir="./make"
-                             result="${suncompat.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}" />
+    <target name="test-jar" depends="svn-info,compile-tests">
+        <mkdir dir="${tests.hdk.dir}" />
 
-            <classpath>
-                <pathelement path="${hy.suncompat.bin.test}"/>
-            </classpath>
-            <classpath location="../../build/tests" />
-
-            <formatter type="xml" />
+        <copy file="make/run-test.xml" tofile="${tests.hdk.dir}/build.xml" />
+        
+        <jar destfile="${tests.hdk.dir}/suncompat_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.suncompat.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="${suncompat.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">suncompat${line.separator}</echo>
+    <target name="compile-tests">
+        <compile-tests description="suncompat 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">suncompat${line.separator}</echo>
+    <target name="run-tests" depends="test-jar">
+        <ant dir="${tests.hdk.dir}" target="test-module" />
     </target>
 
 </project>



Mime
View raw message