Author: geirm
Date: Mon Feb 13 10:48:53 2006
New Revision: 377453
URL: http://svn.apache.org/viewcvs?rev=377453&view=rev
Log:
quickie build for test purposes
Added:
incubator/harmony/enhanced/classlib/trunk/modules/text/build.xml
Added: incubator/harmony/enhanced/classlib/trunk/modules/text/build.xml
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/text/build.xml?rev=377453&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/text/build.xml (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/text/build.xml Mon Feb 13 10:48:53 2006
@@ -0,0 +1,120 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- Copyright 2005 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="classlib-text-test" default="test" basedir=".">
+
+ <description> Tests for text package</description>
+
+ <!-- set global properties for this build. -->
+
+ <property name="build.compiler" value="modern"/>
+
+ <!-- for when instantiated locally (in the text dir) -->
+ <property name="tests.output" value="target" />
+
+ <property name="target.output" value="../../deploy" />
+
+ <!-- =================================
+ target: run
+ ================================= -->
+ <target name="test" depends="test-clean, test-run" description="Run Tests" />
+
+ <!-- =================================
+ target: test-clean
+ ================================= -->
+ <target name="test-clean" description="Delete all built test classes">
+ <delete includeemptydirs="true" failonerror="false">
+ <fileset dir="${tests.output}">
+ <include name="**/**" />
+ </fileset>
+ </delete>
+ </target>
+
+ <!-- =================================
+ target: test-compile
+ ================================= -->
+ <target name="test-compile" depends="test-copy-resource" description="Compile tests">
+ <mkdir dir="${tests.output}" />
+
+ <javac destdir="${tests.output}" source="1.4" target="1.4" debug="on">
+ <src>
+ <pathelement location="src/test/java"/>
+ </src>
+
+ <include name="**/*Test.java" />
+
+ <classpath location="${tests.output}" />
+
+ <bootclasspath>
+ <fileset dir="${target.output}/jre/lib/boot">
+ <include name="*.jar"/>
+ </fileset>
+ </bootclasspath>
+ </javac>
+ </target>
+
+ <!-- =================================
+ target: test-copy-resource
+ ================================= -->
+ <target name="test-copy-resource" description="Copy non-Java files">
+
+ <mkdir dir="${tests.output}" />
+
+ <copy todir="${tests.output}" includeemptydirs="false">
+ <fileset dir="src/test/java">
+ <exclude name="**/*.java" />
+ </fileset>
+ </copy>
+ </target>
+
+ <!-- =================================
+ target: test-clean
+ ================================= -->
+ <target name="test-run" depends="test-compile">
+
+ <property name="tests.report" value="${tests.output}" />
+ <property environment="env"/>
+
+ <mkdir dir="${tests.report}" />
+
+ <echo message="woogie! : ${basedir}/${target.output}/jre/bin/java" />
+ <junit fork="yes"
+ forkmode="perTest"
+ printsummary="withOutAndErr"
+ errorproperty="test.error"
+ showoutput="on"
+ haltonfailure="on"
+ dir="${basedir}"
+ jvm="${basedir}/${target.output}/jre/bin/java">
+
+ <env key="JAVA_HOME" value="${basedir}/${target.output}/jre"/>
+ <jvmarg value="-Xbootclasspath/a:${tests.output}${path.separator}${env.CLASSPATH}"/>
+
+ <jvmarg value="-Xbootclasspath/a:${tests.output}"/>
+
+ <jvmarg value="-DTEST_SRC_DIR=src/test/java/"/>
+
+ <formatter type="xml" />
+ <batchtest todir="${tests.report}">
+ <fileset dir="src/test/java">
+ <include name="**/*Test.java"/>
+ </fileset>
+ </batchtest>
+ </junit>
+ </target>
+
+ </project>
\ No newline at end of file
|