harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From smish...@apache.org
Subject svn commit: r514591 - in /harmony/enhanced/jdktools/trunk: ./ make/ modules/jpda/ modules/jpda/make/ modules/jpda/src/main/native/jdwp/linux/agent/ modules/jpda/src/main/native/jdwp/linux/transport/ modules/jpda/src/main/native/jdwp/windows/agent/ modu...
Date Mon, 05 Mar 2007 07:47:15 GMT
Author: smishura
Date: Sun Mar  4 23:47:14 2007
New Revision: 514591

URL: http://svn.apache.org/viewvc?view=rev&rev=514591
Log:
Apply patch for HARMONY-3226:
[jdktools][build] update build scripts to enable building and running tests

Modified:
    harmony/enhanced/jdktools/trunk/build.xml
    harmony/enhanced/jdktools/trunk/make/build-java.xml
    harmony/enhanced/jdktools/trunk/make/build-native.xml
    harmony/enhanced/jdktools/trunk/make/build-test.xml
    harmony/enhanced/jdktools/trunk/make/depends.properties
    harmony/enhanced/jdktools/trunk/make/depends.xml
    harmony/enhanced/jdktools/trunk/make/properties.xml
    harmony/enhanced/jdktools/trunk/modules/jpda/build.xml
    harmony/enhanced/jdktools/trunk/modules/jpda/make/hyproperties.xml
    harmony/enhanced/jdktools/trunk/modules/jpda/src/main/native/jdwp/linux/agent/makefile
    harmony/enhanced/jdktools/trunk/modules/jpda/src/main/native/jdwp/linux/transport/makefile
    harmony/enhanced/jdktools/trunk/modules/jpda/src/main/native/jdwp/windows/agent/makefile
    harmony/enhanced/jdktools/trunk/modules/jpda/src/main/native/jdwp/windows/transport/makefile
    harmony/enhanced/jdktools/trunk/modules/launcher/build.xml
    harmony/enhanced/jdktools/trunk/modules/samsa/build.xml
    harmony/enhanced/jdktools/trunk/modules/tools/build.xml

Modified: harmony/enhanced/jdktools/trunk/build.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/jdktools/trunk/build.xml?view=diff&rev=514591&r1=514590&r2=514591
==============================================================================
--- harmony/enhanced/jdktools/trunk/build.xml (original)
+++ harmony/enhanced/jdktools/trunk/build.xml Sun Mar  4 23:47:14 2007
@@ -25,12 +25,12 @@
 
     <target name="help">
         <echo>
-Apache Harmony JDK Tools Build
+Apache Harmony Ant Build
 
 Usage:
 
   ant build
-    Compiles the java and native code to produce the tool parts of the jdk in
+    Compiles the java and native code to produce a jdk in
     "deploy/jdk".
 
   ant clean
@@ -45,6 +45,15 @@
   ant doc
     Generates the javadoc.
 
+  ant properties
+    Display the common properties that are use in the ant build files.
+
+The 'build' and 'test' targets can be restricted to processing only
+a single module by defining the 'build.module' variable on the ant
+command line.  For example, to run only the luni tests:
+
+  ant -Dbuild.module=tools test
+
         </echo>
     </target>
 
@@ -52,15 +61,21 @@
     <property file="${user.home}/jdktools.properties"/>
     
     <!-- set the path root for the classlib : must be relative to the build directory -->
-    <property name="external.HDK.loc" value="../working_classlib/deploy" />
-    <property name="external.DRLVM.loc" value="../working_vm/build/deploy" />
+    <property name="external.classlib.loc" value="../working_classlib/deploy" />
+    <property name="external.drlvm.loc" value="../working_vm/build/deploy" />
     <property name="external.resources.loc" value="../common_resources" />
 
     <property name="external.resources" location="${external.resources.loc}" />
 
     <property name="harmony.jdktools" location="${basedir}"/>
-    <property name="hy.hdk" location="${external.HDK.loc}" />
-    <property name="hy.drlvm" location="${external.DRLVM.loc}" />
+
+    <property name="hy.deploy" location="${external.drlvm.loc}"/>
+    <condition property="hy.deploy" value="${hy.hdk}">
+        <isset property="hy.hdk"/>
+    </condition>
+
+    <property name="hy.hdk" location="${external.classlib.loc}" />
+    <property name="hy.drlvm" location="${external.drlvm.loc}" />
     <property name="hy.jdk" location="deploy/jdk" />
 
     <!-- import properties for snapshot targets -->
@@ -74,11 +89,21 @@
     <target name="rebuild" depends="clean,build"
         description="Performs a full build - that is 'clean' then 'build'" />
 	
+    <!-- ================================
+	 target : build
+	     
+	 builds with w/o clean
+	 ================================= -->
     <target name="build" depends="build-java,build-native"
         description="Compiles the java and native code to produce a jdk">
     </target>
 
-    <target name="clean" depends="clean-java,clean-native"
+    <!-- ================================
+	 target : clean
+	     
+	 removes all generated files
+	 ================================= -->
+    <target name="clean" depends="clean-java,clean-native,clean-tests"
             description="Removes all the files generated by a build" />
 
     <!-- ================================
@@ -103,8 +128,9 @@
         </echo>
         <ant antfile="make/build-java.xml" inheritall="false" target="build">
             <property name="hy.hdk" value="${hy.hdk}"/>
-	        <property name="hy.drlvm" value="${hy.drlvm}"/>
-		    <property name="harmony.jdktools" value="${harmony.jdktools}"/>
+            <property name="hy.jdk" value="${hy.jdk}"/>
+	    <property name="hy.drlvm" value="${hy.drlvm}"/>
+            <property name="harmony.jdktools" value="${harmony.jdktools}"/>
             <property name="external.resources" value="${external.resources}"/>
         </ant>
     </target>
@@ -116,10 +142,17 @@
          ================================= -->
     <target name="clean-java" 
             description="Removes the compiled java code" >
+        <echo>
+========================================
+Cleaning Java component archives...
+========================================
+        </echo>
         <ant antfile="make/build-java.xml" inheritall="false" target="clean">
-	        <property name="hy.hdk" value="${hy.hdk}"/>
-	        <property name="hy.drlvm" value="${hy.drlvm}"/>
-		    <property name="harmony.jdktools" value="${harmony.jdktools}"/>
+            <property name="hy.hdk" value="${hy.hdk}"/>
+            <property name="hy.jdk" value="${hy.jdk}"/>
+	    <property name="hy.drlvm" value="${hy.drlvm}"/>
+            <property name="harmony.jdktools" value="${harmony.jdktools}"/>
+            <property name="external.resources" value="${external.resources}"/>
         </ant>
     </target>
 
@@ -145,9 +178,10 @@
         </echo>
         <ant antfile="make/build-native.xml" inheritall="false" target="build">
             <property name="hy.hdk" value="${hy.hdk}"/>
-            <property name="hy.drlvm" value="${hy.drlvm}"/>
-		    <property name="harmony.jdktools" value="${harmony.jdktools}"/>
-		    <property name="harmony.jdktools" value="${harmony.jdktools}"/>
+            <property name="hy.jdk" value="${hy.jdk}"/>
+	    <property name="hy.drlvm" value="${hy.drlvm}"/>
+            <property name="harmony.jdktools" value="${harmony.jdktools}"/>
+            <property name="external.resources" value="${external.resources}"/>
         </ant>
     </target>
 
