You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by py...@apache.org on 2006/08/04 08:28:07 UTC

svn commit: r428642 - in /incubator/harmony/enhanced/classlib/trunk/modules/instrument: ./ META-INF/ make/ src/ src/main/ src/main/java/ src/main/java/java/ src/main/java/java/lang/ src/main/java/java/lang/instrument/ src/test/ src/test/java/ src/test/...

Author: pyang
Date: Thu Aug  3 23:28:06 2006
New Revision: 428642

URL: http://svn.apache.org/viewvc?rev=428642&view=rev
Log:
Fix for HARMONY-1052 ([classlib][instrument]create new instrument module)

Added:
    incubator/harmony/enhanced/classlib/trunk/modules/instrument/   (with props)
    incubator/harmony/enhanced/classlib/trunk/modules/instrument/.classpath
    incubator/harmony/enhanced/classlib/trunk/modules/instrument/.project
    incubator/harmony/enhanced/classlib/trunk/modules/instrument/META-INF/
    incubator/harmony/enhanced/classlib/trunk/modules/instrument/META-INF/MANIFEST.MF
    incubator/harmony/enhanced/classlib/trunk/modules/instrument/build.xml
    incubator/harmony/enhanced/classlib/trunk/modules/instrument/make/
    incubator/harmony/enhanced/classlib/trunk/modules/instrument/make/hyproperties.xml
    incubator/harmony/enhanced/classlib/trunk/modules/instrument/make/patternset.txt
    incubator/harmony/enhanced/classlib/trunk/modules/instrument/src/
    incubator/harmony/enhanced/classlib/trunk/modules/instrument/src/main/
    incubator/harmony/enhanced/classlib/trunk/modules/instrument/src/main/java/
    incubator/harmony/enhanced/classlib/trunk/modules/instrument/src/main/java/java/
    incubator/harmony/enhanced/classlib/trunk/modules/instrument/src/main/java/java/lang/
    incubator/harmony/enhanced/classlib/trunk/modules/instrument/src/main/java/java/lang/instrument/
    incubator/harmony/enhanced/classlib/trunk/modules/instrument/src/test/
    incubator/harmony/enhanced/classlib/trunk/modules/instrument/src/test/java/
    incubator/harmony/enhanced/classlib/trunk/modules/instrument/src/test/resources/

Propchange: incubator/harmony/enhanced/classlib/trunk/modules/instrument/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Thu Aug  3 23:28:06 2006
@@ -0,0 +1 @@
+bin

