harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hinde...@apache.org
Subject svn commit: r798469 [22/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/crypto/build.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/crypto/build.xml?rev=798469&r1=798468&r2=798469&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/crypto/build.xml (original)
+++ harmony/enhanced/classlib/branches/java6/modules/crypto/build.xml Tue Jul 28 09:30:33 2009
@@ -19,30 +19,12 @@
 <project name="CRYPTO Build" default="build" basedir=".">
     <description>Build for CRYPTO component</description>
 
-    <!-- import common properties -->
+    <property name="hy.module" value="crypto" />
     <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.crypto.src.main.java}" />
-            <present targetdir="${hy.crypto.src.main.java}">
-                <mapper type="regexp"
-                        from="^(.*?)(\$$[^/\\\.]*)?\.class$$"
-                        to="\1.java"/>
-            </present>
-        </or>
-    </fileset>
-
     <property file="../../make/depends.properties" />
 
-    <property name="crypto.exclude.file" location="${hy.hdk}/build/crypto.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.crypto.packaging.jarname}.jar" />
-        <delete file="${hy.jdk}/jre/lib/boot/${hy.crypto.packaging.jarname}-src.jar" />
+        <delete file="${hy.jdk}/jre/lib/boot/crypto.jar" />
+        <delete file="${hy.jdk}/jre/lib/boot/crypto-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 CRYPTO classes" />
 
-        <mkdir dir="${hy.build}" />
+        <mkdir dir="../../build/classes" />
 
         <javac sourcepath=""
-               srcdir="${hy.crypto.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.crypto.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.crypto.packaging.jarname}.jar"
-             manifest="${hy.crypto}/META-INF/MANIFEST.MF"
+        <jar destfile="${hy.jdk}/jre/lib/boot/crypto.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.crypto.packaging.jarname}-src.jar">
-            <fileset dir="${hy.crypto.src.main.java}" />
+        <jar destfile="${hy.jdk}/jre/lib/boot/crypto-src.jar">
+            <fileset dir="src/main/java" />
             <manifest>
                 <attribute name="Implementation-Version" value="${svn.info}"/> 
             </manifest>
@@ -123,224 +106,126 @@
         </jar>
     </target>
 
+    <target name="test-jar" depends="svn-info,compile-tests">
+        <mkdir dir="${tests.hdk.dir}" />
+
+        <copy file="make/run-test.xml" tofile="${tests.hdk.dir}/build.xml" />
+
+        <jar destfile="${tests.hdk.dir}/crypto_test_support.jar">
+            <fileset dir="bin/test/support" />
+            <manifest>
+                <attribute name="Implementation-Version" value="${svn.info}"/> 
+            </manifest>
+            <metainf refid="hy.required.metainf-files"/>
+        </jar>
+
+        <jar destfile="${tests.hdk.dir}/crypto_api_tests.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}/crypto_api_boot_tests.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}/crypto_impl_tests.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}/crypto_impl_boot_tests.jar">
+            <fileset dir="bin/test/impl.injected" />
+            <manifest>
+                <attribute name="Implementation-Version" value="${svn.info}"/> 
+            </manifest>
+            <metainf refid="hy.required.metainf-files"/>
+        </jar>
+
+        <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="../../${junit.jar}" todir="${hy.hdk}/build/test" />
+    </target>
+
     <target name="compile-tests">
 
-        <compile-tests description="test support files" destdir="../../build/tests">
+        <compile-tests description="crypto test support files"
+                       destdir="bin/test/support">
             <javac-elements>
                 <src>
-                    <pathelement location="${hy.crypto.src.test}/support/common/java"/>
+                    <pathelement location="src/test/support/common/java"/>
 
                     <!-- FIXME: CRYPTO tests should not reach into security module code -->
-                    <pathelement location="${hy.crypto}/../security/src/test/support/common/java"/>
+                    <pathelement location="../security/src/test/support/common/java"/>
                 </src>
 
                 <include name="**/*.java" />
             </javac-elements>
         </compile-tests>
 
-
-        <compile-tests description="api tests" destdir="${hy.crypto.bin.test}/api">
+        <compile-tests description="crypto api tests"
+                       destdir="bin/test/api">
             <javac-elements>
-                <src path="${hy.crypto.src.test}/api/java"/>
+                <src path="src/test/api/java"/>
                 <include name="**/*Test.java" />
+                <classpath>
+                    <pathelement path="bin/test/support" />
+                </classpath>
             </javac-elements>
         </compile-tests>
 
-        <compile-tests description="api injected tests" destdir="${hy.crypto.bin.test}/api.injected">
+        <compile-tests description="crypto api injected tests"
+                       destdir="bin/test/api.injected">
             <javac-elements>
-                <src path="${hy.crypto.src.test}/api/java.injected"/>
+                <src path="src/test/api/java.injected"/>
                 <include name="**/*Test.java" />
+                <classpath>
+                    <pathelement path="bin/test/support" />
+                </classpath>
             </javac-elements>
         </compile-tests>
 
-        <compile-tests description="impl injected tests" destdir="${hy.crypto.bin.test}/impl.injected">
+        <compile-tests description="crypto impl injected tests"
+                       destdir="bin/test/impl.injected">
             <javac-elements>
-                <src path="${hy.crypto.src.test}/impl/java.injected"/>
+                <src path="src/test/impl/java.injected"/>
                 <include name="**/*Test.java" />
             </javac-elements>
         </compile-tests>
 
-        <compile-tests description="impl tests" destdir="${hy.crypto.bin.test}/impl">
+        <compile-tests description="crypto impl tests"
+                       destdir="bin/test/impl">
             <javac-elements>
-                <src path="${hy.crypto.src.test}/impl/java"/>
+                <src path="src/test/impl/java"/>
                 <include name="**/*Test.java" />
