You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by hi...@apache.org on 2009/07/18 14:45:33 UTC
svn commit: r795358 - in /harmony/enhanced/classlib/trunk/modules/awt:
build.xml make/run-test.xml
Author: hindessm
Date: Sat Jul 18 12:45:33 2009
New Revision: 795358
URL: http://svn.apache.org/viewvc?rev=795358&view=rev
Log:
Run awt tests using hdk.
Added:
harmony/enhanced/classlib/trunk/modules/awt/make/run-test.xml (with props)
Modified:
harmony/enhanced/classlib/trunk/modules/awt/build.xml
Modified: harmony/enhanced/classlib/trunk/modules/awt/build.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/awt/build.xml?rev=795358&r1=795357&r2=795358&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/awt/build.xml (original)
+++ harmony/enhanced/classlib/trunk/modules/awt/build.xml Sat Jul 18 12:45:33 2009
@@ -55,6 +55,9 @@
<property file="../../make/depends.properties" />
<property name="tests.hdk.dir" value="${hy.hdk}/build/test/awt" />
+ <property name="tests.excludes.hdk.dir" value="${tests.hdk.dir}/excludes" />
+ <property name="tests.resources.hdk.dir"
+ value="${tests.hdk.dir}/resources"/>
<property name="awt.exclude.file"
location="${tests.hdk.dir}/test.exclude" />
@@ -72,11 +75,14 @@
</target>
<!-- internal target for local and global test run sequence -->
- <target name="-test-module" depends="build, compile-tests, prepare-exclude, run-tests" />
+ <target name="-test-module" depends="build, run-tests" />
<target name="clean">
<delete file="${hy.jdk}/jre/lib/boot/awt.jar" />
<delete file="${hy.jdk}/jre/lib/boot/awt-src.jar" />
+ <delete file="${tests.hdk.dir}/awt_boot_tests.jar" />
+ <delete file="${tests.hdk.dir}/awt_tests.jar" />
+ <delete file="${tests.hdk.dir}/awt_headless_tests.jar" />
<delete dir="${hy.jdk}/jre/lib/cmm" quiet="true" />
<delete failonerror="false">
<fileset refid="classes" />
@@ -322,7 +328,55 @@
target="clean"/>
</target>
- <target name="compile-tests" depends="copy-test-resources">
+ <target name="test-jar" depends="svn-info,compile-tests">
+ <mkdir dir="${tests.hdk.dir}" />
+ <copy file="make/run-test.xml" tofile="${tests.hdk.dir}/build.xml" />
+
+ <jar destfile="${tests.hdk.dir}/awt_boot_tests.jar">
+ <fileset dir="bin/test/boot">
+ <exclude name="**/*Headless*Test.class" />
+ </fileset>
+ <manifest>
+ <attribute name="Implementation-Version" value="${svn.info}"/>
+ </manifest>
+ <metainf refid="hy.required.metainf-files"/>
+ </jar>
+ <jar destfile="${tests.hdk.dir}/awt_tests.jar">
+ <fileset dir="bin/test/classes" />
+ <manifest>
+ <attribute name="Implementation-Version" value="${svn.info}"/>
+ </manifest>
+ <metainf refid="hy.required.metainf-files"/>
+ </jar>
+ <jar destfile="${tests.hdk.dir}/awt_headless_tests.jar">
+ <fileset dir="bin/test/boot">
+ <include name="**/*Headless*Test.class" />
+ </fileset>
+ <manifest>
+ <attribute name="Implementation-Version" value="${svn.info}"/>
+ </manifest>
+ <metainf refid="hy.required.metainf-files"/>
+ </jar>
+
+ <mkdir dir="${tests.excludes.hdk.dir}"/>
+ <copy todir="${tests.excludes.hdk.dir}">
+ <fileset dir="./make" includes="exclude*"/>
+ <filterchain>
+ <tokenfilter>
+ <replaceregex pattern="\.java" replace="\.class" flags="g"/>
+ </tokenfilter>
+ </filterchain>
+ </copy>
+
+ <mkdir dir="${tests.resources.hdk.dir}" />
+ <copy todir="${tests.resources.hdk.dir}" includeemptydirs="false">
+ <fileset dir="src/test/api/resources" />
+ </copy>
+
+ <copy file="../../${junit.jar}" todir="${hy.hdk}/build/test" />
+ </target>
+
+ <target name="compile-tests">
<compile-tests description="awt impl tests"
destdir="bin/test/boot">
<javac-elements>
@@ -342,141 +396,8 @@
</compile-tests>
</target>
- <target name="copy-test-resources">
- <mkdir dir="bin/test/resources" />
- <copy todir="bin/test/resources" includeemptydirs="false">
- <fileset dir="src/test/api/resources" />
- </copy>
- </target>
-
- <target name="prepare-exclude">
- <prepare-exclude-list moduleName="awt" dir="./make"
- result="${awt.exclude.file}"/>
- </target>
-
- <target name="run-tests">
- <mkdir dir="${tests.output}" />
- <property name="test.jre.home" value="${hy.jdk}/jre" />
-
- <!-- bootclasspath tests -->
- <junit fork="yes"
- forkmode="${hy.test.forkmode}"
- timeout="${hy.test.timeout}"
- printsummary="withOutAndErr"
- errorproperty="test.errors"
- failureproperty="test.failures"
- showoutput="on"
- dir="${basedir}"
- jvm="${test.jre.home}/bin/java">
-
- <assertions enableSystemAssertions="true">
- <enable />
- </assertions>
-
- <jvmarg line="${hy.test.vmargs}" />
- <jvmarg value="-Xbootclasspath/a:bin/test/boot${path.separator}${basedir}/../../${junit.jar}"/>
-
- <formatter type="xml" />
-
- <batchtest todir="${tests.output}" haltonfailure="no">
- <fileset dir="src/test/impl/boot">
- <include name="${converted.tc}" if="test.case" />
- <include name="**/*Test.java" unless="test.case" />
- <excludesfile name="${awt.exclude.file}" unless="test.case" />
- <exclude name="**/*Headless*Test.java" />
- </fileset>
- </batchtest>
- </junit>
-
- <!-- classpath tests -->
- <junit fork="yes"
- forkmode="${hy.test.forkmode}"
- timeout="${hy.test.timeout}"
- printsummary="withOutAndErr"
- errorproperty="test.errors"
- failureproperty="test.failures"
- showoutput="on"
- dir="${basedir}"
- jvm="${test.jre.home}/bin/java">
-
- <assertions enableSystemAssertions="true">
- <enable />
- </assertions>
-
- <jvmarg line="${hy.test.vmargs}" />
- <classpath>
- <pathelement path="bin/test/classes" />
- <fileset dir="${hy.hdk}/build/test/">
- <include name="*.jar" />
- </fileset>
- </classpath>
-
- <formatter type="xml" />
-
- <batchtest todir="${tests.output}">
- <fileset dir="src/test/api/java">
- <include name="${converted.tc}" if="test.case" />
- <include name="**/*Test.java" unless="test.case" />
- <exclude name="**/*Headless*Test.java" unless="test.case" />
- <excludesfile name="${awt.exclude.file}" unless="test.case"/>
- </fileset>
- <fileset dir="${hy.awt.src.test.impl.platform}">
- <include name="${converted.tc}" if="test.case" />
- <include name="**/*Test.java" unless="test.case" />
- <exclude name="**/*Headless*Test.java" unless="test.case" />
- <excludesfile name="${awt.exclude.file}" unless="test.case"/>
- </fileset>
- </batchtest>
- </junit>
-
- <!-- headless tests, should be moved to classpath -->
- <junit fork="yes"
- forkmode="${hy.test.forkmode}"
- timeout="${hy.test.timeout}"
- printsummary="withOutAndErr"
- errorproperty="test.errors"
- failureproperty="test.failures"
- showoutput="on"
- dir="${basedir}"
- jvm="${test.jre.home}/bin/java">
-
- <assertions enableSystemAssertions="true">
- <enable />
- </assertions>
-
- <jvmarg line="${hy.test.vmargs}" />
- <jvmarg value="-Djava.awt.headless=true"/>
- <jvmarg value="-Xbootclasspath/a:bin/test/boot${path.separator}${basedir}/../../${junit.jar}"/>
-
- <formatter type="xml" />
-
- <batchtest todir="${tests.output}" haltonfailure="no" >
- <fileset dir="src/test/impl/boot">
- <include name="${converted.tc}" if="test.case" />
- <include name="**/*Headless*Test.java" unless="test.case" />
- <excludesfile name="${awt.exclude.file}" unless="test.case"/>
- </fileset>
- <fileset dir="${hy.awt.src.test.impl.platform}">
- <include name="${converted.tc}" if="test.case" />
- <include name="**/*Headless*Test.java" unless="test.case" />
- <excludesfile name="${awt.exclude.file}" unless="test.case"/>
- </fileset>
- </batchtest>
- </junit>
-
- <antcall target="touch-failures-file" />
- <antcall target="touch-errors-file" />
-
- </target>
-
- <target name="touch-failures-file" if="test.failures">
- <echo file="${tests.output}/test.failures"
- append="true">awt${line.separator}</echo>
- </target>
-
- <target name="touch-errors-file" if="test.errors">
- <echo file="${tests.output}/test.errors"
- append="true">awt${line.separator}</echo>
+ <target name="run-tests" depends="test-jar">
+ <ant dir="${tests.hdk.dir}" target="test-module" />
</target>
</project>
Added: harmony/enhanced/classlib/trunk/modules/awt/make/run-test.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/awt/make/run-test.xml?rev=795358&view=auto
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/awt/make/run-test.xml (added)
+++ harmony/enhanced/classlib/trunk/modules/awt/make/run-test.xml Sat Jul 18 12:45:33 2009
@@ -0,0 +1,55 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You 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="Harmony AWT Test" default="test" basedir=".">
+
+ <property name="hy.hdk" location="../../.." />
+ <property name="test.jre.home" location="${hy.hdk}/jdk/jre" />
+ <property file="../test.properties" />
+ <import file="../../ant/properties.xml" />
+
+ <property name="work.dir" value=".." />
+ <property name="target.dir" value=".." />
+ <property name="tests.output" location="../report" />
+ <property name="junit.jar" location="../junit.jar" />
+
+ <target name="test" depends="test-module" />
+
+ <target name="test-module" depends="test-jre-vm-info">
+ <convert-test-as-class from="test.case" to="converted.tc.class" />
+
+ <!-- bootclasspath tests -->
+ <run-hdk-tests module="awt" jar="awt_boot_tests.jar">
+ <junit-elements>
+ <jvmarg value="-Xbootclasspath/a:awt_boot_tests.jar${path.separator}../junit.jar"/>
+ </junit-elements>
+ </run-hdk-tests>
+
+ <!-- classpath tests -->
+ <run-hdk-tests module="awt" jar="awt_tests.jar" />
+
+ <!-- headless tests -->
+ <run-hdk-tests module="awt" jar="awt_headless_tests.jar">
+ <junit-elements>
+ <jvmarg value="-Djava.awt.headless=true"/>
+ <jvmarg value="-Xbootclasspath/a:awt_boot_tests.jar${path.separator}../junit.jar"/>
+ </junit-elements>
+ </run-hdk-tests>
+ </target>
+
+</project>
Propchange: harmony/enhanced/classlib/trunk/modules/awt/make/run-test.xml
------------------------------------------------------------------------------
svn:eol-style = native