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/03/08 13:56:54 UTC

svn commit: r384205 - in /incubator/harmony/enhanced/classlib/trunk: make/build-test.xml modules/archive/make/ modules/archive/make/build.xml modules/archive/make/common/ modules/archive/make/common/build.xml modules/archive/make/common/hyproperties.xml

Author: tellison
Date: Wed Mar  8 04:56:53 2006
New Revision: 384205

URL: http://svn.apache.org/viewcvs?rev=384205&view=rev
Log:
Create modular build and test scripts for archive component.
Temporarily remove broken test targets from top-level build-test.xml (will fix up asap)

Added:
    incubator/harmony/enhanced/classlib/trunk/modules/archive/make/
    incubator/harmony/enhanced/classlib/trunk/modules/archive/make/build.xml
    incubator/harmony/enhanced/classlib/trunk/modules/archive/make/common/
    incubator/harmony/enhanced/classlib/trunk/modules/archive/make/common/build.xml
    incubator/harmony/enhanced/classlib/trunk/modules/archive/make/common/hyproperties.xml
Modified:
    incubator/harmony/enhanced/classlib/trunk/make/build-test.xml

Modified: incubator/harmony/enhanced/classlib/trunk/make/build-test.xml
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/make/build-test.xml?rev=384205&r1=384204&r2=384205&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/make/build-test.xml (original)
+++ incubator/harmony/enhanced/classlib/trunk/make/build-test.xml Wed Mar  8 04:56:53 2006
@@ -26,7 +26,8 @@
     <property name="tests.output" location="build/test_report" />
     <property name="target.output" location="deploy" />
 
-    <target name="test-all" depends="clean, test-luni, test-xnet, test-text, test-security, gen-report">
+	<!-- this list of components to test will grow to eventually be all modules -->
+	<target name="test-all" depends="clean, test-luni, test-archive, test-text, gen-report">
 	</target>
 
 	<target name="clean">
@@ -40,7 +41,16 @@
 
         <ant antfile="make/build.xml" dir="modules/luni" target="test"/>
 	</target>
-		
+
+	<target name="test-archive">
+        <echo message="=================================="/>
+        <echo message="Running tests for module archive"/>
+        <echo message="=================================="/>
+
+        <ant antfile="make/build.xml" dir="modules/archive" target="test" />
+
+	</target>
+
 	<target name="test-xnet">
         <echo message="=================================="/>
         <echo message="Running tests for module x-net"/>
@@ -75,6 +85,10 @@
 		  </fileset>
 		  <report format="frames" todir="${tests.output}/html"/>
 		</junitreport>
+
+		<!-- use this property just to get the slashes to display right in the echo -->
+		<property name="display-location" location="${tests.output}/html/index.html"/>
+		<echo message="The test report is in ${display-location}"/>
     </target>
 
 </project>