-            </javac-elements>
-        </compile-tests>
-    </target>
-
-    <target name="prepare-exclude">
-       <prepare-exclude-list moduleName="crypto" dir="./make"
-                             result="${crypto.exclude.file}"/>
-    </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="${hy.crypto.bin.test}/api"/>
-                    <pathelement path="${hy.hdk}/build/test/support.jar" />
-                    <pathelement path="../../build/tests" />
-                </classpath>
-
-                <batchtest todir="${tests.output}" haltonfailure="no" >
-                    <fileset dir="${hy.crypto.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="${crypto.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:${hy.crypto.bin.test}/api.injected${path.separator}../../${junit.jar}${path.separator}../../build/tests${path.separator}${hy.hdk}/build/test/support.jar"/>
-
-                <batchtest todir="${tests.output}" haltonfailure="no" >
-                    <fileset dir="${hy.crypto.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="${crypto.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="${hy.crypto.bin.test}/impl"/>
-                    <pathelement path="${hy.hdk}/build/test/support.jar" />
+                    <pathelement path="bin/test/support" />
                 </classpath>
-                
-                <batchtest todir="${tests.output}" haltonfailure="no" >
-                    <fileset dir="${hy.crypto.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="${crypto.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:${hy.crypto.bin.test}/impl.injected${path.separator}../../${junit.jar}${path.separator}../../build/tests"/>
-
-                <batchtest todir="${tests.output}" haltonfailure="no" >
-                    <fileset dir="${hy.crypto.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="${crypto.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">crypto${line.separator}</echo>
+            </javac-elements>
+        </compile-tests>
     </target>
 
-    <target name="touch-errors-file" if="test.errors">
-        <echo file="${tests.output}/test.errors"
-            append="true">crypto${line.separator}</echo>
+    <target name="run-tests" depends="test-jar">
+        <ant dir="${tests.hdk.dir}" target="test-module" />
     </target>
-    
-    <macrodef name="compile-tests">
-        <attribute name="description" default="" />
-        <attribute name="destdir"  />
-        <element name="javac-elements" />
-        <sequential>
-            <echo message="Compiling CRYPTO @{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 CRYPTO @{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}" />
-
-                <junit-elements />
-
-                <classpath>
-                    <pathelement path="${hy.crypto.src.test.resources}"/>
-                    <pathelement path="../../build/tests" />
-                </classpath>
-
-                <formatter type="xml" />
-            </junit>
-        </sequential>
-    </macrodef>
 
 </project>

Modified: harmony/enhanced/classlib/branches/java6/modules/imageio/build.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/imageio/build.xml?rev=798469&r1=798468&r2=798469&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/imageio/build.xml (original)
+++ harmony/enhanced/classlib/branches/java6/modules/imageio/build.xml Tue Jul 28 09:30:33 2009
@@ -19,27 +19,11 @@
 <project name="ImageIO Build" default="build" basedir=".">
     <description>Build for ImageIO component</description>
 
-    <!-- import common properties -->
+    <property name="hy.module" value="imageio" />
     <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.imageio.src.main.java}" />
-            <present targetdir="${hy.imageio.src.main.java}">
-                <mapper type="regexp"
-                        from="^(.*?)(\$$[^/\\\.]*)?\.class$$"
-                        to="\1.java"/>
-            </present>
-        </or>
-    </fileset>
-
-    <property name="imageio.exclude.file" location="${hy.hdk}/build/imageio.exclude" />
+    <property file="../../make/depends.properties" />
 
     <target name="build" depends="compile-java, copy-resources, build-jar" />
 
@@ -55,16 +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="prepare-exclude">
-       <prepare-exclude-list moduleName="imageio" dir="./make"
-                             result="${imageio.exclude.file}"/>
-    </target>
+    <target name="-test-module" depends="build, run-tests" />
 
     <target name="clean">
         <delete file="${hy.jdk}/jre/lib/boot/imageio.jar" />
 	<delete file="${hy.jdk}/jre/lib/boot/imageio-src.jar" />
+        <delete dir="${tests.hdk.dir}" failonerror="false" />
         <delete failonerror="false">
             <fileset refid="classes" />
         </delete>
@@ -72,20 +52,20 @@
     </target>
 
     <target name="clean-native">
-        <make dir="${hy.imageio.src.main.native}/jpegencoder/${hy.os.family}"
+        <make dir="src/main/native/jpegencoder/${hy.os.family}"
               target="clean" />
-        <make dir="${hy.imageio.src.main.native}/pngencoder/${hy.os.family}"
+        <make dir="src/main/native/pngencoder/${hy.os.family}"
               target="clean" />
     </target>
 
     <target name="compile-java">
         <echo message="Compiling ImageIO classes" />
 
-        <mkdir dir="${hy.build}" />
+        <mkdir dir="../../build/classes" />
 
         <javac sourcepath=""
-               srcdir="${hy.imageio.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}" 
@@ -104,10 +84,10 @@
     
     <target name="build-native" depends="build-native-all" />
     <target name="build-native-all" >
-        <make dir="${hy.imageio.src.main.native}/jpegencoder/${hy.os.family}" />
+        <make dir="src/main/native/jpegencoder/${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.imageio.src.main.native}/jpegencoder/">
+            <fileset dir="src/main/native/jpegencoder/">
                 <include name="*${shlib.suffix}*"/>
                 <include name="*${progdb.suffix}*" if="is.windows" />
                 <exclude name="*${manifest.suffix}"/>
@@ -115,15 +95,15 @@
         </copy>
         <!-- Copy link exports file on z/OS -->
         <copy todir="${hy.hdk}/lib" overwrite="yes">
-            <fileset dir="${hy.imageio.src.main.native}/jpegencoder/${hy.os.family}">
+            <fileset dir="src/main/native/jpegencoder/${hy.os.family}">
                 <include name="*${linklib.suffix}" if="is.zos" />
             </fileset>
         </copy>
 
-        <make dir="${hy.imageio.src.main.native}/pngencoder/${hy.os.family}" />
+        <make dir="src/main/native/pngencoder/${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.imageio.src.main.native}/pngencoder/">
+            <fileset dir="src/main/native/pngencoder/">
                 <include name="*${shlib.suffix}*"/>
                 <include name="*${progdb.suffix}*" if="is.windows" />
                 <exclude name="*${manifest.suffix}"/>
@@ -131,16 +111,16 @@
         </copy>
         <!-- Copy link exports file on z/OS -->
         <copy todir="${hy.hdk}/lib" overwrite="yes">
-            <fileset dir="${hy.imageio.src.main.native}/pngencoder/${hy.os.family}">
+            <fileset dir="src/main/native/pngencoder/${hy.os.family}">
                 <include name="*${linklib.suffix}" if="is.zos" />
             </fileset>
         </copy>
     </target>
 
     <target name="copy-resources">
-        <mkdir dir="${hy.build}" />
-        <copy todir="${hy.build}" includeemptydirs="false">
-            <fileset dir="${hy.imageio.src.main.java}">
+        <mkdir dir="../../build/classes" />
+        <copy todir="../../build/classes" includeemptydirs="false">
+            <fileset dir="src/main/java">
                 <exclude name="**/*.java" />
             </fileset>
         </copy>
@@ -148,7 +128,7 @@
 
     <target name="build-jar" depends="svn-info">
         <jar destfile="${hy.jdk}/jre/lib/boot/imageio.jar"
-             manifest="${hy.imageio}/META-INF/MANIFEST.MF"
+             manifest="META-INF/MANIFEST.MF"
              compress="${hy.jar.compress}">
             <fileset refid="classes" />
             <manifest>
@@ -159,7 +139,7 @@
         </jar>
 
         <jar destfile="${hy.jdk}/jre/lib/boot/imageio-src.jar">
-            <fileset dir="${hy.imageio.src.main.java}" />
+            <fileset dir="src/main/java" />
             <manifest>
                 <attribute name="Implementation-Version" value="${svn.info}"/> 
             </manifest>
@@ -168,90 +148,48 @@
         </jar>
     </target>
 
-    <target name="compile-tests" depends="copy-test-resources">
-        <echo message="Compiling ImageIO tests" />
-
-        <mkdir dir="${hy.imageio.bin.test}" />
-
-        <javac srcdir="${hy.imageio.src.test.java}"
-               destdir="${hy.imageio.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="run-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}/imageio_tests.jar">
+            <fileset dir="bin/test" />
+            <manifest>
+                <attribute name="Implementation-Version" value="${svn.info}"/> 
+            </manifest>
+            <metainf refid="hy.required.metainf-files"/>
+        </jar>
 
-        <mkdir dir="${tests.output}" />
+        <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>
 
-        <property name="test.jre.home" value="${hy.jdk}/jre" />
+        <copy todir="${tests.resources.hdk.dir}">
+            <fileset dir="src/test/resources" />
+        </copy>
 
-        <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.imageio.bin.test}"/>
-            </classpath>
-
-            <formatter type="xml" />
-
-            <batchtest todir="${tests.output}" haltonfailure="no" >
-
-                <fileset dir="${hy.imageio.src.test.java}" >
-                    <!-- if ${test.case}     -->
-                    <include name="${converted.tc}" if="test.case" />
-                    <!-- unless ${test.case} -->
-                    <include name="**/*.java" unless="test.case" />
-                    <excludesfile name="${imageio.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">imageio${line.separator}</echo>
+    <target name="compile-tests">
+        <compile-tests description="imageio 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">imageio${line.separator}</echo>
+    <target name="run-tests" depends="test-jar">
+        <ant dir="${tests.hdk.dir}" target="test-module" />
     </target>
 
-    <target name="copy-test-resources">
-        <mkdir dir="${hy.imageio.bin.test}/resources" />
-        <copy todir="${hy.imageio.bin.test}/resources" includeemptydirs="false">
-            <fileset dir="${hy.imageio.src.test.resources}">
-                <exclude name="**/*.java" />
-            </fileset>
-        </copy>
-    </target>
 </project>

Modified: harmony/enhanced/classlib/branches/java6/modules/imageio/src/test/java/javax/imageio/ImageIOTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/imageio/src/test/java/javax/imageio/ImageIOTest.java?rev=798469&r1=798468&r2=798469&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/imageio/src/test/java/javax/imageio/ImageIOTest.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/imageio/src/test/java/javax/imageio/ImageIOTest.java Tue Jul 28 09:30:33 2009
@@ -36,7 +36,7 @@
     }
 
     protected List<URL> listImages() {
-        final String imgPath = "/resources/images/utest."; //$NON-NLS-1$
+        final String imgPath = "/images/utest."; //$NON-NLS-1$
         final Class<? extends ImageIOTest> c = getClass();
         final List<URL> img = new LinkedList<URL>();
 

Modified: harmony/enhanced/classlib/branches/java6/modules/instrument/build.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/instrument/build.xml?rev=798469&r1=798468&r2=798469&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/instrument/build.xml (original)
+++ harmony/enhanced/classlib/branches/java6/modules/instrument/build.xml Tue Jul 28 09:30:33 2009
@@ -19,27 +19,11 @@
 <project name="INSTRUMENT Build" default="build" basedir=".">
     <description>Build for INSTRUMENT component</description>
 
-    <!-- import common properties -->
+    <property name="hy.module" value="instrument" />
     <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.instrument.src.main.java}" />
