harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From var...@apache.org
Subject svn commit: r500180 - in /harmony/enhanced/drlvm/trunk: build/make/build.xml build/make/targets/ehwa.test.xml build/make/test.properties vm/tests/ehwa/ vm/tests/ehwa/ehwa.zip
Date Fri, 26 Jan 2007 08:29:04 GMT
Author: varlax
Date: Fri Jan 26 00:29:03 2007
New Revision: 500180

URL: http://svn.apache.org/viewvc?view=rev&rev=500180
Log:
HARMONY-752 Simple automated Eclipse scenario
Tested on Win32, SUSE9@ia32 SUSE9@x64

Added:
    harmony/enhanced/drlvm/trunk/build/make/targets/ehwa.test.xml
    harmony/enhanced/drlvm/trunk/vm/tests/ehwa/
    harmony/enhanced/drlvm/trunk/vm/tests/ehwa/ehwa.zip   (with props)
Modified:
    harmony/enhanced/drlvm/trunk/build/make/build.xml
    harmony/enhanced/drlvm/trunk/build/make/test.properties

Modified: harmony/enhanced/drlvm/trunk/build/make/build.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/build/make/build.xml?view=diff&rev=500180&r1=500179&r2=500180
==============================================================================
--- harmony/enhanced/drlvm/trunk/build/make/build.xml (original)
+++ harmony/enhanced/drlvm/trunk/build/make/build.xml Fri Jan 26 00:29:03 2007
@@ -406,6 +406,11 @@
         <ant antfile="targets/kernel.test.xml" target="kernel.test"/>
     </target>
 
+    <!-- Main target to run Eclipse HelloWorld test scenario -->
+    <target name="ehwa.test" depends="init" >
+        <ant antfile="targets/ehwa.test.xml" target="ehwa"/>
+    </target>
+
     <!-- Main target to run jvmti tests /-->
     <target name="jvmti.test" depends="setup, init">
         <if>