@@ -158,22 +192,61 @@
          ================================= -->
     <target name="clean-native"
         description="Removes the compiled native code" >
-
+        <echo>
+========================================
+Cleaning native libs and executables...
+========================================
+        </echo>
         <ant antfile="make/build-native.xml" inheritall="false" target="clean">
             <property name="hy.hdk" value="${hy.hdk}"/>
-            <property name="hy.drlvm" value="${hy.drlvm}"/>
-		    <property name="harmony.jdktools" value="${harmony.jdktools}"/>
+            <property name="hy.jdk" value="${hy.jdk}"/>
+	    <property name="hy.drlvm" value="${hy.drlvm}"/>
+            <property name="harmony.jdktools" value="${harmony.jdktools}"/>
+            <property name="external.resources" value="${external.resources}"/>
         </ant>
     </target>
 
+    <!-- ================================= 
+          target: clean-tests              
+
+          runs the clean target in build-tests.xml
+         ================================= -->
+    <target name="clean-tests"
+        description="Removes the compiled tests and results" >
+        <echo>
+========================================
+Cleaning compiled tests and results...
+========================================
+        </echo>
+        <ant antfile="make/build-test.xml" inheritall="false" target="clean">
+            <property name="hy.hdk" value="${hy.hdk}"/>
+            <property name="hy.jdk" value="${hy.jdk}"/>
+	    <property name="hy.drlvm" value="${hy.drlvm}"/>
+            <property name="harmony.jdktools" value="${harmony.jdktools}"/>
+            <property name="external.resources" value="${external.resources}"/>
+        </ant>
+    </target>
+
+    <!-- ================================= 
+          target: test              
+
+          runs the test-all target in build-test.xml
+         ================================= -->
     <target name="test"
             description="Runs all tests">
         <echo>
 ========================================
-Testing class libraries...
+Testing jdktools binaries...
 ========================================
 </echo>
-        <ant antfile="make/build-test.xml" inheritall="false" target="test-all"/>
+        <ant antfile="make/build-test.xml" inheritall="false" target="test-all">
+            <property name="hy.hdk" value="${hy.hdk}"/>
+            <property name="hy.jdk" value="${hy.jdk}"/>
+	    <property name="hy.drlvm" value="${hy.drlvm}"/>
+            <property name="harmony.jdktools" value="${harmony.jdktools}"/>
+            <property name="external.resources" value="${external.resources}"/>
+	    <property name="hy.deploy" value="${hy.deploy}"/>
+        </ant>
     </target>
 
 

Modified: harmony/enhanced/jdktools/trunk/make/build-java.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/jdktools/trunk/make/build-java.xml?view=diff&rev=514591&r1=514590&r2=514591
==============================================================================
--- harmony/enhanced/jdktools/trunk/make/build-java.xml (original)
+++ harmony/enhanced/jdktools/trunk/make/build-java.xml Sun Mar  4 23:47:14 2007
@@ -20,7 +20,7 @@
      build-java-source    
      Compile the Java source and package in component archives.
      ====================================================================== -->
-<project name="build-java-source" default="default" basedir="..">
+<project name="build-java-source" default="build" basedir="..">
     <description>
         Compile the Java source and package in component archives.
     </description>
@@ -38,77 +38,30 @@
 
 
     <!-- ================================= 
-          target: default              
-         ================================= -->
-    <target name="default" 
-        description="Compile the Java source and package in component archives." 
-        depends="clean, build" />
-
-    <!-- ================================= 
           target: build
          ================================= -->
-    <target name="build" depends="-layout, -compile"
-            description="Compile Java source and construct deploy directory." />
+    <target name="build" depends="-layout, build-modules"
+            description="Compile Java source in modules and construct deploy directory." />
 
     <!-- ================================= 
           target: clean            
          ================================= -->
-    <target name="clean" depends="-clean-bin, -clean-layout"
-        description="Remove compiled classes and delete the deploy directory."/>
+    <target name="clean" depends="clean-modules, -clean-layout"
+        description="Remove binaries generated by modules and delete the deploy directory."/>
 
-    <!-- ================================= 
-          target: -clean-bin
-          Delete all built classes
+    <!-- =================================
+          target: clean-modules
+          invokes target clean-java for all modules
          ================================= -->
-    <target name="-clean-bin"
-            depends="-modules-clean-bin,
-                     -clean-bin-catch-all-test,
-                     -clean-bin-catch-all"/>
-
-    <target name="-modules-clean-bin">
-        <call-modules target="clean" />
-    </target>
-
-    <target name="-clean-bin-catch-all-test">
-        <!-- without this test the pathconvert in the catch all clean
-             target fails -->
-        <available property="catch.all.required"
-                   file="${build.output}" type="dir" />
-    </target>
-
-    <target name="-clean-bin-catch-all" if="catch.all.required">
-        <fileset id="built.files" dir="${build.output}">
-            <include name="**/**" />
-        </fileset>
-        <pathconvert property="built.files.list"
-                     refid="built.files"
-                     pathsep="${line.separator}" />
-        <condition property="built.files.exist">
-            <not>
-                <equals arg1="${built.files.list}" arg2="" />
-            </not>
-        </condition>
-
-        <delete includeemptydirs="true" failonerror="false">
-            <fileset refid="built.files" />
-        </delete>
-
-<!--        <fail if="built.files.exist">
-...
-
-Built files still exist after module clean targets have run.  This
-probably means that one or more patternsets are incomplete.  The
-remaining files are:
-
-${built.files.list}
-
-        </fail> -->
+    <target name="clean-modules">
+        <call-modules target="clean-java" />
     </target>
 
     <!-- =================================
-          target: -compile
+          target: build-modules
+          invokes target build-java for all modules
          ================================= -->
-    <target name="-compile" depends="-prepare-depends">
+    <target name="build-modules" depends="-prepare-depends">
         <fail message="The Eclipse compiler class for Ant could not be found. Please place the ECJ JAR in ANT_HOME/lib. The JAR can copied from CLASSLIB_TRUNK/depends/jars/ecj_3.2 folder after the fetch-depends target has been run.">
             <condition>
                 <not>
@@ -117,8 +70,7 @@
             </condition>
         </fail>
         <mkdir dir="${build.output}" />
-
-        <call-modules target="build" />
+        <call-modules target="build-java" />
     </target>
 
 
@@ -138,7 +90,6 @@
         <copy todir="${hy.jdk}/lib" flatten="yes">
             <fileset file="${ecj.jar}" />
         </copy>
-
     </target>
 
 
@@ -152,10 +103,10 @@
                 <exclude name="jre/bin/**" />
                 <exclude name="jre/lib/ext/**" />
             </fileset>
-            <fileset dir="${hy.hdk}">
+            <!--fileset dir="${hy.hdk}">
                 <include name="LICENSE" />
                 <include name="NOTICE" />
-            </fileset>
+            </fileset-->
         </delete>
     </target>
 
@@ -167,7 +118,7 @@
 
         <ant antfile="make/depends.xml" inheritall="false" target="check">
             <property name="external.resources" value="${external.resources}"/>
-       </ant>
+        </ant>
     </target>
 
 </project>