-            <present targetdir="${hy.instrument.src.main.java}">
-                <mapper type="regexp"
-                        from="^(.*?)(\$$[^/\\\.]*)?\.class$$"
-                        to="\1.java"/>
-            </present>
-        </or>
-    </fileset>
-    
-    <property name="instrument.exclude.file" location="${hy.hdk}/build/instrument.exclude" />
+    <property file="../../make/depends.properties" />
 
     <target name="build" depends="compile-java, copy-resources, build-jar" />
 
@@ -55,16 +39,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.instrument.src.main.native}/instrument/${hy.os.family}" />
+        <make dir="src/main/native/instrument/${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.instrument.src.main.native}/instrument">
+            <fileset dir="src/main/native/instrument">
                 <include name="*${shlib.suffix}*" />
                 <include name="*${progdb.suffix}*" if="is.windows" />
                 <exclude name="*${manifest.suffix}*" />
@@ -72,7 +56,7 @@
         </copy>
         <!-- Copy link exports file on z/OS -->
         <copy todir="${hy.hdk}/lib" overwrite="yes">
-            <fileset dir="${hy.instrument.src.main.native}/instrument/${hy.os.family}">
+            <fileset dir="src/main/native/instrument/${hy.os.family}">
                 <include name="*${linklib.suffix}" if="is.zos" />
             </fileset>
         </copy>
@@ -80,12 +64,13 @@
     
     <!-- Clean natives -->
     <target name="clean-native">
-        <make dir="${hy.instrument.src.main.native}/instrument/${hy.os.family}" target="clean" />
+        <make dir="src/main/native/instrument/${hy.os.family}" target="clean" />
     </target>
 
     <target name="clean">
         <delete file="${hy.jdk}/jre/lib/boot/instrument.jar" />
         <delete file="${hy.jdk}/jre/lib/boot/instrument-src.jar" />
+        <delete dir="${tests.hdk.dir}" failonerror="false" />
         <delete failonerror="false">
             <fileset refid="classes" />
         </delete>
@@ -95,11 +80,11 @@
     <target name="compile-java">
         <echo message="Compiling INSTRUMENT classes" />
 
-        <mkdir dir="${hy.build}" />
+        <mkdir dir="../../build/classes" />
 
         <javac sourcepath=""
-            srcdir="${hy.instrument.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}" 
@@ -117,9 +102,9 @@
     </target>
 
     <target name="copy-resources">
-        <mkdir dir="${hy.build}" />
-        <copy todir="${hy.build}" includeemptydirs="false">
-            <fileset dir="${hy.instrument.src.main.java}">
+        <mkdir dir="../../build/classes" />
+        <copy todir="../../build/classes" includeemptydirs="false">
+            <fileset dir="src/main/java">
                 <exclude name="**/*.java" />
             </fileset>
         </copy>
@@ -127,7 +112,7 @@
 
     <target name="build-jar" depends="svn-info">
         <jar destfile="${hy.jdk}/jre/lib/boot/instrument.jar"
-             manifest="${hy.instrument}/META-INF/MANIFEST.MF"
+             manifest="META-INF/MANIFEST.MF"
              compress="${hy.jar.compress}">
             <fileset refid="classes" />
             <manifest>
@@ -138,7 +123,7 @@
         </jar>
 
         <jar destfile="${hy.jdk}/jre/lib/boot/instrument-src.jar">
-            <fileset dir="${hy.instrument.src.main.java}" />
+            <fileset dir="src/main/java" />
             <manifest>
                 <attribute name="Implementation-Version" value="${svn.info}"/> 
             </manifest>
@@ -147,99 +132,50 @@
         </jar>
     </target>
 
-    <target name="compile-tests" depends="copy-test-resources">
-        <echo message="Compiling INSTRUMENT tests" />
-
-        <mkdir dir="${hy.instrument.bin.test}" />
-
-        <javac srcdir="${hy.instrument.src.test.java}"
-            destdir="${hy.instrument.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="${hy.hdk}/build/test/support.jar" />
-        </javac>
-    </target>
-
-    <target name="prepare-exclude">
-       <prepare-exclude-list moduleName="instrument" dir="./make"
-                             result="${instrument.exclude.file}"/>
-    </target>
-    
-    <target name="run-tests">
-
-        <mkdir dir="${tests.output}" />
-
-        <property name="test.jre.home" value="${hy.jdk}/jre" />
+    <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}/instrument_tests.jar">
+            <fileset dir="bin/test" />
+            <manifest>
+                <attribute name="Implementation-Version" value="${svn.info}"/> 
+            </manifest>
+            <metainf refid="hy.required.metainf-files"/>
+        </jar>
 
-        <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.instrument.bin.test}"/>
-            </classpath>
-            <classpath location="${hy.hdk}/build/test/support.jar" />
-
-            <formatter type="xml" />
-
-            <batchtest todir="${tests.output}" haltonfailure="no" >
-
-                <fileset dir="${hy.instrument.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="${instrument.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>
 
-    <target name="touch-failures-file" if="test.failures">
-        <echo file="${tests.output}/test.failures"
-            append="true">instrument${line.separator}</echo>
+        <copy todir="${tests.resources.hdk.dir}" includeemptydirs="false">
+            <fileset dir="src/test/resources">
+                <exclude name="**/*.java" />
+            </fileset>
+        </copy>
+        
+        <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">instrument${line.separator}</echo>
+    <target name="compile-tests">
+        <compile-tests description="instrument tests">
+            <javac-elements>
+                <src>
+                    <pathelement location="src/test/java" />
+                </src>
+            </javac-elements>
+        </compile-tests>
     </target>
 
-    <target name="copy-test-resources">
-        <mkdir dir="${hy.instrument.bin.test}" />
-        <copy todir="${hy.instrument.bin.test}" includeemptydirs="false">
-            <fileset dir="${hy.instrument.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>

Propchange: harmony/enhanced/classlib/branches/java6/modules/jmx/META-INF/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Jul 28 09:30:33 2009
@@ -1 +1 @@
-/harmony/enhanced/classlib/trunk/modules/jmx/META-INF:768152-790471
+/harmony/enhanced/classlib/trunk/modules/jmx/META-INF:768152-798021

Modified: harmony/enhanced/classlib/branches/java6/modules/jmx/build.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/jmx/build.xml?rev=798469&r1=798468&r2=798469&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/jmx/build.xml (original)
+++ harmony/enhanced/classlib/branches/java6/modules/jmx/build.xml Tue Jul 28 09:30:33 2009
@@ -21,8 +21,8 @@
 <project name="JMX Build" default="build" basedir=".">
     <description>Build for JMX component</description>
 
+    <property name="hy.module" value="jmx" />
     <property name="hy.hdk" location="${basedir}/../../deploy" />
-    <property name="hy.jdk" location="${hy.hdk}/jdk" />
     <property name="depends.dir" location="${basedir}/../../depends" />
     <import file="${hy.hdk}/build/ant/properties.xml" />
     <import file="${hy.hdk}/build/ant/depends.xml" />

Modified: harmony/enhanced/classlib/branches/java6/modules/jndi/build.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/jndi/build.xml?rev=798469&r1=798468&r2=798469&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/jndi/build.xml (original)
+++ harmony/enhanced/classlib/branches/java6/modules/jndi/build.xml Tue Jul 28 09:30:33 2009
@@ -19,27 +19,11 @@
 <project name="JNDI Build" default="build" basedir=".">
     <description>Build for JNDI component</description>
 
-    <!-- import common properties -->
+    <property name="hy.module" value="jndi" />
     <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.jndi.src.main.java}" />