Added: harmony/enhanced/drlvm/trunk/build/make/targets/ehwa.test.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/build/make/targets/ehwa.test.xml?view=auto&rev=500180
==============================================================================
--- harmony/enhanced/drlvm/trunk/build/make/targets/ehwa.test.xml (added)
+++ harmony/enhanced/drlvm/trunk/build/make/targets/ehwa.test.xml Fri Jan 26 00:29:03 2007
@@ -0,0 +1,172 @@
+<!--
+     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="Eclipse HelloWorld test scenario">
+
+    <property name="test.jvm.exe" value="${build.deploy.dir}/jdk/jre/bin/java"/>
+    <property file="test.properties"/>
+    <property environment="env" />
+    
+    <condition property="os" value="win">
+        <os family="Windows" />
+    </condition>
+    <condition property="os" value="linux">
+        <os name="linux" />
+    </condition>
+    <condition property="arch" value="x86_64">
+        <or>
+            <equals arg1="x86_64" arg2="${os.arch}"/>
+            <equals arg1="amd64" arg2="${os.arch}"/>
+        </or>
+    </condition>
+    <condition property="arch" value="x86">
+        <or>
+            <equals arg1="x86" arg2="${os.arch}"/>
+            <equals arg1="i386" arg2="${os.arch}"/>
+        </or>
+    </condition>
+    <condition property="arch" value="ia64">
+        <equals arg1="ia64" arg2="${os.arch}"/>
+    </condition>
+
+    <propertycopy name="eclipse.url" from="eclipse.${os}.${arch}.url"/>
+    <basename file="${eclipse.url}" property="eclipse.zip"/>
+
+    <target name="ehwa" depends="setup-ehwa, run-ehwa, check-ehwa-result"/>
+
+    <target name="setup-ehwa" depends="check-depends, install-eclipse, install-plugin">
+        <delete quiet="true" file="${build.semi.dir}/ehwa/ehwa.status" />
+        <echo>Using Eclipse located at ${eclipse.home}</echo>
+    </target>
+
+    <target name="run-ehwa">
+        <for list="${ehwa.test.mode}" param="mode"
+            trim="true" keepgoing="true">
+            <sequential>
+                <antcall target="-run-ehwa-batch">
+                    <param name="ehwa.mode" value="@{mode}" />
+                </antcall>
+            </sequential>
+        </for>
+    </target>
+    
+    <target name="-run-ehwa-batch">
+        <property name="ehwa.workspace" value="${build.semi.dir}/ehwa/wksp"/>
+        <delete quiet="true" dir="${ehwa.workspace}" />
+        <mkdir dir="${ehwa.workspace}"/>
+        <propertycopy property="ehwa.mode.name" from="${ehwa.mode}.name" override="on"/>
+        <propertycopy property="ehwa.mode.switch" from="${ehwa.mode}.switch" override="on"/>
+        <echo>
+        ==================================
+        Run Eclipse HelloWorld using ${ehwa.mode.name}
+        ==================================
+        </echo>
+
+        <java fork="true" jvm="${test.jvm.exe}" jar="${eclipse.home}/startup.jar" resultproperty="ehwa.result">
+            <jvmarg value="${ehwa.mode.switch}" />
+            <arg line="-application org.eclipse.test.uitestapplication"/>
+            <arg line="-dev bin"/>
+            <arg line="-data ${ehwa.workspace}"/>
+            <arg line="formatter=org.apache.tools.ant.taskdefs.optional.junit.PlainJUnitResultFormatter"/>
+            <arg line="-testPluginName HelloAuto"/>
+            <arg line="-className HelloAuto.CreateAndRunTest"/>
+        </java>
+        <condition property="ehwa.status" value="PASSED" else="FAILED">
+            <equals arg1="${ehwa.result}" arg2="0"/>
+        </condition>
+        <concat append="on" destfile="${build.semi.dir}/ehwa/ehwa.status" 
+            >      ${ehwa.mode.name} ${ehwa.status} (Return code is ${ehwa.result})${line.separator}</concat>
+    </target>
+
+    <target name="check-ehwa-result">
+        <loadfile property="ehwa.test.summary" 
+            srcFile="${build.semi.dir}/ehwa/ehwa.status"/>
+        <echo message="  ***************************${line.separator}"/>
+        <echo message="  **** Eclipse HWA status ***${line.separator}"/>
+        <echo message="  ***************************${line.separator}"/>
+        <echo message="${line.separator}"/>
+        <echo message="${ehwa.test.summary}"/>
+        <echo message="${line.separator}"/>
+
+        <condition property="test.failed">
+            <contains string="${ehwa.test.summary}" substring="FAILED" />
+        </condition>
+        <fail unless="run.all.tests" if="test.failed" message="Eclipse HelloWorld scenario
FAILED"/>
+    </target>
+
+    <target name="check-depends">
+        <condition property="eclipse.home" value="${env.ECLIPSE_HOME}">
+            <and>
+                <isset property="env.ECLIPSE_HOME"/>
+                <available file="${env.ECLIPSE_HOME}/startup.jar"/>
+          </and>
+        </condition>
+        <condition property="eclipse.home" value="${build.semi.dir}/ehwa/eclipse">
+            <available file="${build.semi.dir}/ehwa/eclipse/startup.jar"/>
+        </condition>
+        <condition property="eclipse.available">
+            <or>
+                <isset property="eclipse.home"/>
+                <available file="${build.precopied.dir}/archives/${eclipse.zip}"/>
+            </or>
+        </condition>
+        <condition property="ehwa.plugin.installed">
+            <and>
+                <isset property="eclipse.home"/>
+                <available file="${eclipse.home}/plugins/HelloAuto_0.0.1/HelloAuto.jar"/>
+            </and>
+        </condition>
+    </target>
+
+    <target name="download-eclipse" unless="eclipse.available">
+        <get dest="${build.precopied.dir}/archives/${eclipse.zip}" src="${eclipse.url}"
+            usetimestamp="true" verbose="true"/>
+    </target>
+
+    <target name="install-eclipse" depends="download-eclipse" unless="eclipse.home">
+        <delete quiet="true" dir="${build.semi.dir}/ehwa" />
+        <mkdir dir="${build.semi.dir}/ehwa"/>
+        
+        <if>
+            <isfileselected file="${eclipse.zip}">
+                <filename name="**/*.tar.gz"/>
+            </isfileselected>
+            <then>
+                <gunzip src="${build.precopied.dir}/archives/${eclipse.zip}" dest="${build.semi.dir}/ehwa/eclipse.tar"
/>
+                <untar src="${build.semi.dir}/ehwa/eclipse.tar" dest="${build.semi.dir}/ehwa"
/>
+                <delete file="${build.semi.dir}/ehwa/eclipse.tar"/>
+            </then>
+            <elseif>
+                <isfileselected file="${eclipse.zip}">
+                    <filename name="**/*.zip"/>
+                </isfileselected>
+                <then>
+                    <unzip dest="${build.semi.dir}/ehwa" src="${build.precopied.dir}/archives/${eclipse.zip}"/>
+                </then>
+            </elseif>
+            <else>
+                <fail>Unhandled archive type: ${eclipse.zip}</fail>
+            </else>
+        </if>
+        <property name="eclipse.home" value="${build.semi.dir}/ehwa/eclipse"/>
+    </target>
+
+    <target name="install-plugin" unless="ehwa.plugin.installed">
+        <unzip src="${build.VM.home}/tests/ehwa/ehwa.zip" dest="${eclipse.home}"/>
+    </target>
+
+</project>