Modified: harmony/enhanced/jdktools/trunk/make/build-native.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/jdktools/trunk/make/build-native.xml?view=diff&rev=514591&r1=514590&r2=514591
==============================================================================
--- harmony/enhanced/jdktools/trunk/make/build-native.xml (original)
+++ harmony/enhanced/jdktools/trunk/make/build-native.xml Sun Mar  4 23:47:14 2007
@@ -20,7 +20,7 @@
      build-native-source    
      Compile the native source into component shared libs.
      ====================================================================== -->
-<project name="build-native-source" default="default" basedir="..">
+<project name="build-native-source" default="build" basedir="..">
     <description>
 		Compile the native source into component shared libs.
     </description>
@@ -38,87 +38,55 @@
     <property name="native.lib.target" location="${hy.jdk}/lib" />
 
     <!-- ================================= 
-          target: default              
-         ================================= -->
-    <target name="default" 
-        description="Compile the native source into component shared libs." 
-        depends="clean, build" />
-
-
-    <!-- ================================= 
           target: build
          ================================= -->
     <target name="build"
-        depends=" make-all, layout" />
+        depends="-layout, build-modules" />
 
 
     <!-- ================================= 
           target: clean              
          ================================= -->
     <target name="clean"
-        depends="make-clean, clean-layout" />
+        depends="clean-modules, -clean-layout" />
 
 
-    <!-- This target invokes make on the all target to compile all natives -->
-    <target name="make-all" >
-    	<!-- Create the target directory structure -->
-        <mkdir dir="${hy.jdk}/jre/bin" />
-        <mkdir dir="${hy.jdk}/include" />
-    	<mkdir dir="${native.lib.target}"/>
-    	
-    	<!-- These module targets take care of building and copying
-             their shared libs -->
-    	<ant dir="modules/launcher" antfile="build.xml" target="build-native">
-            <property name="hy.drlvm" value="${hy.drlvm}"/>
-		    <property name="harmony.jdktools" value="${harmony.jdktools}"/>
-		</ant>
-        
-    	<ant dir="modules/jpda" antfile="build.xml" target="build-native">
-            <property name="hy.drlvm" value="${hy.drlvm}"/>
-		    <property name="harmony.jdktools" value="${harmony.jdktools}"/>
-		</ant>
-
-        <ant dir="modules/samsa" antfile="build.xml" target="build-native">
-            <property name="hy.drlvm" value="${hy.drlvm}"/>
-		    <property name="harmony.jdktools" value="${harmony.jdktools}"/>
-		</ant>
+    <!-- ================================= 
+          target: build-modules
+          invokes target build-native for all modules              
+         ================================= -->
+    <target name="build-modules" >
+    	<mkdir dir="${native.lib.target}" />
+        <call-modules target="build-native" />
     </target>
 
 
     <!-- ================================= 
-          target: make-clean              
+          target: clean-modules              
+          invokes target calean-native for all modules              
          ================================= -->
-    <target name="make-clean"
-        depends="-make-clean" />
-
-    <target name="-make-clean">
-    	<ant dir="modules/launcher" antfile="build.xml" target="clean-native">
-            <property name="hy.drlvm" value="${hy.drlvm}"/>
-		    <property name="harmony.jdktools" value="${harmony.jdktools}"/>
-		</ant>
-    	<ant dir="modules/jpda" antfile="build.xml" target="clean-native">
-            <property name="hy.drlvm" value="${hy.drlvm}"/>
-		    <property name="harmony.jdktools" value="${harmony.jdktools}"/>
-		</ant>
+    <target name="clean-modules" >
+        <call-modules target="clean-native" />
     	<delete dir="${native.lib.target}" />
     </target>
 
 
     <!-- ================================= 
-          target: layout              
+          target: -layout              
          ================================= -->
-    <target name="layout" depends="layout.windows"
+    <target name="-layout"
         description="Construct the correct directory structure for native binaries">
-    </target>
 
-    <target name="layout.windows" if="is.windows">
-        <!-- workaround for msdll is removed. -->
+    	<!-- Create the target directory structure -->
+        <mkdir dir="${hy.jdk}/jre/bin" />
+        <mkdir dir="${hy.jdk}/include" />
+    	<mkdir dir="${native.lib.target}"/>
     </target>
 
     <!-- ================================= 
-          target: clean-layout              
+          target: -clean-layout              
          ================================= -->
-    <target name="clean-layout">
+    <target name="-clean-layout">
         <delete includeemptydirs="true" failonerror="false">
             <fileset dir="${hy.jdk}">
                 <include name="**/bin/java${exe.suffix}" />
@@ -128,6 +96,5 @@
             </fileset>
         </delete>
     </target>
-
 
 </project>

Modified: harmony/enhanced/jdktools/trunk/make/build-test.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/jdktools/trunk/make/build-test.xml?view=diff&rev=514591&r1=514590&r2=514591
==============================================================================
--- harmony/enhanced/jdktools/trunk/make/build-test.xml (original)
+++ harmony/enhanced/jdktools/trunk/make/build-test.xml Sun Mar  4 23:47:14 2007
@@ -17,7 +17,7 @@
      limitations under the License.
 -->
 
-<project name="classlib-test" default="test-all" basedir="..">
+<project name="jdktools-test" default="test-all" basedir="..">
 
     <description> Tests for classlib package</description>
 
@@ -30,10 +30,13 @@
     <property name="hy.hdk" location="deploy" />
     <property name="hy.jdk" location="${hy.hdk}/jdk" />
 
+    <condition property="not.copy.jdk">
+        <isset property="test.jre.home"/>
+    </condition>
+    <property name="test.jre.home" location="${hy.jdk}" />
+
     <property name="tests.build.output" location="build/tests" />
-    <property name="tests.support.output" location="build/test_support" />
-    <property name="support.dir" location="support"/>
-    <property name="tests.depends.jars" location="deploy/jdk/jre/lib/boot" />
+    <property name="tests.depends.jars" location="${hy.hdk}/jdk/jre/lib/boot" />
     <property file="make/depends.properties" />
 
     <!-- this list of components to test will grow to eventually be all modules -->
@@ -44,12 +47,12 @@
     <target name="clean">
         <delete dir="${tests.output}" />
         <delete dir="${tests.build.output}" />
-        <delete dir="${tests.support.output}" />
-        <delete file="${hy.hdk}/build/test/support.jar" />
     </target>
 
-    <target name="test-modules" depends="support-jar">
-        <call-modules target="-test-module" />
+    <target name="test-modules" depends="copy-jre" >
+        <mkdir dir="${tests.output}" />
+        <mkdir dir="${tests.build.output}" />
+        <call-modules target="test-module" />
     </target>
 
     <target name="gen-report" depends="full-report,short-report" />
@@ -81,49 +84,6 @@
         <echo message="The short test report is in ${display-location}"/>
     </target>
 