-            <present targetdir="${hy.jndi.src.main.java}">
-                <mapper type="regexp"
-                        from="^(.*?)(\$$[^/\\\.]*)?\.class$$"
-                        to="\1.java"/>
-            </present>
-        </or>
-    </fileset>
-
-    <property name="jndi.exclude.file" location="${hy.hdk}/build/jndi.exclude" />
+    <property file="../../make/depends.properties" />
 
     <target name="build" depends="compile-java, copy-resources, 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/jndi.jar" />
         <delete file="${hy.jdk}/jre/lib/boot/jndi-src.jar" />
+        <delete dir="${tests.hdk.dir}" failonerror="false" />
         <delete failonerror="false">
             <fileset refid="classes" />
         </delete>
@@ -69,11 +54,11 @@
     <target name="compile-java">
         <echo message="Compiling JNDI classes" />
 
-        <mkdir dir="${hy.build}" />
+        <mkdir dir="../../build/classes" />
 
         <javac sourcepath=""
-               srcdir="${hy.jndi.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}" 
@@ -91,9 +76,9 @@
     </target>
 
     <target name="copy-resources">
-        <mkdir dir="${hy.build}" />
-        <copy todir="${hy.build}" includeemptydirs="false">
-            <fileset dir="${hy.jndi.src.main.java}">
+        <mkdir dir="../../build/classes" />
+        <copy todir="../../build/classes" includeemptydirs="false">
+            <fileset dir="src/main/java">
                 <exclude name="**/*.java" />
             </fileset>
         </copy>
@@ -101,7 +86,7 @@
 
     <target name="build-jar" depends="svn-info">
         <jar destfile="${hy.jdk}/jre/lib/boot/jndi.jar"
-             manifest="${hy.jndi}/META-INF/MANIFEST.MF"
+             manifest="META-INF/MANIFEST.MF"
              compress="${hy.jar.compress}">
             <fileset refid="classes" />
             <manifest>
@@ -112,7 +97,7 @@
         </jar>
 
         <jar destfile="${hy.jdk}/jre/lib/boot/jndi-src.jar">
-            <fileset dir="${hy.jndi.src.main.java}" />
+            <fileset dir="src/main/java" />
             <manifest>
                 <attribute name="Implementation-Version" value="${svn.info}"/> 
             </manifest>
@@ -121,132 +106,50 @@
         </jar>
     </target>
 
-    <target name="compile-tests" depends="copy-test-resources" >
-        <echo message="Compiling JNDI tests" />
-
-        <mkdir dir="${hy.jndi.bin.test}" />
-
-        <javac srcdir="${hy.jndi.src.test.java}"
-            destdir="${hy.jndi.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="../../deploy/build/test/support.jar" />
-        </javac>
-    </target>
-
-    <target name="prepare-exclude">
-       <prepare-exclude-list moduleName="jndi" dir="./make"
-                             result="${jndi.exclude.file}"/>
-    </target>
-
-    <target name="run-tests">
-
-        <mkdir dir="${tests.output}" />
-
-        <property name="test.jre.home" value="${hy.jdk}/jre" />
-
-        <junit fork="yes"
-               forkmode="perBatch"
-               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.jndi.bin.test}"/>
-                <fileset dir="${hy.hdk}/build/test/">
-                    <include name="*.jar" />
-                </fileset>
-            </classpath>
-            <classpath location="../../build/tests" />
-
-            <formatter type="xml" />
-
-            <batchtest todir="${tests.output}" haltonfailure="no" >
+    <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}/jndi_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.jndi.src.test.java}">
-                    <!-- if ${test.case}     -->
-                    <include name="${converted.tc}" if="test.case" />
-                    <!-- unless ${test.case} -->
-                    <include name="**/*Test.java" unless="test.case" />
-                    <include name="**/Test*.java" unless="test.case" />
-                    <excludesfile name="${jndi.exclude.file}" unless="test.case"  />
-
-                    <!--  These tests run in a separate jvm below -->
-                    <exclude name="org/apache/harmony/jndi/tests/javax/naming/spi/NamingManagerBuilderTest.java" unless="test.case" />
-                    <exclude name="org/apache/harmony/jndi/tests/javax/naming/spi/NamingManagerTest.java" unless="test.case" />
-                    <exclude name="org/apache/harmony/jndi/tests/javax/naming/spi/DirectoryManagerTest.java" unless="test.case" />
-                </fileset>
-            </batchtest>
-            
-            <batchtest todir="${tests.output}" haltonfailure="no"
-                   unless="test.case">
-            
-                <fileset dir="${hy.jndi.src.test.java}">
-                    <include name="org/apache/harmony/jndi/tests/javax/naming/spi/NamingManagerTest.java" />
-                </fileset>
-            </batchtest>
-            
-            <batchtest todir="${tests.output}" haltonfailure="no"
-                   unless="test.case">
-            
-                <fileset dir="${hy.jndi.src.test.java}">
-                    <include name="org/apache/harmony/jndi/tests/javax/naming/spi/NamingManagerBuilderTest.java" />
-                </fileset>
-            </batchtest>            
-            
-            <batchtest todir="${tests.output}" haltonfailure="no"
-                   unless="test.case">
-            
-                <fileset dir="${hy.jndi.src.test.java}">
-                    <include name="org/apache/harmony/jndi/tests/javax/naming/spi/DirectoryManagerTest.java" />
-                </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>
 
-    <target name="touch-failures-file" if="test.failures">
-        <echo file="${tests.output}/test.failures"
-            append="true">jndi${line.separator}</echo>
+        <copy todir="${tests.resources.hdk.dir}" includeemptydirs="false">
+            <fileset dir="src/test/resources">
+                <exclude name="**/*.java" />
+            </fileset>
+        </copy>
+        
+        <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">jndi${line.separator}</echo>
+    <target name="compile-tests">
+        <compile-tests description="jndi tests">
+            <javac-elements>
+                <src>
+                    <pathelement location="src/test/java" />
+                </src>
+            </javac-elements>
+        </compile-tests>
     </target>
 