Modified: harmony/enhanced/drlvm/trunk/build/make/test.properties
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/build/make/test.properties?view=diff&rev=500180&r1=500179&r2=500180
==============================================================================
--- harmony/enhanced/drlvm/trunk/build/make/test.properties (original)
+++ harmony/enhanced/drlvm/trunk/build/make/test.properties Fri Jan 26 00:29:03 2007
@@ -11,7 +11,8 @@
 # which jit or interpreter
 #
 # valid values are comma separated list
-# of "jet", "opt" and "int"
+# of VM execution modes, 
+# like defined below "jet", "opt" and "int"
 #
 kernel.test.mode=jet,opt,int
 
@@ -39,9 +40,16 @@
 #  kernel.test.timeout
 #
 #  time limit to complete kernel test run
-#  in units of ???
+#  in units of milliseconds
 kernel.test.timeout=3600000
 
+#--------------------------------------------
+#
+#  VM execution modes definitions
+#
+#  <mode>.name		human readable description of the mode
+#  <mode>.switch	cmd-line options to turn the mode on; 
+#					beware to avoid empty switch
 
 jit.name=Client mode JIT (default)
 jit.switch=-Dbogus
@@ -55,4 +63,22 @@
 int.name=interpreter
 int.switch=-Xint
 
+#--------------------------------------------
+#
+#  Eclipse HelloWorld development scenario (aka EHWA)
+#
+#  ehwa.test.mode	comma separated list of modes to run EHWA on
+
+ehwa.test.mode=jet,opt,int
 
+# Locations to obtain platform specific Eclipse SDK bundle
+# A bundle will be downloaded and stored for local use, unless 
+# ECLIPSE_HOME environment variable points to existing Eclipse installation
+ 
+eclipse.mirror=http://www.mirrorservice.org/sites/download.eclipse.org/eclipseMirror/eclipse/downloads/drops/R-3.2.1-200609210945
+eclipse.win.x86.url=${eclipse.mirror}/eclipse-SDK-3.2.1-win32.zip
+eclipse.win.x86_64.url=${eclipse.mirror}/eclipse-SDK-3.2.1-win32-x86_64.zip
+eclipse.win.ia64.url=${eclipse.mirror}/eclipse-SDK-3.2.1-win32-ia64.zip
+eclipse.linux.x86.url=${eclipse.mirror}/eclipse-SDK-3.2.1-linux-gtk.tar.gz
+eclipse.linux.x86_64.url=${eclipse.mirror}/eclipse-SDK-3.2.1-linux-gtk-x86_64.tar.gz
+eclipse.linux.ia64.url=${eclipse.mirror}/eclipse-SDK-3.2.1-linux-gtk-ia64.tar.gz

Added: harmony/enhanced/drlvm/trunk/vm/tests/ehwa/ehwa.zip
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/tests/ehwa/ehwa.zip?view=auto&rev=500180
==============================================================================
Binary file - no diff available.

Propchange: harmony/enhanced/drlvm/trunk/vm/tests/ehwa/ehwa.zip
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream



Mime
View raw message