-    <target name="support-jar" depends="compile-support">
-        <mkdir dir="${hy.hdk}/build/test" />
-        <jar destfile="${hy.hdk}/build/test/support.jar"
-             manifest="support/META-INF/MANIFEST.MF">
-            <fileset dir="${tests.support.output}" />
-        </jar>
-    </target>
-
-    <target name="compile-support" depends="copy-test-resources, check-support-jars"
-            description="Compile the unit test source">
-        <fail message="The Eclipse compiler class for Ant could not be found. Please place the ECJ JAR in ANT_HOME/lib. The JAR can copied from CLASSLIB_TRUNK/depends/jars/ecj_3.2 folder after the fetch-depends target has been run.">
-            <condition>
-                <not>
-                    <available classname="org.eclipse.jdt.core.JDTCompilerAdapter"/>
-                </not>
-            </condition>
-        </fail>
-        <mkdir dir="${tests.support.output}" />
-        <javac 
-               destdir="${tests.support.output}"
-               compiler="${hy.javac.compiler}"
-               memoryMaximumSize="${hy.javac.maxmem}"
-               source="${hy.javac.source}" 
-               target="${hy.javac.target}"
-               debug="${hy.javac.debug}">
-
-            <src path="${support.dir}/src/test/java" />
-            <classpath location="${junit.jar}" />
-            <classpath location="${tests.support.output}" />
-            <classpath>
-                <fileset dir="${jetty.dir}">
-                    <include name="*.jar" />
-                </fileset>
-            </classpath>
-            <bootclasspath>
-                <fileset dir="${tests.depends.jars}">
-                    <include name="**/*.jar" />
-                </fileset>
-            </bootclasspath>
-        </javac>
-        
-    </target>
-    
     <target name="check-test-result">
         <available property="test.errors"
                    file="${tests.output}/test.errors" />
@@ -133,119 +93,10 @@
         <fail if="test.failures" message="There were test failures." />
     </target>
 
-    <!-- ================================= 
-          target: copy-test-resources              
-         ================================= -->
-    <target name="copy-test-resources"
-            description="Copy non-Java files from test support tree to the support output tree">
-
-        <mkdir dir="${tests.support.output}" />
-        <copy todir="${tests.support.output}" includeemptydirs="false">
-            <fileset dir="${support.dir}/src/test/java">
-                <exclude name="**/*.java" />
-            </fileset>
-            <fileset file="${support.dir}/src/test/resources/hyts_Foo.c"/>
+    <target name="copy-jre" unless="not.copy.jre">
+        <copy todir="${hy.jdk}/jre" overwrite="no">
+              <fileset dir="${hy.deploy}/jdk/jre" />
         </copy>
-    </target>
-
-    <target name="check-support-jars"
-            description="Check for jars required to compile and run unit tests">
-
-      <ant antfile="make/depends.xml" inheritall="false" target="check"/>
-
-    </target>
-
-    <target name="run-tests" description="Run JUnit tests">
-        <!-- The location of the Harmony launcher can be overridden by 
-             the "harmony.vm.exe" property. Default value of property
-             is set assuming it is under the deploy tree -->
-        <property name="harmony.vm.exe" location="${hy.jdk}/jre/bin/java"/>
-        
-        <!-- Delete "junitCompleted" - an empty file that can be used to
-             check that the junit test VM does not exit prematurely -->
-        <delete file="${user.home}/junitCompleted" failonerror="false" />
-
-        <path id="classpath.id" location="${tests.build.output}" />
-        
-        <java classname="tests.main.AllTests"
-              fork="true"
-              jvm="${harmony.vm.exe}">
-            
-
-            <!-- Required by various tests that set security manager etc -->
-            <jvmarg value="-Djava.security.policy=${support.dir}/src/test/resources/config/testing.policy" />
-
-            <!-- Required for running the java.net unit tests -->
-            <jvmarg value="-Dtest.ini.file=${support.dir}/src/test/resources/config/localhosttest.ini" />
-
-            <!-- Required if using the test excluder decorator -->
-            <jvmarg value="-Dexcludes.file.uri=file:///${support.dir}/src/test/resources/config/jcltest-excludes.xml" />
-            
-            <classpath>
-                <path refid="classpath.id" />
-                <pathelement location="${junit.jar}" />
-            </classpath>
-        </java>
-    </target>
-
-    
-    <!-- ================================= 
-          target: run-tests-with-junit-task
-         ================================= -->
-    <target name="run-tests-with-junit-task" description="Run JUnit tests">
-        <!-- The location of the Harmony launcher can be overridden by 
-             the "harmony.vm.exe" property. Default value of property
-             is set assuming it is under the deploy tree -->
-        <property name="harmony.vm.exe" location="${hy.jdk}/jre/bin/java"/>
-
-        <!-- Delete "junitCompleted" - an empty file that can be used to
-             check that the junit test VM does not exit prematurely -->
-        <delete file="${user.home}/junitCompleted" failonerror="false" />
-
-        <path id="classpath.id" location="${tests.build.output}" />
-        
-        <junit fork="true"
-               forkmode="once"
-               jvm="${harmony.vm.exe}"
-               errorproperty="tests.failed"
-               failureproperty="tests.failed">
-
-            <env key="LD_LIBRARY_PATH" value="" />
-            <!-- required to be unset on Linux -->
-
-            <!-- Required by various tests that set security manager etc -->
-            <jvmarg value="-Djava.security.policy=${support.dir}/src/test/resources/config/testing.policy" />
-
-            <!-- Required for running the java.net unit tests -->
-            <jvmarg value="-Dtest.ini.file=${support.dir}/src/test/resources/config/localhosttest.ini" />
-
-            <!-- Required if using the test excluder decorator -->
-            <jvmarg value="-Dexcludes.file.uri=file:///${support.dir}/src/test/resources/config/jcltest-excludes.xml" />
-            
-            <classpath>
-                <path refid="classpath.id" />
-                <pathelement location="${junit.jar}" />
-            </classpath>
-            
-            <formatter type="plain" usefile="false" />
-            <formatter type="xml" />
-            
-            <test todir="${tests.results.dir}" name="tests.main.AllTests" />
-        </junit>
-
-        <fail if="tests.failed" message="Some Tests Failed !" />
-
-        <!-- if the junit test process completed as expected, this file
-             should now exist -->
-        <fail message="JUnit task ended prematurely - Hint: This may have been caused by the test VM terminating unexpectedly during the test run">
-            <condition>
-                <not>
-                    <available file="${user.home}/junitCompleted" />
-                </not>
-            </condition>
-        </fail>
-        <!-- Clean up after ourselves -->
-        <delete file="${user.home}/junitCompleted" />
     </target>
 
 </project>

Modified: harmony/enhanced/jdktools/trunk/make/depends.properties
URL: http://svn.apache.org/viewvc/harmony/enhanced/jdktools/trunk/make/depends.properties?view=diff&rev=514591&r1=514590&r2=514591
==============================================================================
--- harmony/enhanced/jdktools/trunk/make/depends.properties (original)
+++ harmony/enhanced/jdktools/trunk/make/depends.properties Sun Mar  4 23:47:14 2007
@@ -15,9 +15,15 @@
 
 depends.dir=${external.resources}/depends
 depends.jars=${depends.dir}/jars
+mirror.base=http://mirrors.ibiblio.org/pub/mirrors/maven2
 
 ecj.dir=${depends.jars}/ecj_3.2
 ecj.jar=${ecj.dir}/ecj_3.2.jar
 ecj.url=http://download.eclipse.org/eclipse/downloads/drops/R-3.2-200606291905/ecj.jar
 ecj.md5=633e14a4dc14ca578b5548c3c088172f
