You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by te...@apache.org on 2006/06/21 18:59:34 UTC

svn commit: r416036 - in /incubator/harmony/enhanced/classlib/trunk/modules/tools: build.xml make/ make/hyproperties.xml make/patternset.txt

Author: tellison
Date: Wed Jun 21 09:59:33 2006
New Revision: 416036

URL: http://svn.apache.org/viewvc?rev=416036&view=rev
Log:
Add tools module to build/test infrastructure.

Added:
    incubator/harmony/enhanced/classlib/trunk/modules/tools/build.xml   (with props)
    incubator/harmony/enhanced/classlib/trunk/modules/tools/make/
    incubator/harmony/enhanced/classlib/trunk/modules/tools/make/hyproperties.xml   (with props)
    incubator/harmony/enhanced/classlib/trunk/modules/tools/make/patternset.txt   (with props)

Added: incubator/harmony/enhanced/classlib/trunk/modules/tools/build.xml
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/tools/build.xml?rev=416036&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/tools/build.xml (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/tools/build.xml Wed Jun 21 09:59:33 2006
@@ -0,0 +1,154 @@
+<?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="Tools Build" default="build" basedir=".">
+	<description>Build for Tools component</description>
+
+	<!-- import common properties -->
+	<import file="${basedir}/../../make/properties.xml" />
+
+	<!-- set global properties for this build. -->
+	<xmlproperty file="make/hyproperties.xml" semanticAttributes="true" />
+
+	<!-- Set build.compiler to "org.eclipse.jdt.core.JDTCompilerAdapter" to
+	     use the Eclipse Java compiler. -->
+	<property name="build.compiler" value="modern" />
+
+	<target name="build" depends="compile.java, build.jar" />
+
+	<target name="test" depends="build, compile.tests, run.tests" />
+
+	<target name="clean">
+		<delete failonerror="false">
+			<fileset dir="${hy.build}"
+                     includesfile="${hy.tools}/make/patternset.txt" />
+			<fileset dir="${hy.tools.bin.test}" />
+		</delete>
+	</target>
+
+	<target name="compile.java">
+		<echo message="Compiling TOOLS classes" />
+
+		<mkdir dir="${hy.build}" />
+
+		<javac sourcepath=""
+               srcdir="${hy.tools.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>
+				<fileset dir="${hy.jdk}/lib">
+					<include name="**/*.jar" />
+				</fileset>
+			</bootclasspath>
+		</javac>
+	</target>
+
+	<target name="build.jar">
+		<mkdir dir="${hy.jdk}/lib" />
+
+		<jar destfile="${hy.jdk}/lib/tools.jar"
+             manifest="${hy.tools}/META-INF/MANIFEST.MF">
+			<fileset dir="${hy.build}"
+                     includesfile="${hy.tools}/make/patternset.txt" />
+		</jar>
+	</target>
+
+	<target name="compile.tests">
+		<echo message="Compiling Tools tests" />
+
+		<mkdir dir="${hy.tools.bin.test}" />
+
+		<javac srcdir="${hy.tools.src.test.java}"
+               destdir="${hy.tools.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>
+				<fileset dir="${hy.jdk}/lib">
+					<include name="**/*.jar" />
+				</fileset>
+			</bootclasspath>
+			<classpath location="../../build/tests" />
+		</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.tools.bin.test}"
+               jvm="${test.jre.home}/bin/java">
+
+			<jvmarg value="-showversion"/>
+
+			<env key="JAVA_HOME" value="${test.jre.home}"/>
+
+			<classpath>
+				<pathelement path="${hy.tools.bin.test}"/>
+			</classpath>
+			<classpath location="../../build/tests" />
+
+			<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.tools.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" >tools
+</echo>
+	</target>
+
+	<target name="touch-errors-file" if="test.errors">
+		<echo file="${hy.tests.reports}/test.errors"
+            append="true" >tools
+</echo>
+	</target>
+
+</project>

Propchange: incubator/harmony/enhanced/classlib/trunk/modules/tools/build.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/harmony/enhanced/classlib/trunk/modules/tools/make/hyproperties.xml
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/tools/make/hyproperties.xml?rev=416036&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/tools/make/hyproperties.xml (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/tools/make/hyproperties.xml Wed Jun 21 09:59:33 2006
@@ -0,0 +1,46 @@
+<?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>
+   <tools location=".">
+      <src>
+         <main>
+            <java location="src/main/java" />
+        	<resources location="src/main/resources" />
+         </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>
+   </tools>
+
+   <hdk location="../../deploy" />
+   <jdk location="../../deploy/jdk" />
+   <build location="../../build" />
+
+   <tests>
+      <reports location="../../build/test_report" />
+   </tests>
+</hy>

Propchange: incubator/harmony/enhanced/classlib/trunk/modules/tools/make/hyproperties.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/harmony/enhanced/classlib/trunk/modules/tools/make/patternset.txt
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/tools/make/patternset.txt?rev=416036&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/tools/make/patternset.txt (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/tools/make/patternset.txt Wed Jun 21 09:59:33 2006
@@ -0,0 +1,15 @@
+# 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.
+
+org/apache/harmony/tools/**

Propchange: incubator/harmony/enhanced/classlib/trunk/modules/tools/make/patternset.txt
------------------------------------------------------------------------------
    svn:eol-style = native