Added: incubator/harmony/enhanced/classlib/trunk/modules/archive/make/build.xml
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/archive/make/build.xml?rev=384205&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/archive/make/build.xml (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/archive/make/build.xml Wed Mar  8 04:56:53 2006
@@ -0,0 +1,115 @@
+<?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="ARCHIVE Build" default="build" basedir="..">
+	<description>Build for ARCHIVE component</description>
+
+	<!-- set global properties for this build. -->
+	<xmlproperty file="make/common/hyproperties.xml" semanticAttributes="true"/>
+	<property environment="env"/>
+
+	<!-- Determine the (normalized) operating system family -->
+	<condition property="if.win">
+		<os family="Windows" />
+	</condition>
+	<condition property="hy.os_family" value="windows">
+		<isset property="if.win"/>
+	</condition>
+
+	<condition property="if.linux">
+		<and>
+			<os name="linux" />
+			<os family="unix" />
+		</and>
+	</condition>
+	<condition property="hy.os_family" value="linux">
+		<isset property="if.linux"/>
+	</condition>
+
+
+	<!-- Determine the (normalized) processor family -->
+	<condition property="if.x86_64">
+		<contains string="${os.arch}" substring="x86_64"/>
+	</condition>
+	<condition property="hy.cpu_family" value="x86_64">
+		<isset property="if.x86_64"/>
+	</condition>
+	
+	<condition property="if.x86">
+		<and>
+			<contains string="${os.arch}" substring="86"/>
+			<not>
+				<isset property="if.x86_64"/>
+			</not>
+		</and>
+	</condition>
+	<condition property="hy.cpu_family" value="x86">
+		<isset property="if.x86"/>
+	</condition>
+	
+	<condition property="if.ipf">
+		<contains string="${os.arch}" substring="ia64"/>
+	</condition>
+	<condition property="hy.cpu_family" value="ipf">
+		<isset property="if.ipf"/>
+	</condition>
+
+	<!-- Define the platform property dependant upon the OS and platform -->
+	<property name="hy.platform" value="${hy.os_family}.${hy.cpu_family}"/>
+
+	<!-- Set the java compiler to be the Eclipse Java compiler -->
+	<property name="build.compiler" value="org.eclipse.jdt.core.JDTCompilerAdapter" />
+
+
+	<target name="init">
+		<tstamp>
+			<format property="build-date" pattern="yyyyMMdd" locale="en" />
+		</tstamp>
+		<tstamp>
+			<format property="build-time" pattern="yyyyMMdd_HHmm" />
+		</tstamp>
+		<echo message="build-date=${build-date}" />
+		<echo message="build-time=${build-time}" />
+		<echo message="on platform=${os.name} version=${os.version} arch=${os.arch}" />
+
+		<property name="java.debug.option" value="on" />
+		<property name="native.debug.option" value="on" />
+
+		<property name="source.ver" value="1.4" />
+	</target>
+	
+	<!-- ARCHIVE TARGETS -->
+
+	<target name="build" depends="init">
+		<ant dir="make/common" target="compile.java" />
+		<ant dir="make/common" target="build.jar" />
+	<!--	<ant dir="make/platform/${hy.platform}" target="compile.native" /> -->
+		<ant dir="make/common" target="copy.resources" />
+	</target>
+
+
+	<target name="test" depends="build">
+		<ant dir="make/common" target="compile.tests" />
+		<ant dir="make/common" target="run.tests" />
+	</target>
+
+	<target name="clean">
+		<delete dir="${hy.archive.bin.main}"/>
+		<delete dir="${hy.archive.bin.test}"/>
+	</target>
+
+</project>

Added: incubator/harmony/enhanced/classlib/trunk/modules/archive/make/common/build.xml
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/archive/make/common/build.xml?rev=384205&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/archive/make/common/build.xml (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/archive/make/common/build.xml Wed Mar  8 04:56:53 2006
@@ -0,0 +1,102 @@
+<?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="Common_ARCHIVE_Build">
+	
+	<target name="compile.java" description="Compile ARCHIVE java code">
+		<echo message="Compiling ARCHIVE classes from ${hy.archive.src.main.java}" />
+		
+		<mkdir dir="${hy.archive.bin.main}" />
+
+		<javac sourcepath=""
+			srcdir="${hy.archive.src.main.java}"
+			destdir="${hy.archive.bin.main}"
+			source="${source.ver}"
+			debug="${java.debug.option}">
+
+			<bootclasspath>
+				<fileset dir="${hy.target}/jre/lib/boot">
+					<include name="*.jar" />
+				</fileset>
+			</bootclasspath>
+		</javac>
+	</target>
+	
+	<target name="build.jar">
+		<jar destfile="${hy.target}/jre/lib/boot/archive.jar"
+			manifest="${hy.archive}/META-INF/MANIFEST.MF">
+			<fileset dir="${hy.archive.bin.main}" />
+		</jar>
+	</target>
+
+	
+	<target name="compile.tests">
+		<echo message="Compiling ARCHIVE tests from ${hy.archive.src.test.java}" />
+
+		<mkdir dir="${hy.archive.bin.test}" />
+
+		<javac srcdir="${hy.archive.src.test.java}"
+			destdir="${hy.archive.bin.test}"
+			sourcepath=""
+			source="${source.ver}"
+			debug="${java.debug.option}">
+
+			<bootclasspath>
+				<fileset dir="${hy.target}/jre/lib/boot">
+					<include name="*.jar" />
+				</fileset>
+			</bootclasspath>
+		</javac>
+	</target>
+
+
+	<target name="run.tests">
+		
+	        <mkdir dir="${hy.tests.reports}" />
+
+	        <junit fork="yes"
+			forkmode="once"
+			printsummary="withOutAndErr"
+			errorproperty="test.error"
+			showoutput="on"
+			dir="${hy.archive.bin.test}"
+			jvm="${hy.target}/jre/bin/java">
+
+			<jvmarg value="-showversion"/>
+
+			<env key="JAVA_HOME" value="${hy.target}/jre"/>
+
+			<classpath>
+				<pathelement path="${hy.archive.bin.test}"/>
+			</classpath>
+
+			<formatter type="xml" />
+
+			<batchtest todir="${hy.tests.reports}" haltonfailure="no">
+				<fileset dir="${hy.archive.src.test.java}">
+					<include name="**/*Test.java"/>
+				</fileset>
+			</batchtest>
+		</junit>
+	</target>
+	
+	
+	<target name="copy.resources">
+		<!-- Nothing for ARCHIVE -->
+	</target>
+</project>
+

Added: incubator/harmony/enhanced/classlib/trunk/modules/archive/make/common/hyproperties.xml
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/archive/make/common/hyproperties.xml?rev=384205&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/archive/make/common/hyproperties.xml (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/archive/make/common/hyproperties.xml Wed Mar  8 04:56:53 2006
@@ -0,0 +1,44 @@
+<?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>
+   <archive location=".">
+      <src>
+         <main>
+            <java location="src/main/java" />
+        	<resources location="src/main/resources" />
+         </main>
+         <test>
+            <java location="src/test/java" />
+            <resources location="src/main/resources" />
+         </test>
+         <natives location="src/natives" />
+      </src>
+      <bin>
+        <main location="bin/main" />
+        <test location="bin/test" />
+      </bin>
+      <packaging>
+      </packaging>
+   </archive>
+
+   <target location="../../deploy" />
+
+   <tests>
+      <reports location="../../build/test_report" />
+   </tests>
+</hy>