-    <target name="copy-test-resources">
-        <mkdir dir="${hy.jndi.bin.test}" />
-        <copy todir="${hy.jndi.bin.test}" includeemptydirs="false">
-            <fileset dir="${hy.jndi.src.test.resources}">
-                <exclude name="**/*.java" />
-                <exclude name="**/*.zip" />
-            </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/jndi/src/main/java/javax/naming/CompositeName.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/jndi/src/main/java/javax/naming/CompositeName.java?rev=798469&r1=798468&r2=798469&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/jndi/src/main/java/javax/naming/CompositeName.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/jndi/src/main/java/javax/naming/CompositeName.java Tue Jul 28 09:30:33 2009
@@ -308,7 +308,6 @@
      * Format name elements to its string representation.
      */
     private static String formatName(Vector<String> elems) {
-
         // special case: all empty elements
         if (isAllEmptyElements(elems)) {
             StringBuilder buf = new StringBuilder();
@@ -325,17 +324,14 @@
             if (i > 0) {
                 buf.append("/"); //$NON-NLS-1$
             }
-            if (elem.indexOf('/') < 0 && elem.indexOf('\\') < 0
-                    && elem.indexOf('"') < 0) {
+            
+            // Add quotation while elem contains separater char
+            if (elem.indexOf('/') != -1){
+                buf.append("\"");
+                buf.append(elem);
+                buf.append("\"");
+            }else{
                 buf.append(elem);
-            } else {
-                char chars[] = elem.toCharArray();
-                for (char c : chars) {
-                    if (c == '/' || c == '\\' || c == '"') {
-                        buf.append('\\');
-                    }
-                    buf.append(c);
-                }
             }
         }
         return buf.toString();

Modified: harmony/enhanced/classlib/branches/java6/modules/jndi/src/main/java/org/apache/harmony/jndi/internal/parser/LdapNameParser.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/jndi/src/main/java/org/apache/harmony/jndi/internal/parser/LdapNameParser.java?rev=798469&r1=798468&r2=798469&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/jndi/src/main/java/org/apache/harmony/jndi/internal/parser/LdapNameParser.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/jndi/src/main/java/org/apache/harmony/jndi/internal/parser/LdapNameParser.java Tue Jul 28 09:30:33 2009
@@ -70,9 +70,33 @@
             throw new InvalidNameException("Invalid name: " + s);
         }
 
+        int mark = 0;
+        boolean isInQuote = false;
         for (int i = 0; i < c.length; i++) {
-            if ((c[i] == ',' || c[i] == ';') && c[i - 1] != '\\') {
-
+            if (c[i] == '\"' && i > 0 && c[i-1] != '\\'){
+                if (isInQuote){
+                    isInQuote = false;
+                    continue;
+                }else{
+                    isInQuote = true;
+                    // Record quotation mark's location in case it is a single one
+                    mark = i+1;
+                    continue;
+                }
+            }
+            
+            // Ignore quoted string
+            if (isInQuote) {
+                if (i == c.length -1){
+                    // if the last quotation mark is a single one, ignored it.
+                    // and rescan the chars at the marked location.
+                    i = mark;
+                    isInQuote = false;
+                }
+                continue;
+            }
+            
+            if ((c[i] == ',' || c[i] == ';') && i > 0 && c[i - 1] != '\\') {
                 String sub = s.substring(from, i);
                 if (sub.equals("")) {
                     throw new InvalidNameException("Invalid name: " + s);

Modified: harmony/enhanced/classlib/branches/java6/modules/jndi/src/main/java/org/apache/harmony/jndi/internal/parser/LdapRdnParser.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/jndi/src/main/java/org/apache/harmony/jndi/internal/parser/LdapRdnParser.java?rev=798469&r1=798468&r2=798469&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/jndi/src/main/java/org/apache/harmony/jndi/internal/parser/LdapRdnParser.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/jndi/src/main/java/org/apache/harmony/jndi/internal/parser/LdapRdnParser.java Tue Jul 28 09:30:33 2009
@@ -44,7 +44,7 @@
      * Constructor
      */
     public LdapRdnParser(String name) {
-        if (name.endsWith("+")) {
+        if (name.endsWith("+") && name.length() > 1 && name.charAt(name.length()-2) != '\\') {
             this.name = name.substring(0, name.lastIndexOf('+'));
         } else {
             this.name = name;

Modified: harmony/enhanced/classlib/branches/java6/modules/jndi/src/main/java/org/apache/harmony/jndi/provider/ldap/parser/FilterParser.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/jndi/src/main/java/org/apache/harmony/jndi/provider/ldap/parser/FilterParser.java?rev=798469&r1=798468&r2=798469&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/jndi/src/main/java/org/apache/harmony/jndi/provider/ldap/parser/FilterParser.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/jndi/src/main/java/org/apache/harmony/jndi/provider/ldap/parser/FilterParser.java Tue Jul 28 09:30:33 2009
@@ -35,7 +35,7 @@
  * instance of org.apache.harmony.jndi.provider.ldap.filter.Filter according
  * RFC2254. And It also support parse variables of the form {i}.
  * 
- * @see org.apache.harmony.jndi.provider.ldap.Filter
+ * @see org.apache.harmony.jndi.provider.ldap.filter.Filter
  * @see javax.naming.directory.DirContext#search(javax.naming.Name, String,
  *      Object[], javax.naming.directory.SearchControls)
  */
@@ -402,24 +402,58 @@
                     args[i] = "{" + i + "}";
                 }
       parse();
-      jj_consume_token(24);
+      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+      case 24:
+        jj_consume_token(24);
+        break;
+      case 25:
+        jj_consume_token(25);
+        break;
+      default:
+        jj_la1[12] = jj_gen;
+        jj_consume_token(-1);
+        throw new ParseException();
+      }
       test();
       break;
     default:
-      jj_la1[12] = jj_gen;
+      jj_la1[15] = jj_gen;
       if (jj_2_1(2)) {
-        jj_consume_token(24);
-      } else {
         switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
         case 24:
           jj_consume_token(24);
+          break;
+        case 25:
+          jj_consume_token(25);
+          break;
+        default:
+          jj_la1[13] = jj_gen;
+          jj_consume_token(-1);
+          throw new ParseException();
+        }
+      } else {
+        switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+        case 24:
+        case 25:
+          switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+          case 24:
+            jj_consume_token(24);
+            break;
+          case 25:
+            jj_consume_token(25);
+            break;
+          default:
+            jj_la1[14] = jj_gen;
+            jj_consume_token(-1);
+            throw new ParseException();
+          }
           jj_consume_token(0);
           break;
         case 0:
           jj_consume_token(0);
           break;
         default:
-          jj_la1[13] = jj_gen;
+          jj_la1[16] = jj_gen;
           jj_consume_token(-1);
           throw new ParseException();
         }
@@ -473,7 +507,7 @@
                           value.append(t.image);
         break;
       default:
-        jj_la1[14] = jj_gen;
+        jj_la1[17] = jj_gen;
         jj_consume_token(-1);
         throw new ParseException();
       }
@@ -490,7 +524,7 @@
         ;
         break;
       default:
-        jj_la1[15] = jj_gen;
+        jj_la1[18] = jj_gen;
         break label_6;
       }
     }
@@ -520,7 +554,7 @@
       t = jj_consume_token(ZERO);
       break;
     default:
-      jj_la1[16] = jj_gen;
+      jj_la1[19] = jj_gen;
       jj_consume_token(-1);
       throw new ParseException();
     }
@@ -536,7 +570,7 @@
       t = jj_consume_token(ZERO);
       break;
     default:
-      jj_la1[17] = jj_gen;
+      jj_la1[20] = jj_gen;
       jj_consume_token(-1);
       throw new ParseException();
     }
@@ -564,7 +598,7 @@
           ;
           break;
         default:
-          jj_la1[18] = jj_gen;
+          jj_la1[21] = jj_gen;
           break label_7;
         }
         temp = parse();
@@ -585,7 +619,7 @@
           ;
           break;
         default:
-          jj_la1[19] = jj_gen;
+          jj_la1[22] = jj_gen;
           break label_8;
         }
         temp = parse();
@@ -606,7 +640,7 @@
       filter = item();
       break;
     default:
-      jj_la1[20] = jj_gen;
+      jj_la1[23] = jj_gen;
       jj_consume_token(-1);
       throw new ParseException();
     }
@@ -652,7 +686,7 @@
                     filter = new Filter(Filter.LESS_OR_EQUAL_FILTER);filter.setValue(new AttributeTypeAndValuePair(des, value));
           break;
         default:
-          jj_la1[22] = jj_gen;
+          jj_la1[25] = jj_gen;
           if (jj_2_3(3)) {
             jj_consume_token(EQUAL);
             switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
@@ -671,7 +705,7 @@
               value_start(list);
               break;
             default:
-              jj_la1[21] = jj_gen;
+              jj_la1[24] = jj_gen;
               jj_consume_token(-1);
               throw new ParseException();
             }
@@ -684,7 +718,7 @@
                                             filter = new Filter(Filter.EXTENSIBLE_MATCH_FILTER); filter.setValue(rule);
               break;
             default:
-              jj_la1[23] = jj_gen;
+              jj_la1[26] = jj_gen;
               jj_consume_token(-1);
               throw new ParseException();
             }
@@ -698,7 +732,7 @@
                                      filter = new Filter(Filter.EXTENSIBLE_MATCH_FILTER); filter.setValue(rule);
       break;
     default:
-      jj_la1[24] = jj_gen;
+      jj_la1[27] = jj_gen;
       jj_consume_token(-1);
       throw new ParseException();
     }
@@ -722,7 +756,7 @@
       value_start(list);
       break;
     default:
-      jj_la1[25] = jj_gen;
+      jj_la1[28] = jj_gen;
       ;
     }
   }
@@ -736,7 +770,7 @@
       asterisk_start(list);
       break;
     default:
-      jj_la1[26] = jj_gen;
+      jj_la1[29] = jj_gen;
       ;
     }
   }
@@ -766,7 +800,7 @@
                                                      value = value + temp;
       break;
     default:
-      jj_la1[27] = jj_gen;
+      jj_la1[30] = jj_gen;
       ;
     }
              {if (true) return value;}
@@ -893,54 +927,6 @@
     finally { jj_save(6, xla); }
   }
 