+
+junit.dir=${depends.jars}/junit_3.8.2
+junit.jar=${junit.dir}/junit.jar
+junit.url=${mirror.base}/junit/junit/3.8.2/junit-3.8.2.jar
+junit.md5=28e7eb9eeefe31a657c68755bfccc541
 

Modified: harmony/enhanced/jdktools/trunk/make/depends.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/jdktools/trunk/make/depends.xml?view=diff&rev=514591&r1=514590&r2=514591
==============================================================================
--- harmony/enhanced/jdktools/trunk/make/depends.xml (original)
+++ harmony/enhanced/jdktools/trunk/make/depends.xml Sun Mar  4 23:47:14 2007
@@ -33,6 +33,7 @@
 
     <target name="-check">
         <check-one-file src="${ecj.url}" dest="${ecj.jar}" />
+        <check-one-file src="${junit.url}" dest="${junit.jar}" />
     </target>
 
     <target name="download" description="Download required jars"
@@ -44,6 +45,10 @@
     <download-one-file src="${ecj.url}" dest="${ecj.jar}"
                            md5="${ecj.md5}" />
         
+    <mkdir dir="${junit.dir}" />
+    <download-one-file src="${junit.url}" dest="${junit.jar}"
+                           md5="${junit.md5}" />
+
     </target>
 
 

Modified: harmony/enhanced/jdktools/trunk/make/properties.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/jdktools/trunk/make/properties.xml?view=diff&rev=514591&r1=514590&r2=514591
==============================================================================
--- harmony/enhanced/jdktools/trunk/make/properties.xml (original)
+++ harmony/enhanced/jdktools/trunk/make/properties.xml Sun Mar  4 23:47:14 2007
@@ -60,8 +60,6 @@
 
     <property name="hy.os" value="${os.name}" />
 
-
-
     <!-- Conditions for different architectures -->
     <condition property="is.x86_64">
         <or>
@@ -160,6 +158,7 @@
 
     <!-- default property for call-modules macro - i.e. all modules -->
     <property name="build.module" value="*" />
+    <property name="exclude.module" value="nothing" />
 
     <target name="echo" depends="svn-prop, svn-info"
             description="Display the properties defined by this ant file" >
@@ -265,10 +264,11 @@
         <attribute name="target" />
         <sequential>
             <subant target="@{target}">
-                <dirset dir="modules" includes="${build.module}" excludes="jpda"/>
+                <dirset dir="modules" includes="${build.module}" excludes="${exclude.module}" />
             </subant>
         </sequential>
     </macrodef>
+
 
     <!-- macros for modules -->
     <!-- TOFIX move to a shared file in the HDK/build/make directory. -->

Modified: harmony/enhanced/jdktools/trunk/modules/jpda/build.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/jdktools/trunk/modules/jpda/build.xml?view=diff&rev=514591&r1=514590&r2=514591
==============================================================================
--- harmony/enhanced/jdktools/trunk/modules/jpda/build.xml (original)
+++ harmony/enhanced/jdktools/trunk/modules/jpda/build.xml Sun Mar  4 23:47:14 2007
@@ -21,6 +21,7 @@
 
     <!-- import common properties -->
     <property name="hy.hdk" location="${basedir}/../../deploy" />
+    <property name="tests.build.output" location="../../build/tests" />
     <import file="../../make/properties.xml" />
 
     <!-- set global properties for this build. -->
@@ -28,11 +29,29 @@
     
     <property file="../../make/depends.properties" />
 
-    <target name="build"/>
+    <target name="build" depends="build-java, build-native" />
+
+    <target name="clean" depends="clean-java, clean-native" />
+
+    <target name="test" depends="test-module">
+        <fail message="Some tests failed">
+            <condition>
+                <or>
+                    <isset property="test.failures" />
+                    <isset property="test.errors" />
+                </or>
+            </condition>
+        </fail>
+    </target>
+
+    <!-- Build Java code -->
+    <target name="build-java"/>
 
     <!-- Build native code -->
     <target name="build-native">
         
+        <echo message="Compiling JPDA natives" />
+
         <!-- Build agent shared lib -->
         <make dir="${hy.jpda.src.main.native}/jdwp/${hy.os}/agent" />
         
@@ -47,143 +66,80 @@
         </copy>
     </target>
 
+    <!-- internal target for local and global test run sequence -->
+    <target name="test-module" depends="build-tests, run-tests" />
+
+    <!-- Clean Java -->
+    <target name="clean-java"/>
 
     <!-- Clean natives -->
     <target name="clean-native">
+        <echo message="Cleaning JPDA natives" />
         <make dir="${hy.jpda.src.main.native}/jdwp/${hy.os}/agent" target="clean" />
         <make dir="${hy.jpda.src.main.native}/jdwp/${hy.os}/transport" target="clean" />
     </target>
 
-    <target name="test" depends="-test-module">
-        <fail message="Some tests failed">
-            <condition>
-                <or>
-                    <isset property="test.failures" />
-                    <isset property="test.errors" />
-                </or>
-            </condition>
-        </fail>
-    </target>
-
-    <!-- internal target for local and global test run sequence -->
-    <target name="-test-module" depends="build, compile-tests, run-tests" />
-
-    <target name="clean">
-        <delete file="${hy.jdk}/jre/lib/boot/luni.jar" />
-        <delete file="${hy.jdk}/jre/lib/boot/luni-src.jar" />
-        <delete failonerror="false">
-            <fileset refid="classes" />
-            <fileset dir="${hy.luni.bin.test}" />
-        </delete>
-        <antcall target="clean-native-includes" />
-    </target>
-
-    <target name="clean-native-includes">
-        <delete failonerror="false">
-            <fileset dir="${hy.hdk}/include">
-                <include name="vmi.h" />
-                <include name="hyvmls.h" />
-                <include name="jclprots.h" />
-                <include name="hysocket.h" />
-                <include name="gp.h" />
-                <include name="iohelp.h" />
-                <include name="exceptions.h" />
-                <include name="libglob.h" />
-                <include name="fdlibm.h" />
-                <include name="hymagic.h" />
-                <include name="jsig.h" />
-            </fileset>
-        </delete>
-        <delete failonerror="false">
-            <fileset dir="${hy.jdk}/include">
-                <include name="jni.h" />
-                <include name="jniport.h" />
-                <include name="jvmti.h" />
-            </fileset>
-        </delete>
-    </target>
-
-    <target name="compile-java">
-        <echo message="Compiling LUNI classes" />
-
-        <javac sourcepath=""
-               srcdir="${hy.luni.src.main.java}"
-               destdir="${hy.build}"
-               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>
+    <!-- Compile JDWP tests always with debug info included -->
+    <target name="build-tests" >
+        <echo message="Compiling JPDA tests" />
+
+        <mkdir dir="${tests.build.output}/classes" />
+        <javac
+            srcdir="${hy.jpda.src.test}"
+            destdir="${tests.build.output}/classes"
+            sourcepath=""
+            compiler="${hy.javac.compiler}"
+            memoryMaximumSize="${hy.javac.maxmem}"
+            source="${hy.javac.source}" 
+            target="${hy.javac.target}"
+            debug="on">
+
+            <classpath>
+                <pathelement path="${tests.build.output}/classes"/>
+                <pathelement path="${junit.jar}"/>
+            </classpath>
         </javac>
     </target>
 
