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:42:05 UTC
svn commit: r384214 - in /incubator/harmony/enhanced/classlib/trunk: make/
modules/x-net/ modules/x-net/make/ modules/x-net/make/common/
Author: tellison
Date: Wed Mar 8 05:42:04 2006
New Revision: 384214
URL: http://svn.apache.org/viewcvs?rev=384214&view=rev
Log:
Create modular build and test scripts for x-net component.
Added:
incubator/harmony/enhanced/classlib/trunk/modules/x-net/make/
incubator/harmony/enhanced/classlib/trunk/modules/x-net/make/build.xml
incubator/harmony/enhanced/classlib/trunk/modules/x-net/make/common/
incubator/harmony/enhanced/classlib/trunk/modules/x-net/make/common/build.xml
incubator/harmony/enhanced/classlib/trunk/modules/x-net/make/common/hyproperties.xml
Modified:
incubator/harmony/enhanced/classlib/trunk/make/build-test.xml
incubator/harmony/enhanced/classlib/trunk/modules/x-net/ (props changed)
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=384214&r1=384213&r2=384214&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:42:04 2006
@@ -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, gen-report">
+ depends="clean, test-luni, test-archive, test-text, test-nio, test-xnet, gen-report">
</target>
<target name="clean">
@@ -57,7 +57,7 @@
<echo message="Running tests for module x-net"/>
<echo message="=================================="/>
- <ant antfile="build.xml" dir="modules/x-net" target="test-run" />
+ <ant antfile="make/build.xml" dir="modules/x-net" target="test" />
</target>
Propchange: incubator/harmony/enhanced/classlib/trunk/modules/x-net/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Wed Mar 8 05:42:04 2006
@@ -0,0 +1 @@
+bin
Added: incubator/harmony/enhanced/classlib/trunk/modules/x-net/make/build.xml
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/x-net/make/build.xml?rev=384214&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/x-net/make/build.xml (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/x-net/make/build.xml Wed Mar 8 05:42:04 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="X-NET Build" default="build" basedir="..">
+ <description>Build for X-NET 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>
+
+ <!-- X-NET 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.x-net.bin.main}"/>
+ <delete dir="${hy.x-net.bin.test}"/>
+ </target>
+
+</project>
Added: incubator/harmony/enhanced/classlib/trunk/modules/x-net/make/common/build.xml
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/x-net/make/common/build.xml?rev=384214&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/x-net/make/common/build.xml (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/x-net/make/common/build.xml Wed Mar 8 05:42:04 2006
@@ -0,0 +1,124 @@
+<?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_X-NET_Build">
+
+ <target name="compile.java" description="Compile X-NET java code">
+ <echo message="Compiling X-NET classes from ${hy.x-net.src.main.java}" />
+
+ <mkdir dir="${hy.x-net.bin.main}" />
+
+ <javac sourcepath=""
+ srcdir="${hy.x-net.src.main.java}"
+ destdir="${hy.x-net.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.x-net.packaging.jarname}.jar"
+ manifest="${hy.x-net}/META-INF/MANIFEST.MF">
+ <fileset dir="${hy.x-net.bin.main}" />
+ </jar>
+ </target>
+
+
+ <target name="compile.tests">
+ <echo message="Compiling X-NET tests from ${hy.x-net.src.test.java}" />
+
+ <mkdir dir="${hy.x-net.bin.test}" />
+
+ <javac destdir="${hy.x-net.bin.test}"
+ source="${source.ver}"
+ debug="${java.debug.option}">
+
+ <!-- FIXME: X-NET tests should not reach into security module code -->
+ <src>
+ <pathelement location="${hy.x-net.src.test.java}"/>
+ <pathelement location="${hy.x-net}/../security/test/common/unit"/>
+ </src>
+
+ <include name="javax/net/**/*Test*.java" />
+ <include name="org/apache/harmony/security/test/**/*" />
+ <exclude name="**/SecurityTest.java"/>
+
+ <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.x-net.bin.test}"
+ jvm="${hy.target}/jre/bin/java">
+
+ <jvmarg value="-showversion"/>
+
+ <env key="JAVA_HOME" value="${hy.target}/jre"/>
+
+ <classpath>
+ <pathelement path="${hy.x-net.bin.test}"/>
+ </classpath>
+
+ <formatter type="xml" />
+
+ <batchtest todir="${hy.tests.reports}" haltonfailure="no">
+ <fileset dir="${hy.x-net.src.test.java}">
+ <include name="**/*Test.java"/>
+
+ <!-- FIXME: The following tests are excluded because they fail for reasons to be determined -->
+ <exclude name="**/DefaultSSLServerSocketFactoryTest.java"/>
+ <exclude name="**/DefaultSSLSocketFactoryTest.java"/>
+ <exclude name="**/HttpsURLConnectionTest.java"/>
+ <exclude name="**/SSLServerSocketFactoryTest.java"/>
+ <exclude name="**/SSLSocketFactoryTest.java"/>
+ <exclude name="**/SSLExceptionTest.java"/>
+ <exclude name="**/SSLHandshakeExceptionTest.java"/>
+ <exclude name="**/SSLKeyExceptionTest.java"/>
+ <exclude name="**/SSLPeerUnverifiedExceptionTest.java"/>
+ <exclude name="**/SSLProtocolExceptionTest.java"/>
+ <exclude name="**/ServerSocketFactoryTest.java"/>
+ <exclude name="**/SocketFactoryTest.java"/>
+ </fileset>
+ </batchtest>
+ </junit>
+ </target>
+
+
+ <target name="copy.resources">
+ <!-- Nothing for X-NET -->
+ </target>
+</project>
+
Added: incubator/harmony/enhanced/classlib/trunk/modules/x-net/make/common/hyproperties.xml
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/x-net/make/common/hyproperties.xml?rev=384214&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/x-net/make/common/hyproperties.xml (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/x-net/make/common/hyproperties.xml Wed Mar 8 05:42:04 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>
+ <x-net 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>x-net</jarname>
+ </packaging>
+ </x-net>
+
+ <target location="../../deploy" />
+
+ <tests>
+ <reports location="../../build/test_report" />
+ </tests>
+</hy>