-  final private boolean jj_3R_12() {
-    Token xsp;
-    if (jj_3R_16()) return true;
-    while (true) {
-      xsp = jj_scanpos;
-      if (jj_3R_16()) { jj_scanpos = xsp; break; }
-    }
-    return false;
-  }
-
-  final private boolean jj_3R_15() {
-    if (jj_3R_12()) return true;
-    Token xsp;
-    xsp = jj_scanpos;
-    if (jj_3R_19()) jj_scanpos = xsp;
-    return false;
-  }
-
-  final private boolean jj_3R_32() {
-    if (jj_scan_token(LBRACE)) return true;
-    if (jj_3R_17()) return true;
-    return false;
-  }
-
-  final private boolean jj_3_6() {
-    if (jj_scan_token(COLON)) return true;
-    if (jj_3R_13()) return true;
-    return false;
-  }
-
-  final private boolean jj_3_5() {
-    if (jj_scan_token(COLON_DN)) return true;
-    return false;
-  }
-
-  final private boolean jj_3R_14() {
-    if (jj_scan_token(ASTERISK)) return true;
-    Token xsp;
-    xsp = jj_scanpos;
-    if (jj_3R_18()) jj_scanpos = xsp;
-    return false;
-  }
-
-  final private boolean jj_3R_19() {
-    if (jj_3R_14()) return true;
-    return false;
-  }
-
   final private boolean jj_3R_33() {
     Token xsp;
     xsp = jj_scanpos;
@@ -976,7 +962,17 @@
     return false;
   }
 
-  final private boolean jj_3R_13() {
+  final private boolean jj_3_1() {
+    Token xsp;
+    xsp = jj_scanpos;
+    if (jj_scan_token(24)) {
+    jj_scanpos = xsp;
+    if (jj_scan_token(25)) return true;
+    }
+    return false;
+  }
+
+  private boolean jj_3R_13() {
     if (jj_3R_17()) return true;
     return false;
   }
@@ -1003,11 +999,6 @@
     return false;
   }
 
-  final private boolean jj_3_1() {
-    if (jj_scan_token(24)) return true;
-    return false;
-  }
-
   final private boolean jj_3R_27() {
     if (jj_3R_32()) return true;
     return false;
@@ -1109,82 +1100,146 @@
     return false;
   }
 
+  final private boolean jj_3R_12() {
+    Token xsp;
+    if (jj_3R_16()) return true;
+    while (true) {
+      xsp = jj_scanpos;
+      if (jj_3R_16()) { jj_scanpos = xsp; break; }
+    }
+    return false;
+  }
+
+  final private boolean jj_3R_15() {
+    if (jj_3R_12()) return true;
+    Token xsp;
+    xsp = jj_scanpos;
+    if (jj_3R_19()) jj_scanpos = xsp;
+    return false;
+  }
+
+  final private boolean jj_3R_32() {
+    if (jj_scan_token(LBRACE)) return true;
+    if (jj_3R_17()) return true;
+    return false;
+  }
+
+  final private boolean jj_3_6() {
+    if (jj_scan_token(COLON)) return true;
+    if (jj_3R_13()) return true;
+    return false;
+  }
+
+  final private boolean jj_3_5() {
+    if (jj_scan_token(COLON_DN)) return true;
+    return false;
+  }
+
+  final private boolean jj_3R_14() {
+    if (jj_scan_token(ASTERISK)) return true;
+    Token xsp;
+    xsp = jj_scanpos;
+    if (jj_3R_18()) jj_scanpos = xsp;
+    return false;
+  }
+
+  final private boolean jj_3R_19() {
+    if (jj_3R_14()) return true;
+    return false;
+  }
+
+  /** Generated Token Manager. */
   public FilterParserTokenManager token_source;
   SimpleCharStream jj_input_stream;
-  public Token token, jj_nt;
+  /** Current token. */
+  public Token token;
+  /** Next token. */
+  public Token jj_nt;
   private int jj_ntk;
   private Token jj_scanpos, jj_lastpos;
   private int jj_la;
-  public boolean lookingAhead = false;
-  private boolean jj_semLA;
   private int jj_gen;
-  final private int[] jj_la1 = new int[28];
+  final private int[] jj_la1 = new int[31];
   static private int[] jj_la1_0;
   static {
-      jj_la1_0();
+      jj_la1_init_0();
    }
-   private static void jj_la1_0() {
-      jj_la1_0 = new int[] {0xc080c,0xc080c,0x40800,0x40800,0x40800,0x100000,0x4084c,0x4c,0xc084c,0xc080c,0xc084c,0x400000,0x10,0x1000001,0xac184c,0xac184c,0x40804,0x40804,0x10,0x10,0x174e,0xae184c,0xc000,0x1002,0x104e,0xac184c,0x20000,0xac184c,};
+   private static void jj_la1_init_0() {
+      jj_la1_0 = new int[] {0xc080c,0xc080c,0x40800,0x40800,0x40800,0x100000,0x4084c,0x4c,0xc084c,0xc080c,0xc084c,0x400000,0x3000000,0x3000000,0x3000000,0x10,0x3000001,0xac184c,0xac184c,0x40804,0x40804,0x10,0x10,0x174e,0xae184c,0xc000,0x1002,0x104e,0xac184c,0x20000,0xac184c,};
    }
   final private JJCalls[] jj_2_rtns = new JJCalls[7];
   private boolean jj_rescan = false;
   private int jj_gc = 0;
 
+  /** Constructor with InputStream. */
   public FilterParser(java.io.InputStream stream) {
-    jj_input_stream = new SimpleCharStream(stream, 1, 1);
+     this(stream, null);
+  }
+  /** Constructor with InputStream and supplied encoding */
+  public FilterParser(java.io.InputStream stream, String encoding) {
+    try { jj_input_stream = new SimpleCharStream(stream, encoding, 1, 1); } catch(java.io.UnsupportedEncodingException e) { throw new RuntimeException(e); }
     token_source = new FilterParserTokenManager(jj_input_stream);
     token = new Token();
     jj_ntk = -1;
     jj_gen = 0;
-    for (int i = 0; i < 28; i++) jj_la1[i] = -1;
+    for (int i = 0; i < 31; i++) jj_la1[i] = -1;
     for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
   }
 
+  /** Reinitialise. */
   public void ReInit(java.io.InputStream stream) {
-    jj_input_stream.ReInit(stream, 1, 1);
+     ReInit(stream, null);
+  }
+  /** Reinitialise. */
+  public void ReInit(java.io.InputStream stream, String encoding) {
+    try { jj_input_stream.ReInit(stream, encoding, 1, 1); } catch(java.io.UnsupportedEncodingException e) { throw new RuntimeException(e); }
     token_source.ReInit(jj_input_stream);
     token = new Token();
     jj_ntk = -1;
     jj_gen = 0;
-    for (int i = 0; i < 28; i++) jj_la1[i] = -1;
+    for (int i = 0; i < 31; i++) jj_la1[i] = -1;
     for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
   }
 
+  /** Constructor. */
   public FilterParser(java.io.Reader stream) {
     jj_input_stream = new SimpleCharStream(stream, 1, 1);
     token_source = new FilterParserTokenManager(jj_input_stream);
     token = new Token();
     jj_ntk = -1;
     jj_gen = 0;
-    for (int i = 0; i < 28; i++) jj_la1[i] = -1;
+    for (int i = 0; i < 31; i++) jj_la1[i] = -1;
     for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
   }
 
+  /** Reinitialise. */
   public void ReInit(java.io.Reader stream) {
     jj_input_stream.ReInit(stream, 1, 1);
     token_source.ReInit(jj_input_stream);
     token = new Token();
     jj_ntk = -1;
     jj_gen = 0;
-    for (int i = 0; i < 28; i++) jj_la1[i] = -1;
+    for (int i = 0; i < 31; i++) jj_la1[i] = -1;
     for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
   }
 
+  /** Constructor with generated Token Manager. */
   public FilterParser(FilterParserTokenManager tm) {
     token_source = tm;
     token = new Token();
     jj_ntk = -1;
     jj_gen = 0;
-    for (int i = 0; i < 28; i++) jj_la1[i] = -1;
+    for (int i = 0; i < 31; i++) jj_la1[i] = -1;
     for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
   }
 
+  /** Reinitialise. */
   public void ReInit(FilterParserTokenManager tm) {
     token_source = tm;
     token = new Token();
     jj_ntk = -1;
     jj_gen = 0;
-    for (int i = 0; i < 28; i++) jj_la1[i] = -1;
+    for (int i = 0; i < 31; i++) jj_la1[i] = -1;
     for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
   }
 
@@ -1235,6 +1290,8 @@
     return false;
   }
 