-    <target name="build-jar" depends="svn-info">
-        <jar destfile="${hy.jdk}/jre/lib/boot/luni.jar"
-             manifest="${hy.luni}/META-INF/MANIFEST.MF">
-            <fileset refid="classes" />
-            <manifest>
-                <attribute name="Implementation-Version" value="${svn.info}"/>
-            </manifest>
-            
-            <metainf file="${hy.hdk}/NOTICE"/>
-            <metainf file="${hy.hdk}/LICENSE"/>            
-        </jar>
-
-        <jar destfile="${hy.jdk}/jre/lib/boot/luni-src.jar">
-            <fileset dir="${hy.luni.src.main.java}" />
-            <manifest>
-                <attribute name="Implementation-Version" value="${svn.info}"/>
-            </manifest>
-            
-            <metainf file="${hy.hdk}/NOTICE"/>
-            <metainf file="${hy.hdk}/LICENSE"/>            
-        </jar>
-    </target>
-
-    <target name="compile-tests" depends="copy-test-resources">
-        <compile-tests description="JUnit Tests" destdir="${hy.luni.bin.test}">
-            <javac-elements>
-                <src>
-                    <pathelement location="${hy.luni.src.test}/java"/>
-                </src>
-                <include name="**/*.java" />
-            </javac-elements>
-        </compile-tests>
-    </target>
-
-    <target name="run-tests">
-        <run-tests description="JUnit Tests">
-            <junit-elements>
-                <classpath>
-                    <pathelement path="${hy.luni.bin.test}"/>
-                    <pathelement path="${hy.luni.src.test.resources}"/>
-                    <pathelement path="../../build/tests"/>
-                    <pathelement path="${hy.hdk}/build/test/support.jar" />
-                </classpath>
-                <!-- Required by various tests that set security manager etc -->
-                <jvmarg value="-Djava.security.policy=../../support/src/test/resources/config/testing.policy" />
-
-                <!-- Required for running the java.net unit tests -->
-                <jvmarg value="-Dtest.ini.file=../../support/src/test/resources/config/localhosttest.ini" />
-
-
-                <batchtest todir="${hy.tests.reports}" haltonfailure="no" unless="test.case">
-                    <fileset dir="${hy.luni.src.test}/java">
-                        <include name="**/*Test.java"/>
-                        <excludesfile name="${exclude.file}" />
-                    </fileset>
-                </batchtest>
+    <target name="run-tests" depends="build-tests">
 
-            </junit-elements>
-        </run-tests>
+        <property name="test.jre.home" value="${hy.jdk}/jre" />
+        <property name="test.jre.jvm" value="${test.jre.home}/bin/java" />
+        <property name="test.debugger.jvm" value="${test.jre.jvm}" />
+        <property name="test.debuggee.jvm" value="${test.jre.jvm}" />
+
+        <echo message="Running JPDA tests" />
+        <echo message="  Debugger JVM=${test.debugger.jvm}" />
+        <echo message="  Debuggee JVM=${test.debuggee.jvm}" />
+
+        <mkdir dir="${hy.tests.reports}" />
+
+        <junit fork="yes"
+                       forkmode="${hy.test.forkmode}"
+                       timeout="${hy.test.timeout}"
+                       printsummary="withOutAndErr"
+                       errorproperty="test.errors"
+                       failureproperty="test.failures"
+                       showoutput="off"
+                       dir="${hy.tests.reports}"
+                       jvm="${test.debugger.jvm}">
+
+            <classpath>
+                <pathelement path="${tests.build.output}/classes"/>
+            </classpath>
+
+            <jvmarg value="-Djpda.settings.debuggeeJavaPath=${test.debuggee.jvm}" />
+
+            <formatter type="xml" />
+
+            <test name="${test.case}" todir="${hy.tests.reports}" if="test.case" />
+
+            <batchtest todir="${hy.tests.reports}" haltonfailure="off" unless="test.case">
+                <fileset dir="${hy.jpda.src.test}">
+                    <include name="**/*Test.java"/>
+                </fileset>
+            </batchtest>
+        </junit>
 
         <antcall target="touch-failures-file" />
         <antcall target="touch-errors-file" />
@@ -191,89 +147,12 @@
 
     <target name="touch-failures-file" if="test.failures">
         <echo file="${hy.tests.reports}/test.failures"
-            append="true">luni${line.separator}</echo>
+            append="true">jpda${line.separator}</echo>
     </target>
 
     <target name="touch-errors-file" if="test.errors">
         <echo file="${hy.tests.reports}/test.errors"
-            append="true">luni${line.separator}</echo>
-    </target>
-
-    <target name="copy-resources">
-        <mkdir dir="${hy.build}" />
-        <copy todir="${hy.build}" includeemptydirs="false">
-            <fileset dir="${hy.luni.src.main.java}">
-                <exclude name="**/*.java" />
-            </fileset>
-        </copy>
-    </target>
-
-    <target name="copy-test-resources">
-        <mkdir dir="${hy.luni.bin.test}" />
-        <copy todir="${hy.luni.bin.test}" includeemptydirs="false">
-            <fileset dir="${hy.luni.src.test.resources}">
-                <exclude name="**/*.java" />
-            </fileset>
-        </copy>
+            append="true">jpda${line.separator}</echo>
     </target>
 
-    <macrodef name="compile-tests">
-        <attribute name="description" default="" />
-        <attribute name="destdir"  />
-        <element name="javac-elements" />
-        <sequential>
-            <echo message="Compiling LUNI @{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}">
-
-                <compilerarg line="${build.compilerarg}" />
-
-                <javac-elements />
-
-                <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 LUNI @{description}" />
-
-            <mkdir dir="${hy.tests.reports}" />
-
-            <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">
-
-                <junit-elements />
-
-                <formatter type="xml" />
-
-                <test name="${test.case}" todir="${hy.tests.reports}" if="test.case" />
-            </junit>
-        </sequential>
-    </macrodef>
 </project>

Modified: harmony/enhanced/jdktools/trunk/modules/jpda/make/hyproperties.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/jdktools/trunk/modules/jpda/make/hyproperties.xml?view=diff&rev=514591&r1=514590&r2=514591
==============================================================================
--- harmony/enhanced/jdktools/trunk/modules/jpda/make/hyproperties.xml (original)
+++ harmony/enhanced/jdktools/trunk/modules/jpda/make/hyproperties.xml Sun Mar  4 23:47:14 2007
@@ -26,7 +26,7 @@
             <native location="src/main/native" />
         	<resources location="src/main/resources" />
          </main>
-         <test location="src/test">
+         <test location="test/common/unit">
             <resources location="src/test/resources" />
          </test>
          <natives location="src/natives" />
@@ -40,6 +40,8 @@
       </packaging>
    </jpda>
 
+   <hdk location="../../deploy" />
+   <jdk location="../../deploy/jdk" />
    <build location="../../build/classes" />
 
    <tests>