Added: incubator/harmony/enhanced/classlib/trunk/modules/instrument/.classpath
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/instrument/.classpath?rev=428642&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/instrument/.classpath (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/instrument/.classpath Thu Aug  3 23:28:06 2006
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+	<classpathentry kind="src" path="src/main/java"/>
+	<classpathentry kind="src" path="src/test/resources"/>
+	<classpathentry kind="src" path="src/test/java"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+	<classpathentry kind="var" path="JUNIT_HOME/junit.jar"/>
+	<classpathentry kind="output" path="bin"/>
+</classpath>

Added: incubator/harmony/enhanced/classlib/trunk/modules/instrument/.project
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/instrument/.project?rev=428642&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/instrument/.project (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/instrument/.project Thu Aug  3 23:28:06 2006
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>instrument</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.jdt.core.javabuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.jdt.core.javanature</nature>
+	</natures>
+</projectDescription>

Added: incubator/harmony/enhanced/classlib/trunk/modules/instrument/META-INF/MANIFEST.MF
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/instrument/META-INF/MANIFEST.MF?rev=428642&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/instrument/META-INF/MANIFEST.MF (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/instrument/META-INF/MANIFEST.MF Thu Aug  3 23:28:06 2006
@@ -0,0 +1,8 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Harmony Instrument
+Bundle-SymbolicName: org.apache.harmony.instrument
+Bundle-Version: 1.0.0
+Bundle-ClassPath: .
+Eclipse-JREBundle: true
+Export-Package: java.lang.instrument

Added: incubator/harmony/enhanced/classlib/trunk/modules/instrument/build.xml
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/instrument/build.xml?rev=428642&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/instrument/build.xml (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/instrument/build.xml Thu Aug  3 23:28:06 2006
@@ -0,0 +1,186 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+    Copyright 2006 The Apache Software Foundation or its
+    licensors, as applicable.
+  
+    Licensed under the Apache License, Version 2.0 (the "License");
+    you may not use this file except in compliance with the License.
+    You may obtain a copy of the License at
+  
+       http://www.apache.org/licenses/LICENSE-2.0
+  
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+-->
+
+<project name="INSTRUMENT Build" default="build" basedir=".">
+    <description>Build for INSTRUMENT component</description>
+
+    <!-- import common properties -->
+    <import file="${basedir}/../../make/properties.xml" />
+
+    <!-- set global properties for this build. -->
+    <xmlproperty file="make/hyproperties.xml" semanticAttributes="true" />
+
+    <fileset id="classes" dir="${hy.build}">
+        <includesfile name="${hy.instrument}/make/patternset.txt" />
+        <excludesfile name="${hy.hdk}/build/patternsets/luni-kernel.txt" />
+        <excludesfile name="${hy.hdk}/build/patternsets/security-kernel.txt" />
+    </fileset>
+                               
+    <!-- Set build.compiler to "org.eclipse.jdt.core.JDTCompilerAdapter" to
+	     use the Eclipse Java compiler. -->
+    <property name="build.compiler" value="modern" />
+	
+	<property name="iculib.zip" location="${depends.oss}/icu4c-3.4-harmony.zip" />
+
+    <target name="build" depends="compile.java, build.jar" />
+
+    <target name="test" depends="build, compile.tests, run.tests" />
+	
+    <target name="overlay-oss">
+	<mkdir dir="${hy.instrument.src.main.native}/icu4c/unicode" />
+	<unzip src="${iculib.zip}" dest="${hy.instrument.src.main.native}/icu4c/unicode" />
+	<chmod dir="${hy.instrument.src.main.native}/icu4c/unicode" perm="ugo+r" />
+    </target>
+	
+    <target name="clean-overlay-oss">
+	<delete dir="${hy.instrument.src.main.native}/icu4c" quiet="true" />
+    </target>
+	
+    <!-- Build native code -->
+    <target name="build.native" >
+	<make dir="${hy.instrument.src.main.native}/instrument/${hy.os}" />
+
+	<!-- 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">
+                <patternset includes="*${shlib.suffix}*" />
+            </fileset>
+        </copy>
+    </target>
+	
+    <!-- Clean natives -->
+    <target name="clean.native">
+	<make dir="${hy.instrument.src.main.native}/instrument/${hy.os}" target="clean" />
+    </target>
+
+    <target name="clean">
+        <delete failonerror="false">
+            <fileset refid="classes" />
+            <fileset dir="${hy.instrument.bin.test}" />
+        </delete>
+    </target>
+
+    <target name="compile.java">
+        <echo message="Compiling INSTRUMENT classes" />
+
+        <mkdir dir="${hy.build}" />
+
+        <javac sourcepath=""
+            srcdir="${hy.instrument.src.main.java}"
+            destdir="${hy.build}"
+            source="${hy.javac.source}"
+            target="${hy.javac.target}"
+            debug="${hy.javac.debug}">
+
+            <bootclasspath>
+                <fileset dir="${hy.jdk}/jre/lib/boot">
+                    <include name="**/*.jar" />
+                </fileset>
+            </bootclasspath>
+        </javac>
+    </target>
+
+    <target name="build.jar">
+        <jar destfile="${hy.jdk}/jre/lib/boot/instrument.jar"
+             manifest="${hy.instrument}/META-INF/MANIFEST.MF">
+            <fileset refid="classes" />
+        </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=""
+            source="${hy.javac.source}"
+            target="${hy.javac.target}"
+            debug="${hy.javac.debug}">
+
+            <bootclasspath>
+                <fileset dir="${hy.jdk}/jre/lib/boot">
+                    <include name="**/*.jar" />
+                </fileset>
+            </bootclasspath>
+            <classpath location="${hy.hdk}/build/test/support.jar" />
+        </javac>
+    </target>
+
+    <target name="run.tests">
+
+        <mkdir dir="${hy.tests.reports}" />
+
+        <property name="test.jre.home" value="${hy.jdk}/jre" />
+
+        <junit fork="yes"
+            forkmode="once"
+            printsummary="withOutAndErr"
+            errorproperty="test.errors"
+            failureproperty="test.failures"
+            showoutput="on"
+            dir="${hy.instrument.bin.test}"
+            jvm="${test.jre.home}/bin/java">
+
+            <jvmarg value="-showversion"/>
+
+            <env key="JAVA_HOME" value="${test.jre.home}"/>
+
+            <classpath>
+                <pathelement path="${hy.instrument.bin.test}"/>
+            </classpath>
+            <classpath location="${hy.hdk}/build/test/support.jar" />
+
+            <formatter type="xml" />
+
+            <test name="${test.case}" todir="${hy.tests.reports}"
+                  if="test.case" />
+
+            <batchtest todir="${hy.tests.reports}" haltonfailure="no"
+                unless="test.case">
+
+                <fileset dir="${hy.instrument.src.test.java}">
+                    <include name="**/*Test.java"/>
+                </fileset>
+            </batchtest>
+        </junit>
+        <antcall target="touch-failures-file" />
+        <antcall target="touch-errors-file" />
+    </target>
+
+    <target name="touch-failures-file" if="test.failures">
+        <echo file="${hy.tests.reports}/test.failures"
+            append="true">instrument${line.separator}</echo>
+    </target>
+
+    <target name="touch-errors-file" if="test.errors">
+        <echo file="${hy.tests.reports}/test.errors"
+            append="true">instrument${line.separator}</echo>
+    </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>
+
+</project>

Added: incubator/harmony/enhanced/classlib/trunk/modules/instrument/make/hyproperties.xml
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/instrument/make/hyproperties.xml?rev=428642&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/instrument/make/hyproperties.xml (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/instrument/make/hyproperties.xml Thu Aug  3 23:28:06 2006
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+    Copyright 2006 The Apache Software Foundation or its licensors, as applicable.
+  
+    Licensed under the Apache License, Version 2.0 (the "License");
+    you may not use this file except in compliance with the License.
+    You may obtain a copy of the License at
+  
+       http://www.apache.org/licenses/LICENSE-2.0
+  
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+-->
+
+<hy>
+   <instrument location=".">
+      <src>
+         <main>
+            <java location="src/main/java" />
+            <resources location="src/main/resources" />
+            <native location="src/main/native" />
+         </main>
+         <test>
+            <java location="src/test/java" />
+            <resources location="src/test/resources" />
+         </test>
+         <natives location="src/natives" />
+      </src>
+      <bin>
+        <main location="bin/main" />
+        <test location="bin/test" />
+      </bin>
+      <packaging>
+      </packaging>
+   </instrument>
+
+   <hdk location="../../deploy" />
+   <jdk location="../../deploy/jdk" />
+   <build location="../../build/classes" />
+
+   <tests>
+      <reports location="../../build/test_report" />
+   </tests>
+</hy>

Added: incubator/harmony/enhanced/classlib/trunk/modules/instrument/make/patternset.txt
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/instrument/make/patternset.txt?rev=428642&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/instrument/make/patternset.txt (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/instrument/make/patternset.txt Thu Aug  3 23:28:06 2006
@@ -0,0 +1,18 @@
+# Copyright 2006 The Apache Software Foundation or its licensors, as applicable
+# 
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# 
+#     http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+java/lang/instrument/*
+
+org/apache/harmony/instrument/internal/*
+