+
+/** Get the next Token. */
   final public Token getNextToken() {
     if (token.next != null) token = token.next;
     else token = token.next = token_source.getNextToken();
@@ -1243,8 +1300,9 @@
     return token;
   }
 
+/** Get the specific Token. */
   final public Token getToken(int index) {
-    Token t = lookingAhead ? jj_scanpos : token;
+    Token t = token;
     for (int i = 0; i < index; i++) {
       if (t.next != null) t = t.next;
       else t = t.next = token_source.getNextToken();
@@ -1259,7 +1317,7 @@
       return (jj_ntk = jj_nt.kind);
   }
 
-  private java.util.Vector jj_expentries = new java.util.Vector();
+  private java.util.List jj_expentries = new java.util.ArrayList();
   private int[] jj_expentry;
   private int jj_kind = -1;
   private int[] jj_lasttokens = new int[100];
@@ -1274,36 +1332,31 @@
       for (int i = 0; i < jj_endpos; i++) {
         jj_expentry[i] = jj_lasttokens[i];
       }
-      boolean exists = false;
-      for (java.util.Enumeration e = jj_expentries.elements(); e.hasMoreElements();) {
-        int[] oldentry = (int[])(e.nextElement());
+      jj_entries_loop: for (java.util.Iterator it = jj_expentries.iterator(); it.hasNext();) {
+        int[] oldentry = (int[])(it.next());
         if (oldentry.length == jj_expentry.length) {
-          exists = true;
           for (int i = 0; i < jj_expentry.length; i++) {
             if (oldentry[i] != jj_expentry[i]) {
-              exists = false;
-              break;
+              continue jj_entries_loop;
             }
           }
-          if (exists) break;
+          jj_expentries.add(jj_expentry);
+          break jj_entries_loop;
         }
       }
-      if (!exists) jj_expentries.addElement(jj_expentry);
       if (pos != 0) jj_lasttokens[(jj_endpos = pos) - 1] = kind;
     }
   }
 