Modified: harmony/enhanced/jdktools/trunk/modules/jpda/src/main/native/jdwp/linux/agent/makefile
URL: http://svn.apache.org/viewvc/harmony/enhanced/jdktools/trunk/modules/jpda/src/main/native/jdwp/linux/agent/makefile?view=diff&rev=514591&r1=514590&r2=514591
==============================================================================
--- harmony/enhanced/jdktools/trunk/modules/jpda/src/main/native/jdwp/linux/agent/makefile (original)
+++ harmony/enhanced/jdktools/trunk/modules/jpda/src/main/native/jdwp/linux/agent/makefile Sun Mar  4 23:47:14 2007
@@ -26,7 +26,7 @@
 CMNAGENT=$(COMMON)agent/
 
 CFLAGS = -O1 $(HY_CFLAGS) -D_DEBUG -DLINUX -D_REENTRANT -DIPv6_FUNCTION_SUPPORT \
-         $(VMDEBUG) -I$(HY_HDK)/include -I$(HY_DRLVM)/jdk/include -I. \
+         $(VMDEBUG) -I$(HY_HDK)/jdk/include -I. \
          -I$(CMNAGENT)commands   -I$(CMNAGENT)core \
          -I$(COMMON)generic -Icore
 

Modified: harmony/enhanced/jdktools/trunk/modules/jpda/src/main/native/jdwp/linux/transport/makefile
URL: http://svn.apache.org/viewvc/harmony/enhanced/jdktools/trunk/modules/jpda/src/main/native/jdwp/linux/transport/makefile?view=diff&rev=514591&r1=514590&r2=514591
==============================================================================
--- harmony/enhanced/jdktools/trunk/modules/jpda/src/main/native/jdwp/linux/transport/makefile (original)
+++ harmony/enhanced/jdktools/trunk/modules/jpda/src/main/native/jdwp/linux/transport/makefile Sun Mar  4 23:47:14 2007
@@ -27,7 +27,7 @@
 CMNTRANS=$(COMMON)transport/
 
 CFLAGS = -O1 $(HY_CFLAGS) -D_DEBUG -DLINUX -D_REENTRANT -DIPv6_FUNCTION_SUPPORT \
-         $(VMDEBUG) -I$(HY_HDK)/include -I$(HY_DRLVM)/jdk/include -I. \
+         $(VMDEBUG) -I$(HY_HDK)/jdk/include -I. \
          -I$(CMNTRANS)common   -I$(CMNTRANS)dt_socket \
          -I$(COMMON)generic -Idt_socket
                   

Modified: harmony/enhanced/jdktools/trunk/modules/jpda/src/main/native/jdwp/windows/agent/makefile
URL: http://svn.apache.org/viewvc/harmony/enhanced/jdktools/trunk/modules/jpda/src/main/native/jdwp/windows/agent/makefile?view=diff&rev=514591&r1=514590&r2=514591
==============================================================================
--- harmony/enhanced/jdktools/trunk/modules/jpda/src/main/native/jdwp/windows/agent/makefile (original)
+++ harmony/enhanced/jdktools/trunk/modules/jpda/src/main/native/jdwp/windows/agent/makefile Sun Mar  4 23:47:14 2007
@@ -31,7 +31,7 @@
 
 HYCFLAGS = \
          -GX -wd4290 \
-         -I$(HY_DRLVM)\jdk\include -I. \
+         -I$(HY_HDK)\jdk\include -I. \
          -I$(CMNAGENT)commands   -I$(CMNAGENT)core \
          -I$(COMMON)generic -Icore $(HYCFLAGS)
 

Modified: harmony/enhanced/jdktools/trunk/modules/jpda/src/main/native/jdwp/windows/transport/makefile
URL: http://svn.apache.org/viewvc/harmony/enhanced/jdktools/trunk/modules/jpda/src/main/native/jdwp/windows/transport/makefile?view=diff&rev=514591&r1=514590&r2=514591
==============================================================================
--- harmony/enhanced/jdktools/trunk/modules/jpda/src/main/native/jdwp/windows/transport/makefile (original)
+++ harmony/enhanced/jdktools/trunk/modules/jpda/src/main/native/jdwp/windows/transport/makefile Sun Mar  4 23:47:14 2007
@@ -32,7 +32,7 @@
 
 HYCFLAGS = $(HYCFLAGS) \
          -GX -wd4290 \
-         -I$(HY_HDK)\include -I$(HY_DRLVM)\jdk\jre\include -I. \
+         -I$(HY_HDK)\jdk\include -I. \
          -I$(CMNTRANS)common   -I$(CMNTRANS)dt_socket \
          -I$(COMMON)generic -Idt_socket
 

Modified: harmony/enhanced/jdktools/trunk/modules/launcher/build.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/jdktools/trunk/modules/launcher/build.xml?view=diff&rev=514591&r1=514590&r2=514591
==============================================================================
--- harmony/enhanced/jdktools/trunk/modules/launcher/build.xml (original)
+++ harmony/enhanced/jdktools/trunk/modules/launcher/build.xml Sun Mar  4 23:47:14 2007
@@ -28,12 +28,21 @@
 
     <property file="../../make/depends.properties" />
 
-    <target name="build-native" depends="build"/>
-    <target name="clean-native" depends="clean"/>
+    <target name="build" depends="build-native"/>
+    <target name="build-java"/>
 
-    <target name="build" >
+    <target name="clean" depends="clean-native"/>
+    <target name="clean-java"/>
 
-        <echo>Launcher : ${hy.drlvm}  ${harmony.jdktools} </echo>
+    <target name="test" depends="test-module" />
+    <target name="build-tests" />
+    <target name="test-module" depends="run-tests" />
+
+    <target name="build-native" >
+
+        <echo message="Compiling LAUNCHER natives" />
+        <echo message="hy.drlvm=${hy.drlvm}" />
+        <echo message="harmony.jdktools=${harmony.jdktools}" />
             
         <!-- Build launcher executables -->
         <make dir="${hy.luni.src.main.native}/launcher/${hy.os}" />
@@ -49,15 +58,35 @@
         <!-- Make sure the Linux launcher has execute permission -->
         <chmod file="${hy.jdk}/jre/bin/java${exe.suffix}" perm="ugo+x" />
 
-    </target>
+      </target>
+
+      <target name="run-tests" >
+
+          <property name="test.jre.home" value="${hy.jdk}/jre" />
+
+          <echo message="Running LAUNCHER tests" />
+          <echo message="test.jre.home=${test.jre.home}" />
+
+          <echo message="Run 'java -version' in ${hy.tests.reports}" />
+          <exec failonerror="true"
+                 executable="${test.jre.home}/bin/java${exe.suffix}"
+                        dir="${hy.tests.reports}">
+              <arg line="-version" />
+          </exec>
+      </target>
 
     <!-- Clean natives -->
-    <target name="clean">
-        <echo>
-Cleaning launcher natives
-        </echo>
+    <target name="clean-native" depends="clean-jre">
+        <echo message="Cleaning LAUNCHER natives" />
         <make dir="${hy.luni.src.main.native}/launcher/${hy.os}"
               target="clean" />
+    </target>
+
+    <target name="clean-jre" unless="is.hdk-build">
+        <delete includeEmptyDirs="true" failonerror="false">
+            <fileset dir="${hy.jdk}/jre/bin" includes="**/*" />
+            <fileset dir="${hy.jdk}/jre/lib" />
+        </delete>
     </target>
 
 </project>

