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 14:58:30 UTC
svn commit: r384217 - in /incubator/harmony/enhanced/classlib/trunk: make/
modules/nio_char/make/ modules/nio_char/make/common/
Author: tellison
Date: Wed Mar 8 05:58:29 2006
New Revision: 384217
URL: http://svn.apache.org/viewcvs?rev=384217&view=rev
Log:
Create modular build and test scripts for nio_char component.
Added:
incubator/harmony/enhanced/classlib/trunk/modules/nio_char/make/
incubator/harmony/enhanced/classlib/trunk/modules/nio_char/make/build.xml
incubator/harmony/enhanced/classlib/trunk/modules/nio_char/make/common/
incubator/harmony/enhanced/classlib/trunk/modules/nio_char/make/common/build.xml
incubator/harmony/enhanced/classlib/trunk/modules/nio_char/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=384217&r1=384216&r2=384217&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/make/build-test.xml (original)
+++ incubator/harmony/enhanced/classlib/trunk/make/build-test.xml Wed Mar 8 05:58:29 2006
@@ -15,7 +15,7 @@
limitations under the License.
-->
-<project name="classlib-testt" default="test-all" basedir="..">
+<project name="classlib-test" default="test-all" basedir="..">
<description> Tests for classlib package</description>
@@ -28,7 +28,7 @@
<!-- 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, test-nio, test-xnet, gen-report">
+ depends="clean, test-luni, test-archive, test-text, test-nio, test-xnet, test-nio_char, gen-report">
</target>
<target name="clean">
@@ -76,6 +76,15 @@
<echo message="=================================="/>
<ant antfile="make/build.xml" dir="modules/nio" target="test" />
+
+ </target>
+
+ <target name="test-nio_char">
+ <echo message="=================================="/>
+ <echo message="Running tests for module nio_char"/>
+ <echo message="=================================="/>
+
+ <ant antfile="make/build.xml" dir="modules/nio_char" target="test" />
</target>
Added: incubator/harmony/enhanced/classlib/trunk/modules/nio_char/make/build.xml
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/nio_char/make/build.xml?rev=384217&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/nio_char/make/build.xml (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/nio_char/make/build.xml Wed Mar 8 05:58:29 2006
@@ -0,0 +1,115 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright 2005, 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="NIO_CHAR Build" default="build" basedir="..">
+ <description>Build for NIO_CHAR 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>
+
+ <!-- TEXT 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.nio_char.bin.main}"/>
+ <delete dir="${hy.nio_char.bin.test}"/>
+ </target>
+
+</project>
Added: incubator/harmony/enhanced/classlib/trunk/modules/nio_char/make/common/build.xml
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/nio_char/make/common/build.xml?rev=384217&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/nio_char/make/common/build.xml (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/nio_char/make/common/build.xml Wed Mar 8 05:58:29 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_NIO_CHAR_Build">
+
+ <target name="compile.java" description="Compile NIO_CHAR java code">
+ <echo message="Compiling NIO_CHAR classes from ${hy.nio_char.src.main.java}" />
+
+ <mkdir dir="${hy.nio_char.bin.main}" />
+
+ <javac sourcepath=""
+ srcdir="${hy.nio_char.src.main.java}"
+ destdir="${hy.nio_char.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/${hy.nio_char.packaging.jarname}.jar"
+ manifest="${hy.nio_char}/META-INF/MANIFEST.MF">
+ <fileset dir="${hy.nio_char.bin.main}" />
+ </jar>
+ </target>
+
+
+ <target name="compile.tests">
+ <echo message="Compiling NIO_CHAR tests from ${hy.nio_char.src.test.java}" />
+
+ <mkdir dir="${hy.nio_char.bin.test}" />
+
+ <javac srcdir="${hy.nio_char.src.test.java}"
+ destdir="${hy.nio_char.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.nio_char.bin.test}"
+ jvm="${hy.target}/jre/bin/java">
+
+ <jvmarg value="-showversion"/>
+
+ <env key="JAVA_HOME" value="${hy.target}/jre"/>
+
+ <classpath>
+ <pathelement path="${hy.nio_char.bin.test}"/>
+ </classpath>
+
+ <formatter type="xml" />
+
+ <batchtest todir="${hy.tests.reports}" haltonfailure="no">
+ <fileset dir="${hy.nio_char.src.test.java}">
+ <include name="**/*Test.java"/>
+ </fileset>
+ </batchtest>
+ </junit>
+ </target>
+
+
+ <target name="copy.resources">
+ <!-- Nothing for NIO_CHAR -->
+ </target>
+</project>
+
Added: incubator/harmony/enhanced/classlib/trunk/modules/nio_char/make/common/hyproperties.xml
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/nio_char/make/common/hyproperties.xml?rev=384217&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/nio_char/make/common/hyproperties.xml (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/nio_char/make/common/hyproperties.xml Wed Mar 8 05:58:29 2006
@@ -0,0 +1,45 @@
+<?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>
+ <nio_char 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>
+ <jarname>nio_char</jarname>
+ </packaging>
+ </nio_char>
+
+ <target location="../../deploy" />
+
+ <tests>
+ <reports location="../../build/test_report" />
+ </tests>
+</hy>