+  /** Generate ParseException. */
   public ParseException generateParseException() {
-    jj_expentries.removeAllElements();
-    boolean[] la1tokens = new boolean[25];
-    for (int i = 0; i < 25; i++) {
-      la1tokens[i] = false;
-    }
+    jj_expentries.clear();
+    boolean[] la1tokens = new boolean[26];
     if (jj_kind >= 0) {
       la1tokens[jj_kind] = true;
       jj_kind = -1;
     }
-    for (int i = 0; i < 28; i++) {
+    for (int i = 0; i < 31; i++) {
       if (jj_la1[i] == jj_gen) {
         for (int j = 0; j < 32; j++) {
           if ((jj_la1_0[i] & (1<<j)) != 0) {
@@ -1312,11 +1365,11 @@
         }
       }
     }
-    for (int i = 0; i < 25; i++) {
+    for (int i = 0; i < 26; i++) {
       if (la1tokens[i]) {
         jj_expentry = new int[1];
         jj_expentry[0] = i;
-        jj_expentries.addElement(jj_expentry);
+        jj_expentries.add(jj_expentry);
       }
     }
     jj_endpos = 0;
@@ -1324,20 +1377,23 @@
     jj_add_error_token(0, 0);
     int[][] exptokseq = new int[jj_expentries.size()][];
     for (int i = 0; i < jj_expentries.size(); i++) {
-      exptokseq[i] = (int[])jj_expentries.elementAt(i);
+      exptokseq[i] = (int[])jj_expentries.get(i);
     }
     return new ParseException(token, exptokseq, tokenImage);
   }
 
+  /** Enable tracing. */
   final public void enable_tracing() {
   }
 
+  /** Disable tracing. */
   final public void disable_tracing() {
   }
 
   final private void jj_rescan_token() {
     jj_rescan = true;
     for (int i = 0; i < 7; i++) {
+    try {
       JJCalls p = jj_2_rtns[i];
       do {
         if (p.gen > jj_gen) {
@@ -1354,6 +1410,7 @@
         }
         p = p.next;
       } while (p != null);
+      } catch(LookaheadSuccess ls) { }
     }
     jj_rescan = false;
   }

Modified: harmony/enhanced/classlib/branches/java6/modules/jndi/src/main/java/org/apache/harmony/jndi/provider/ldap/parser/FilterParserConstants.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/jndi/src/main/java/org/apache/harmony/jndi/provider/ldap/parser/FilterParserConstants.java?rev=798469&r1=798468&r2=798469&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/jndi/src/main/java/org/apache/harmony/jndi/provider/ldap/parser/FilterParserConstants.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/jndi/src/main/java/org/apache/harmony/jndi/provider/ldap/parser/FilterParserConstants.java Tue Jul 28 09:30:33 2009
@@ -15,38 +15,68 @@
  *  limitations under the License. 
  */
 /* Generated By:JavaCC: Do not edit this line. FilterParserConstants.java */
-
 package org.apache.harmony.jndi.provider.ldap.parser;
 
+
+/**
+ * Token literal values and constants.
+ * Generated by org.javacc.parser.OtherFilesGen#start()
+ */
 public interface FilterParserConstants {
 
+  /** End of File. */
   int EOF = 0;
+  /** RegularExpression Id. */
   int COLON_DN = 1;
+  /** RegularExpression Id. */
   int HEX_CHAR = 2;
+  /** RegularExpression Id. */
   int NOHEX_CHAR = 3;
+  /** RegularExpression Id. */
   int LPARENT = 4;
+  /** RegularExpression Id. */
   int RPARENT = 5;
+  /** RegularExpression Id. */
   int LBRACE = 6;
+  /** RegularExpression Id. */
   int RBRACE = 7;
+  /** RegularExpression Id. */
   int AND = 8;
+  /** RegularExpression Id. */
   int OR = 9;
+  /** RegularExpression Id. */
   int NOT = 10;
+  /** RegularExpression Id. */
   int ZERO = 11;
+  /** RegularExpression Id. */
   int COLON = 12;
+  /** RegularExpression Id. */
   int EQUAL = 13;
+  /** RegularExpression Id. */
   int LESS = 14;
+  /** RegularExpression Id. */
   int GREATER = 15;
+  /** RegularExpression Id. */
   int APPROX = 16;
+  /** RegularExpression Id. */
   int ASTERISK = 17;
+  /** RegularExpression Id. */
   int DIGIT = 18;
+  /** RegularExpression Id. */
   int HYPHEN = 19;
+  /** RegularExpression Id. */
   int PERIOD = 20;
+  /** RegularExpression Id. */
   int BACKSLASH = 21;
+  /** RegularExpression Id. */
   int SEMI = 22;
+  /** RegularExpression Id. */
   int CHAR = 23;
 
+  /** Lexical state. */
   int DEFAULT = 0;
 
+  /** Literal token values. */
   String[] tokenImage = {
     "<EOF>",
     "\":dn\"",
@@ -73,6 +103,7 @@
     "\";\"",
     "<CHAR>",
     "\"\\n\"",
+    "\"\\u0085\"",
   };
 
 }

Modified: harmony/enhanced/classlib/branches/java6/modules/jndi/src/main/java/org/apache/harmony/jndi/provider/ldap/parser/FilterParserTokenManager.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/jndi/src/main/java/org/apache/harmony/jndi/provider/ldap/parser/FilterParserTokenManager.java?rev=798469&r1=798468&r2=798469&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/jndi/src/main/java/org/apache/harmony/jndi/provider/ldap/parser/FilterParserTokenManager.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/jndi/src/main/java/org/apache/harmony/jndi/provider/ldap/parser/FilterParserTokenManager.java Tue Jul 28 09:30:33 2009
@@ -28,9 +28,13 @@
 import org.apache.harmony.jndi.provider.ldap.Filter.SubstringFilter;
 import org.apache.harmony.jndi.provider.ldap.asn1.Utils;
 
+/** Token Manager. */
 public class FilterParserTokenManager implements FilterParserConstants
 {
+
+  /** Debug output. */
   public  java.io.PrintStream debugStream = System.out;
+  /** Set debug output. */
   public  void setDebugStream(java.io.PrintStream ds) { debugStream = ds; }
 private final int jjStopStringLiteralDfa_0(int pos, long active0)
 {
@@ -50,15 +54,7 @@
    jjmatchedPos = pos;
    return pos + 1;
 }
-private final int jjStartNfaWithStates_0(int pos, int kind, int state)
-{
-   jjmatchedKind = kind;
-   jjmatchedPos = pos;
-   try { curChar = input_stream.readChar(); }
-   catch(java.io.IOException e) { return pos + 1; }
-   return jjMoveNfa_0(state, pos + 1);
-}
-private final int jjMoveStringLiteralDfa0_0()
+private int jjMoveStringLiteralDfa0_0()
 {
    switch(curChar)
    {
@@ -101,6 +97,8 @@
          return jjStopAtPos(0, 7);
       case 126:
          return jjStopAtPos(0, 16);
+      case 133:
+         return jjStopAtPos(0, 25);
       default :
          return jjMoveNfa_0(0, 0);
    }
@@ -124,7 +122,7 @@
 private final int jjMoveStringLiteralDfa2_0(long old0, long active0)
 {
    if (((active0 &= old0)) == 0L)
-      return jjStartNfa_0(0, old0); 
+      return jjStartNfa_0(0, old0);
    try { curChar = input_stream.readChar(); }
    catch(java.io.IOException e) {
       jjStopStringLiteralDfa_0(1, active0);
@@ -141,47 +139,16 @@
    }
    return jjStartNfa_0(1, active0);
 }
-private final void jjCheckNAdd(int state)
-{
-   if (jjrounds[state] != jjround)
-   {
-      jjstateSet[jjnewStateCnt++] = state;
-      jjrounds[state] = jjround;
-   }
-}
-private final void jjAddStates(int start, int end)
-{
-   do {
-      jjstateSet[jjnewStateCnt++] = jjnextStates[start];
-   } while (start++ != end);
-}
-private final void jjCheckNAddTwoStates(int state1, int state2)
-{
-   jjCheckNAdd(state1);
-   jjCheckNAdd(state2);
-}
-private final void jjCheckNAddStates(int start, int end)
-{
-   do {
-      jjCheckNAdd(jjnextStates[start]);
-   } while (start++ != end);
-}
-private final void jjCheckNAddStates(int start)
-{
-   jjCheckNAdd(jjnextStates[start]);
-   jjCheckNAdd(jjnextStates[start + 1]);
-}
 static final long[] jjbitVec0 = {
-   0x0L, 0x0L, 0xffffffffffffffffL, 0xffffffffffffffffL
+   0x0L, 0x0L, 0xffffffffffffffdfL, 0xffffffffffffffffL
 };
 private final int jjMoveNfa_0(int startState, int curPos)
 {
-   int[] nextStates;
    int startsAt = 0;
    jjnewStateCnt = 4;
    int i = 1;
    jjstateSet[0] = startState;
-   int j, kind = 0x7fffffff;
+   int kind = 0x7fffffff;
    for (;;)
    {
       if (++jjround == 0x7fffffff)
@@ -189,7 +156,7 @@
       if (curChar < 64)
       {
          long l = 1L << curChar;
-         MatchLoop: do
+         do
          {
             switch(jjstateSet[--i])
             {
@@ -220,7 +187,7 @@
       else if (curChar < 128)
       {
          long l = 1L << (curChar & 077);
-         MatchLoop: do
+         do
          {
             switch(jjstateSet[--i])
             {
@@ -257,7 +224,7 @@
       {
          int i2 = (curChar & 0xff) >> 6;
          long l2 = 1L << (curChar & 077);
-         MatchLoop: do
+         do
          {
             switch(jjstateSet[--i])
             {
@@ -284,28 +251,35 @@
 }
 static final int[] jjnextStates = {
 };
+
+/** Token literal values. */
 public static final String[] jjstrLiteralImages = {
 "", "\72\144\156", null, null, "\50", "\51", "\173", "\175", "\46", "\174", 
 "\41", "\60", "\72", "\75", "\74", "\76", "\176", "\52", null, "\55", "\56", "\134", 
-"\73", null, "\12", };
+"\73", null, "\12", "\205", };
+
+/** Lexer state names. */
 public static final String[] lexStateNames = {
-   "DEFAULT", 
+   "DEFAULT",
 };
 protected SimpleCharStream input_stream;
 private final int[] jjrounds = new int[4];
 private final int[] jjstateSet = new int[8];
 protected char curChar;
-public FilterParserTokenManager(SimpleCharStream stream)
-{
+/** Constructor. */
+public FilterParserTokenManager(SimpleCharStream stream){
    if (SimpleCharStream.staticFlag)
       throw new Error("ERROR: Cannot use a static CharStream class with a non-static lexical analyzer.");
    input_stream = stream;
 }
-public FilterParserTokenManager(SimpleCharStream stream, int lexState)
-{
+
+/** Constructor. */
+public FilterParserTokenManager(SimpleCharStream stream, int lexState){
    this(stream);
    SwitchTo(lexState);
 }
+
+/** Reinitialise parser. */
 public void ReInit(SimpleCharStream stream)
 {
    jjmatchedPos = jjnewStateCnt = 0;
@@ -320,11 +294,15 @@
    for (i = 4; i-- > 0;)
       jjrounds[i] = 0x80000000;
 }
+
+/** Reinitialise parser. */
 public void ReInit(SimpleCharStream stream, int lexState)
 {
    ReInit(stream);
    SwitchTo(lexState);
 }
+
+/** Switch to specified lex state. */
 public void SwitchTo(int lexState)
 {
    if (lexState >= 1 || lexState < 0)
@@ -335,14 +313,25 @@
 
 protected Token jjFillToken()
 {
-   Token t = Token.newToken(jjmatchedKind);
-   t.kind = jjmatchedKind;
+   final Token t;
+   final String curTokenImage;
+   final int beginLine;
+   final int endLine;
+   final int beginColumn;
+   final int endColumn;
    String im = jjstrLiteralImages[jjmatchedKind];
-   t.image = (im == null) ? input_stream.GetImage() : im;
-   t.beginLine = input_stream.getBeginLine();
-   t.beginColumn = input_stream.getBeginColumn();
-   t.endLine = input_stream.getEndLine();
-   t.endColumn = input_stream.getEndColumn();
+   curTokenImage = (im == null) ? input_stream.GetImage() : im;
+   beginLine = input_stream.getBeginLine();
+   beginColumn = input_stream.getBeginColumn();
+   endLine = input_stream.getEndLine();
+   endColumn = input_stream.getEndColumn();
+   t = Token.newToken(jjmatchedKind, curTokenImage);
+
+   t.beginLine = beginLine;
+   t.endLine = endLine;
+   t.beginColumn = beginColumn;
+   t.endColumn = endColumn;
+
    return t;
 }
 
@@ -353,22 +342,21 @@
 int jjmatchedPos;
 int jjmatchedKind;
 
+/** Get the next Token. */
 public Token getNextToken() 
 {
-  int kind;
-  Token specialToken = null;
   Token matchedToken;
   int curPos = 0;
 
   EOFLoop :
   for (;;)
-  {   
-   try   
-   {     
+  {
+   try
+   {
       curChar = input_stream.BeginToken();
-   }     
+   }
    catch(java.io.IOException e)
-   {        
+   {
       jjmatchedKind = 0;
       matchedToken = jjFillToken();
       return matchedToken;
@@ -407,4 +395,24 @@
   }
 }
 
+private final void jjCheckNAdd(int state)
+{
+   if (jjrounds[state] != jjround)
+   {
+      jjstateSet[jjnewStateCnt++] = state;
+      jjrounds[state] = jjround;
+   }
+}
+private final void jjAddStates(int start, int end)
+{
+   do {
+      jjstateSet[jjnewStateCnt++] = jjnextStates[start];
+   } while (start++ != end);
+}
+private void jjCheckNAddTwoStates(int state1, int state2)
+{
+   jjCheckNAdd(state1);
+   jjCheckNAdd(state2);
+}
+
 }



Mime
View raw message