Modified: harmony/enhanced/jdktools/trunk/modules/samsa/build.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/jdktools/trunk/modules/samsa/build.xml?view=diff&rev=514591&r1=514590&r2=514591
==============================================================================
--- harmony/enhanced/jdktools/trunk/modules/samsa/build.xml (original)
+++ harmony/enhanced/jdktools/trunk/modules/samsa/build.xml Sun Mar  4 23:47:14 2007
@@ -28,12 +28,21 @@
 
     <property file="../../make/depends.properties" />
 
-    <target name="build-native" depends="build"/>
-    <target name="clean-native" depends="clean"/>
+    <target name="build" depends="build-native"/>
+    <target name="build-java"/>
 
-    <target name="build" >
+    <target name="clean" depends="clean-native"/>
+    <target name="clean-java"/>
 
-        <echo>Launcher : ${hy.drlvm}  ${harmony.jdktools} </echo>
+    <target name="test" depends="test-module" />
+    <target name="build-tests" />
+    <target name="test-module" depends="run-tests" />
+
+    <target name="build-native" >
+
+        <echo message="Compiling SAMSA natives" />
+        <echo message="hy.drlvm=${hy.drlvm}" />
+        <echo message="harmony.jdktools=${harmony.jdktools}" />
             
         <!-- Build launcher executables -->
         <make dir="${hy.samsa.src.main.native}/samsa/${hy.os}" />
@@ -70,11 +79,24 @@
 
     </target>
 
+    <target name="run-tests" >
+
+        <property name="test.jre.home" value="${hy.jdk}/jre" />
+
+        <echo message="Running SAMSA tests" />
+        <echo message="test.jre.home=${test.jre.home}" />
+
+        <echo>Run javac in ${hy.tests.reports} - EXCLUDED</echo>
+        <!--exec failonerror="true"
+		                  executable="${test.jre.home}/../bin/javac${exe.suffix}"
+		                  dir="${hy.tests.reports}">
+		                <arg line="" />
+        </exec-->
+    </target>
+
     <!-- Clean natives -->
-    <target name="clean">
-        <echo>
-Cleaning launcher natives
-        </echo>
+    <target name="clean-native">
+        <echo message="Cleaning SAMSA natives" />
         <make dir="${hy.samsa.src.main.native}/samsa/${hy.os}"
               target="clean" />
     </target>

Modified: harmony/enhanced/jdktools/trunk/modules/tools/build.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/jdktools/trunk/modules/tools/build.xml?view=diff&rev=514591&r1=514590&r2=514591
==============================================================================
--- harmony/enhanced/jdktools/trunk/modules/tools/build.xml (original)
+++ harmony/enhanced/jdktools/trunk/modules/tools/build.xml Sun Mar  4 23:47:14 2007
@@ -21,7 +21,9 @@
 
     <!-- import common properties -->
     <property name="hy.hdk" location="${basedir}/../../deploy" />
+    <property name="tests.build.output" location="../../build/tests" />
     <import file="${basedir}/../../make/properties.xml" />
+    <property file="${basedir}/../../make/depends.properties" />
 
     <!-- set global properties for this build. -->
     <xmlproperty file="make/hyproperties.xml" semanticAttributes="true" />
@@ -37,9 +39,14 @@
         </or>
     </fileset>
 
-    <target name="build" depends="compile-java, copy-resources, build-jar" />
+    <target name="build" depends="build-java, copy-resources, build-jar" />
+    <target name="build-java" depends="compile-java, copy-resources, build-jar" />
+    <target name="build-native" />
 
-    <target name="test" depends="-test-module">
+    <target name="clean" depends="clean-java" />
+    <target name="clean-native" />
+
+    <target name="test" depends="test-module">
         <fail message="Some tests failed">
             <condition>
                 <or>
@@ -51,14 +58,17 @@
     </target>
 
     <!-- internal target for local and global test run sequence -->
-    <target name="-test-module" depends="build, compile-tests, run-tests" />
+    <target name="test-module" depends="build-tests, run-tests" />
+
+    <target name="clean-java">
+        <echo message="Cleaning TOOLS classes" />
 
-    <target name="clean">
         <delete file="${hy.jdk}/lib/tools.jar" />
         <delete file="${hy.jdk}/lib/tools-src.jar" />
-        <delete failonerror="false">
-            <fileset refid="classes" />
-            <fileset dir="${hy.tools.bin.test}" />
+        <delete includeemptydirs="true" failonerror="false">
+            <!--fileset refid="classes" /-->
+            <fileset dir="${hy.build}" />
+            <fileset dir="${tests.build.output}/classes" />
         </delete>
     </target>
 
@@ -122,13 +132,13 @@
         </jar>
     </target>
 
-    <target name="compile-tests">
-        <echo message="Compiling Tools tests" />
+    <target name="build-tests">
+        <echo message="Compiling TOOLS tests" />
 
-        <mkdir dir="${hy.tools.bin.test}" />
+        <mkdir dir="${tests.build.output}/classes" />
 
         <javac srcdir="${hy.tools.src.test.java}"
-               destdir="${hy.tools.bin.test}"
+               destdir="${tests.build.output}/classes"
                sourcepath=""
                compiler="${hy.javac.compiler}"
                memoryMaximumSize="${hy.javac.maxmem}"
@@ -137,23 +147,30 @@
                debug="${hy.javac.debug}">
 
             <bootclasspath>
-                <fileset dir="${hy.jdk}/jre/lib/boot">
-                    <include name="**/*.jar" />
-                </fileset>
-                <fileset dir="${hy.jdk}/lib">
+                <fileset dir="${hy.hdk}/jdk/jre/lib/boot">
                     <include name="**/*.jar" />
                 </fileset>
             </bootclasspath>
-            <classpath location="../../build/tests" />
+            <classpath>
+                <pathelement path="${hy.jdk}/lib/tools.jar"/>
+                <pathelement path="${junit.jar}"/>
+            </classpath>
+            <classpath location="${tests.build.output}/classes" />
+
+            <!-- temporarely exclude one test that breaks compilation -->
+            <exclude name="**/javah/Test02.java"/>
         </javac>
     </target>
 
-    <target name="run-tests">
-
-        <mkdir dir="${hy.tests.reports}" />
+    <target name="run-tests" depends="build-tests">
 
         <property name="test.jre.home" value="${hy.jdk}/jre" />
 
+        <echo message="Running TOOLS tests" />
+        <echo message="test.jre.home=${test.jre.home}" />
+
+        <mkdir dir="${hy.tests.reports}" />
+
         <junit fork="yes"
                        forkmode="${hy.test.forkmode}"
                        timeout="${hy.test.timeout}"
@@ -161,14 +178,13 @@
                        errorproperty="test.errors"
                        failureproperty="test.failures"
                        showoutput="on"
-                       dir="${basedir}"
+                       dir="${hy.tests.reports}"
                        jvm="${test.jre.home}/bin/java">
 
             <classpath>
-                <pathelement path="${hy.tools.bin.test}"/>
+                <pathelement path="${tests.build.output}/classes"/>
                 <pathelement path="${hy.jdk}/lib/tools.jar"/>
             </classpath>
-            <classpath location="../../build/tests" />
 
             <formatter type="xml" />
 



Mime
View raw message