harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From smish...@apache.org
Subject svn commit: r543394 [1/3] - in /harmony/enhanced/buildtest/branches/2.0: adaptors/ega/ tests/ega/
Date Fri, 01 Jun 2007 05:22:51 GMT
Author: smishura
Date: Thu May 31 22:22:50 2007
New Revision: 543394

URL: http://svn.apache.org/viewvc?view=rev&rev=543394
Log:
Apply patch from HARMONY-3467:
([testing] Eclipse long-running scenario)

Added:
    harmony/enhanced/buildtest/branches/2.0/adaptors/ega/
    harmony/enhanced/buildtest/branches/2.0/adaptors/ega/adaptor.xml   (with props)
    harmony/enhanced/buildtest/branches/2.0/adaptors/ega/parameters.xml   (with props)
    harmony/enhanced/buildtest/branches/2.0/tests/ega/
    harmony/enhanced/buildtest/branches/2.0/tests/ega/EGA.txt   (with props)
    harmony/enhanced/buildtest/branches/2.0/tests/ega/README.txt   (with props)
    harmony/enhanced/buildtest/branches/2.0/tests/ega/build.xml   (with props)
    harmony/enhanced/buildtest/branches/2.0/tests/ega/ega.properties   (with props)
    harmony/enhanced/buildtest/branches/2.0/tests/ega/ega_eclipse_3.2.1.au3
    harmony/enhanced/buildtest/branches/2.0/tests/ega/ega_eclipse_3.2.1.pl   (with props)
    harmony/enhanced/buildtest/branches/2.0/tests/ega/test.java   (with props)

Added: harmony/enhanced/buildtest/branches/2.0/adaptors/ega/adaptor.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/buildtest/branches/2.0/adaptors/ega/adaptor.xml?view=auto&rev=543394
==============================================================================
--- harmony/enhanced/buildtest/branches/2.0/adaptors/ega/adaptor.xml (added)
+++ harmony/enhanced/buildtest/branches/2.0/adaptors/ega/adaptor.xml Thu May 31 22:22:50 2007
@@ -0,0 +1,70 @@
+<?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. 
+-->
+
+<!-- ======================================================================
+           BT Adaptor for Eclipse Geronimo Application (EGA) scenario
+     ====================================================================== -->
+<project name="ega" default="run" basedir=".">
+    
+    <!-- SETUP -->
+    <target name="setup" description="Setup configuration for EGA scenario run">
+        <log message="============= Adaptor for ${suite.name}: Set Up ..."/>
+        <svn-update-bt path="${tests.sources.dir}/${suite.name}"/>
+        <exec-ant dir="${test.sources.dir}/${suite.name}" 
+                  targets="setup">
+            <sysproperty key="eclipse.download.address"  value="${ega.parameters.optional.eclipse.download.address}"/>
+            <sysproperty key="maven.download.address"    value="${ega.parameters.optional.maven.download.address}"/>
+            <sysproperty key="maven.version"             value="${ega.parameters.optional.maven.version}"/>
+            <sysproperty key="geronimo.download.address" value="${ega.parameters.optional.geronimo.download.address}"/>
+            <sysproperty key="download.dir"              value="${external.arch.dir}"/>
+            <sysproperty key="install.dir"               value="${external.libs.dir}"/>
+        </exec-ant>
+      </target>
+    
+    <!-- RUN -->
+    <target name="run">
+        <log message="============= Adaptor for ${suite.name}: Run ..."/>
+        <exec-ant dir="${test.sources.dir}/${suite.name}" 
+                  targets="run"
+                  failonerror="false"
+                  failproperty="ega.run.failed">
+            <sysproperty key="download.dir"                 value="${external.arch.dir}"/>
+            <sysproperty key="install.dir"                  value="${external.libs.dir}"/>
+            <sysproperty key="result.dir"                   value="${results.dir}/${suite.name}"/>
+            <sysproperty key="tested.jre"                   value="${tested.runtime}"/>
+            <sysproperty key="iteration.num"                value="${ega.parameters.optional.iteration.num}"/>
+            <sysproperty key="run.time"                     value="${ega.parameters.optional.run.time}"/>
+            <sysproperty key="delay.factor"                 value="${ega.parameters.optional.delay.factor}"/>
+            <sysproperty key="kill.eclipse"                 value="${ega.parameters.optional.kill.eclipse.process}"/>
+            <sysproperty key="tested.jre.options"           value="${ega.parameters.optional.tested.vm.options}"/>
+            <sysproperty key="tested.jre.options.for.debug" value="${ega.parameters.optional.tested.vm.options.for.debug}"/>
+        </exec-ant>
+
+        <fail message="EGA scenario failed." if="ega.run.failed"/>
+    </target>
+    
+    <!-- CLEAN -->
+    <target name="clean">    
+        <log message="============= Adaptor for ${suite.name}: Clean ..."/>
+        <log message="Removing all generated data from ${test.sources.dir}/${suite.name} ..."/>
+        <delete dir="${test.sources.dir}/${suite.name}/project"/>
+        <delete dir="${test.sources.dir}/${suite.name}/workspace"/>
+        <delete file="${test.sources.dir}/${suite.name}/test.class"/>
+    </target>
+
+</project>

Propchange: harmony/enhanced/buildtest/branches/2.0/adaptors/ega/adaptor.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: harmony/enhanced/buildtest/branches/2.0/adaptors/ega/parameters.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/buildtest/branches/2.0/adaptors/ega/parameters.xml?view=auto&rev=543394
==============================================================================
--- harmony/enhanced/buildtest/branches/2.0/adaptors/ega/parameters.xml (added)
+++ harmony/enhanced/buildtest/branches/2.0/adaptors/ega/parameters.xml Thu May 31 22:22:50 2007
@@ -0,0 +1,66 @@
+<?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. 
+-->
+
+<parameters depends="hdk">
+    
+    <required>
+        <tested.runtime
+            description="Path to tested JRE with debug support (JDWP required)" 
+            value="${hdk.parameters.shared.binaries.jre.dir}"/>
+    </required>
+    
+    <optional>
+        <tested.vm.options
+            description="Tested VM options for Eclipse launching" 
+            value="-showversion -Xmx600M -Xms512M"/>
+        <tested.vm.options.for.debug
+            description="Tested VM options for EGA debuggee" 
+            value=""/>
+        <iteration.num
+            description="Number of iterations for the scenario to pass" 
+            value="0"/>
+         <run.time
+            description="Time in hours for the scenario to pass. Ignored if used along with non-zero iteration.num" 
+            value="48"/>
+         <delay.factor
+            description="Factor used in time delays inside the scenario" 
+            value="2"/>  
+         <kill.eclipse.process
+            description="Kill Eclipse if scenario fails. Possible values: 0 - not kill, 1 - kill" 
+            value="1"/>  
+         <eclipse.download.address
+            description="Url where Eclipse 3.2.1 archives can be found" 
+            value="http://mirrors.nsa.co.il/eclipse/eclipse/downloads/drops/R-3.2.1-200609210945"/>
+         <maven.version
+            description="Version of maven used for Geronimo building" 
+            value="2.0.4"/>
+         <maven.download.address
+            description="Url where Maven archives can be found" 
+            value="http://apache.mirror.nedlinux.nl/maven/binaries"/>
+         <geronimo.download.address
+            description="Url where Geronimo 1.2-beta source archives can be found" 
+            value="http://apache.ziply.com/geronimo/1.2-beta"/>
+    </optional>
+
+    <external/>
+    
+    <shared/> 
+    
+    <cc/>
+
+</parameters>

Propchange: harmony/enhanced/buildtest/branches/2.0/adaptors/ega/parameters.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: harmony/enhanced/buildtest/branches/2.0/tests/ega/EGA.txt
URL: http://svn.apache.org/viewvc/harmony/enhanced/buildtest/branches/2.0/tests/ega/EGA.txt?view=auto&rev=543394
==============================================================================
--- harmony/enhanced/buildtest/branches/2.0/tests/ega/EGA.txt (added)
+++ harmony/enhanced/buildtest/branches/2.0/tests/ega/EGA.txt Thu May 31 22:22:50 2007
@@ -0,0 +1,357 @@
+Eclipse Geronimo Application (EGA) scenario for Eclipse 3.2.1
+
+-------------------------------------------------------------
+ This file describes original manual EGA test scenario 
+ after which the automated EGA scenario was developed
+-------------------------------------------------------------
+
+Software requirements:
+
+	1. Eclipse-SDK-3.2.1
+	2. J2SE 1.5 JDK
+	3. Maven 2.0.4 (or higher)
+
+Preparation:
+
+1. Create workspace folders tree
+	<working_dir>
+	<working_dir>/project
+	<working_dir>/.m2/repository
+
+2. Download Geronimo-1.2-beta sources archive (geronimo-1.2-beta-src.*),
+   for example, from http://apache.ziply.com/geronimo/1.2-beta.
+   Unpack it to <working_dir>/project/geronimo-1.2-beta directory.
+
+3. Edit maven repository location in <maven_home>/conf/settings.xml 
+   to point to <working_dir>/project/.m2/repository directory.
+   Edit proxy settings if needed.
+
+4. Set JAVA_HOME to point to JDK 1.5. Set MAVEN_OPTS=-Xmx512m. 
+   If you are using the SUN JDK, you may also need to increase 
+   the maximum permanent size: MAVEN_OPTS="-Xmx512m -XX:MaxPermSize=128m"
+   
+   Change directory to <working_dir>/project/geronimo-1.2-beta and call:
+
+	<maven_home>/bin/mvn eclipse:eclipse
+
+   This command prepares Geronimo projects to work with Eclipse.
+   
+5. Clean scenario run configuration:
+
+   	- Remove all data from <eclipse_home>/configuration directory,
+   	  except config.ini file.
+   	  
+   	- Remove <working_dir>/workspace directory if present.
+   
+6. Follow EGA steps
+
+
+EGA steps:
+
+
+1. Start Eclipse
+
+	1.1 Start Eclipse 3.2.1 on the tested JRE. The following commands may be used:
+	
+		<java_home>/bin/java -Xmx1024M -Xms512M \
+		                     -cp <eclipse_home>/startup.jar \
+							 -Dosgi.install.area=<eclipse_home> \
+							 org.eclipse.core.launcher.Main \
+							 -ws $ws -os $os -arch $os_arch 
+		or
+	    	
+	    <eclipse_home>/eclipse -vm <java_home>/bin/java -vmargs -Xmx1024M -Xms512M
+	    	
+	    'Workspace Launcher' window should popup.
+
+	1.2 Select <working_dir>/workspace as Eclipse workspace directory. Press OK button.
+
+    1.3 Check that 'Java - Eclipse SDK' window is appeared.
+
+
+2. Prepare environment
+
+	2.1 Close 'Welcome' page.
+
+    2.2 Uncheck Project->Build Automatically.
+
+    2.3 Select 'Window->Preferences'.
+
+    2.4 On the left plane of Preferences window select Java->Build Path->Classpath Variables.
+
+	2.5 Press 'New' button.
+        Ensure that widow 'New Variable Entry' appeared.
+
+    2.5 Type 'M2_REPO' as variable name and '<working_dir>/project/.m2/repository' as value.
+        Press OK button.
+
+ 
+3. Importing project from <working_dir>/project
+
+	3.1 Select 'File->Import...'
+        Ensure that widow 'Import' appeared.
+
+	3.2 Select 'General->Existing Projects into Workspace'.
+        Press 'Next' button.
+
+	3.3 Select root directory: <working_dir>/project/geronimo-1.2-beta/modules.
+	    Press Browse or Refresh button. 
+        Check that Geronimo modules are recognized as projects.
+
+	3.4 Select the following 26 modules to import:
+	
+			ge-activemq-rar
+			geronimo-activation
+			geronimo-activemq-gbean-management
+			geronimo-axis
+			geronimo-client
+			geronimo-clustering
+			geronimo-clustering-wadi
+			geronimo-common
+			geronimo-converter
+			geronimo-core
+			geronimo-deploy-config
+			geronimo-deploy-jsr88
+			geronimo-derby
+			geronimo-interceptor
+			geronimo-j2ee
+			geronimo-jmx-remoting
+			geronimo-kernel
+			geronimo-mail
+			geronimo-management
+			geronimo-naming
+			geronimo-security
+			geronimo-system
+			geronimo-transaction
+			geronimo-transformer
+			geronimo-util
+			geronimo-webservices
+
+	3.5 Check 'Copy projects into workspace'.
+
+	3.6 Press 'Finish' button. 
+        Wait until Geronimo modules imported into workspace.
+
+	3.7 Select 'File->Import...'
+        Ensure that widow 'Import' appeared.
+
+	3.8 Select 'General->Existing Projects' into Workspace.
+        Press 'Next' button.
+
+	3.9 Select root directory: <working_dir>/project/geronimo-1.2-beta/testsupport
+	    Press Browse or Refresh button. 
+        Check that Geronimo testsupport modules are recognized as projects.
+
+	3.10 Press Finish button. 
+         Wait until Geronimo testsupport modules imported into workspace.
+
+
+4. Clean projects
+
+	4.1 Select 'Project->Clean'. Wait until 'Clean' window appeared.
+
+	4.2 Uncheck 'Start a build immediately'. Press OK button.
+        Wait till projects are cleaned.
+
+
+5. Build projects
+
+	5.1 Select 'Project->Build All'. Wait till projects are built. 
+
+
+6. Open Navigator view 
+
+	6.1 Select 'Window->View->Navigator'
+	    Check that 'Navigator' view is opened.
+	
+
+7. Fix JUnit test from geronimo-common module (skip if already fixed)
+
+	7.1 Select 'Navigate->Open Resource'.
+	
+	7.2 Type PropertyEditorsTest.java in 'Open Resource' dialog.
+	    Press OK button. Check that PropertyEditorsTest.java is opened.
+	    
+	7.3 Select 'Navigate->Go to Line...'
+	
+	7.4 In 'Go to Line' dialog type line number 52 to go to 
+	    string 'protected void setUp() throws Exception {'.
+	
+	7.5 Press ENTER and add line 
+	    Class.forName("org.apache.geronimo.common.propertyeditor.PropertyEditors");
+	    to setUp() method.
+	    
+	7.6 Save PropertyEditorsTest.java
+	
+	7.7 Close PropertyEditorsTest.java
+
+
+8.  Run JUnit tests from geronimo-common module
+
+	8.1 In Navigator pane select geronimo-common module.
+
+	8.2 Select 'Run->Run...' Wait till 'Run' window appeared.
+	
+	8.3 In the left pane of 'Run' window select JUnit.
+                  
+	8.4 Press 'New' button.
+        Wait till new configuration is created.
+            
+	8.5 Press 'Run' button to run all JUnit tests for geronimo-common project.
+        Wait till tests are run and check run results.
+
+
+9. Modify Java class
+	
+	9.1 In navigator view select geronimo-kernel module and select 'Navigate->Go Into'.
+	    Check that only geronimo-kernel sources displayed in Navigator view.
+
+	9.2 In navigator view expand src->main->java->org->apache->geronimo->gbean; 
+        open GBeanData.java (double click or press Enter).
+        Check that GBeanData class is opened in the main pane.
+
+	9.3 Select 'Edit->Find/Replace...'
+        Wait till Find/Replace dialog is appeared.
+
+	9.4 Search for getAbstractName() method – type getAbstractName in Find edit box 
+	    and press Find button.
+
+	9.5 Close 'Find/Replace' dialog.
+
+	9.6 Press 'End' key to go to the end of line 'public AbstractName getAbstractName() {'
+
+	9.7 Press 'Enter' key and type 'System.out.println("Method getAbstractName() was called!");'
+
+	9.8 Press 'Ctrl+S' or select 'File->Save' to save changes.
+
+
+10. Create JUnit Test
+
+	10.1 In navigator view expand src->test->java->org->apache->geronimo->gbean.
+
+	10.2 Select 'File->New->JUnit Test Case'. 
+        Check that 'New JUnit Test Case' window is appeared.
+
+	10.3 Enter SimpleGBeanDataTest as test name.
+
+	10.4 Enter org.apache.geronimo.gbean.GBeanData as class under test.
+
+	10.5 Press 'Next' button.
+
+	10.6 On the next pane select getAbstractName() as method under test.
+
+	10.7 Press 'Finish' button. Check that SimpleGBeanDataTest.java is created.
+
+	10.8 Find string fail(""Not yet implemented""); and replace it with 
+         System.out.println(new GBeanData().getAbstractName());
+
+	10.9 Save SimpleGBeanDataTest.java test
+
+	10.10 Close SimpleGBeanDataTest.java test
+
+
+11. Build project 
+
+	11.1 Select 'Project->Build Project'. 
+	     Wait till project geronimo-kernel is built.
+
+
+12. Run created JUnit test
+
+	12.1 In navigator view select SimpleGBeanDataTest.java, 
+         select 'Run->Run As->JUnit Test'. Wait till test is run. 
+         Check test run result.    
+        
+
+13. Debug
+
+	13.1 Click on GBeanData.java in the main pane, select 'Navigate->Go' to Line or press 'Ctrl+L'. 
+         Wait till 'Go to Line' dialog appeared.
+
+	13.2 Type 75 as line number and press OK button.
+
+	13.3 Ensure that cursor is on System.out.println("Method getAbstractName() was called!"); 
+         and select 'Run->Toggle Line Breakpoint'. Ensure that breakpoint is set.
+
+	13.4 Select 'Run->Debug...' Wait Debug window to appear.
+
+	13.5 Select JUnit->SimpleGbeanDataTest configuration, set vm options on Arguments tab,
+	     if needed, and press Debug button.
+
+	13.6 When 'Confirm Perspective Switch' dialog appears click YES 
+
+	13.7 Check that debug is stopped at breakpoint: the corresponding GBeanData.java line is highlighted.
+
+	13.8 Click 'Step Over' icon (or use F6); check that 'Method getAbstractName() was called!' appeared in the console.
+
+	13.9 Click 'Step Over' icon (or use F6); check SimpleGbeanDataTest.java is opened and 'null' appeared in the console.
+
+	13.10 Click 'Step Over' icon (or use F6) one more time.
+
+	13.11 Click 'Resume' icon (or use F8); check that debug process is terminated.
+
+
+14. Switch to Java perspective
+
+	14.1 Select 'Window->Open Perspective->Java'. Check that Java perspective is appeared.
+
+	14.2 Close SimpleGbeanDataTest.java.
+
+
+15. Clean environment: unset breakpoint 
+
+	15.1 Open GBeanData.java source if it is not opened, 
+         Go to line System.out.println("Method getAbstractName() was called!"); 
+         Unset breakpoint.
+
+
+16. Clean environment: remove class modifications 
+
+	16.1 Open GBeanData.java source if it is not opened, 
+         Delete line System.out.println("Method getAbstractName() was called!"); 
+         Click 'Ctrl+S' to save changes, close Class.java
+
+
+17. Clean environment: remove JUnit test 
+
+	17.1 In Navigator view select SimpleGbeanDataTest.java press delete.
+
+	17.2 When confirm test deletion dialog appears press Yes button.
+
+
+18. Clean environment: remove run configurations
+
+	18.1 Select 'Run->Run...' Wait 'Run' window to appear.
+
+	18.2 Select JUnit->SimpleGBeanDataTest configuration in right pane, press Delete.
+
+	18.3 When 'Confirm Launch Configuration' dialog appears press OK button.
+
+	18.4 Select JUnit->geronimo-common configuration in right pane, press 'Delete'.
+
+	18.5 When 'Confirm Launch Configuration' dialog appears press OK button.
+
+	18.6 Close 'Run' window.
+
+
+19. Clean environment: reset Java perspective
+	
+	19.1 Select 'Window->Reset Perspective'. Check that perspective is reset. 
+
+	19.2 Restore folders structure in Package Explorer view.
+
+
+20. Help
+
+	20.1 Select 'Help->Help Contents'. Check that Help window is opened.
+
+ 	20.2 Close Help.
+
+	
+Repeat steps 4-20 N times
+
+21. Exit Eclipse
+
+
+
+

Propchange: harmony/enhanced/buildtest/branches/2.0/tests/ega/EGA.txt
------------------------------------------------------------------------------
    svn:eol-style = native

Added: harmony/enhanced/buildtest/branches/2.0/tests/ega/README.txt
URL: http://svn.apache.org/viewvc/harmony/enhanced/buildtest/branches/2.0/tests/ega/README.txt?view=auto&rev=543394
==============================================================================
--- harmony/enhanced/buildtest/branches/2.0/tests/ega/README.txt (added)
+++ harmony/enhanced/buildtest/branches/2.0/tests/ega/README.txt Thu May 31 22:22:50 2007
@@ -0,0 +1,405 @@
+
+      =================================================================
+                 ECLIPSE LONG-RUNNING SCENARIO FOR BT 2.0
+      =================================================================
+
+
+This archive contains the contribution to the Apache Harmony project from Intel.
+The contribution consists from the following component: 
+    
+    - Eclipse 3.2.1 Geronimo Application (EGA) automated GUI test scenario
+
+The purpose of this test scenario is to make sure that JRE implementation
+under test (Harmony primarily) is able to run Eclipse-3.2.1 long enough
+to allow a user perform some development work in Eclipse-3.2.1. 
+
+Scenario automation is based on AutoIt3 tool (http://www.autoitscript.com/autoit3) on Windows* 
+and X11 GUITest tool (http://sourceforge.net/projects/x11guitest) on Linux.
+Geronimo 1.2-beta sources are used as the developing project.
+
+Archive also contains configs and scripts for running EGA scenario
+under Build Test Infrastructure 2.0 (HARMONY-3501).
+
+The BT 2.0 provides features which allow:
+
+  - Run EGA on just built Harmony
+  - Run EGA in standalone mode (once)
+  - Run EGA in continuous mode using Cruise Control Tool 
+
+Please, refer to BT README.txt concerning detailed BuildTest infrastructure description.  
+Please, refer to EGA.txt concerning initial (manual) EGA scenario description.
+
+
+CONTENTS
+========
+
+ +/
+  |-+/adaptors/                       - Adaptors connecting test suites to the Build Test
+  |   |
+  |   |-+/ega/                        - EGA adaptor directory
+  |         |
+  |         |--adaptor.xml            - The adaptor used by BT
+  |         |
+  |         |--parameters.xml         - Parameters file used by BT
+  |  
+  |  
+  |-+/tests/                          - Test suites connected to Build Test
+      |   
+      |-+/ega/                        - EGA test scenario directory
+            |
+            |-- build.xml             - Build file used for EGA setup/run 
+            |
+            |-- ega_eclipse_3.2.1.au3 - Script for running EGA on Windows*           
+            |
+            |-- ega_eclipse_3.2.1.pl  - Script for running EGA on Linux 
+            |
+            |-- ega.properties        - Properties file used for running EGA  
+            |                           outside of BT infrastructure        
+            |
+            |-- EGA.txt               - Manual scenario description
+            |
+            |-- test.java             - Small class for checking tested JRE options
+            |                           passed to the scenario
+            |
+            |-- README.txt            - This file
+  
+  
+PREREQUISITES
+=============
+
+Supported platforms are: Windows*/ia32, Windows*/em64t, 
+                         Linux/ia32/gtk, Linux/em64t/gtk
+
+The following tools are needed for standalone EGA scenario setup and run:
+
+1) J2SE 1.5 JDK
+
+2) Apache Ant 1.6.5 or better (http://ant.apache.org)  
+   
+3) GUI automated testing tool:
+             
+                   Windows*             |                  Linux
+   ---------------------------------------------------------------------------------
+                   AutoIt3              |         X11 GUITest-0.20  
+   http://www.autoitscript.com/autoit3  | http://sourceforge.net/projects/x11guitest
+                                        |       
+                                                                                                              
+4) Eclipse-3.2.1 (http://www.eclipse.org)
+   Installed automatically during setup step
+
+5) Maven 2.0.4 or higher (http://maven.apache.org)
+   Installed automatically during setup step
+       
+6) Web browser (Internet Explorer* on Windows* and Mozilla on Linux are recommended)
+                      
+EGA run under Build Test may require additional tools and libraries for the framework 
+itself or for the projects enqueued to run along with ega.
+Please, see BT Readmes for details.
+
+NOTE:
+
+1) On Windows* AutoIt3 home should be added to the PATH before the EGA scenario run 
+
+2) The problems may exist with X11 GUITest installation on Linux/em64t.
+   It is recommended to use X11 GUITest-0.20 version.
+   The following steps are standard installation: 
+       1) perl Makefile.PL
+       2) make
+       3) make test 
+       4) make install
+   But for Linux/em64t you may need to correct path to X11 libs 
+   in Makefile.PL before the step 1):
+   
+   'LIBS'  => ['-L/usr/X11R6/lib -L/usr/X/lib -lX11 -lXtst -lXext'], ->
+   'LIBS'  => ['-L/usr/X11R6/lib64 -L/usr/X/lib -lX11 -lXtst -lXext'], 
+  
+   Also, please, do the following change in Makefile generated after the step 1), if needed:
+   
+   LIBC = /lib64/libc.so.6 ->
+   LIBC = /lib64//lib64/libc.so.6
+
+
+RUN EGA SCENARIO UNDER BUILD TEST
+=================================
+
+The following steps should be made to setup EGA:
+
+  1. Check out Build Test 2.0 installer from SVN
+
+       svn co -r HEAD -N http://svn.apache.org/repos/asf/harmony/enhanced/buildtest/trunk
+
+     NOTE: If HARMONY-3501 is not applied yet, please, 
+           download and unpack attached archive to appropriate <BT_DIR>
+            
+  2. Follow the instructions from <BT_DIR>/README.txt to satisfy general BT
+     pre-requisites (install necessary software, specify environment variables,
+     specify SVN proxy settings if necessary).
+
+     NOTE: This partly means update <BT_DIR>/buildtest.* script with your personal settings
+           If you don't have buildtest.bat/buildtest.sh, set JAVA_HOME, ANT_HOME, SVN_HOME, 
+           add corresponding bins to the PATH and call 'ant' (everywhere below) instead of buildtest.
+           
+  3. Unpack this archive to the <BT_DIR> directory
+
+  4. Setup Build Test 2.0 and required suites with the following command, run from <BT_DIR>:
+
+         buildtest -Dtest.suites="hdk,ega" setup
+
+     NOTE: If you don't won't to use the latest built Harmony as tested JRE you may simply run 
+    
+         buildtest -Dtest.suites=ega setup
+     
+  During setup step eclipse-3.2.1, maven-2.0.4 and geronimo-1.2-beta sources
+  archives will be downloaded and unpacked to special dirs under BT infrastructure.
+  Also full geronimo-1.2-beta build will be prepared, which requires
+  additional source download into maven repository.
+
+  NOTE: Size of downloaded software is about 220M.
+
+The following steps should be made to run EGA on the tested JRE:
+
+  5. If needed, correct values of required parameters in <BT_DIR>/required-parameters.properties 
+     file, generated after the setup step. Required parameter for the EGA run is JRE under test.
+     By default it is set to the last built Harmony HDK.
+     
+  6. If needed, set values of the optional parameters in <BT_DIR>/framework.local.properties file.
+     
+     If you want to pass some options to the tested JRE use the following properties:
+    
+       ega.parameters.optional.tested.jre.options=<Tested JRE options>
+           - Sets JRE options for eclipse launching, default is "-showversion -Xms512M -Xmx1024M".
+     
+       ega.parameters.optional.tested.jre.options.for.debug=<Tested JRE options> 
+           - Sets JRE options for the scenario debug step, default is empty string.
+             See tests/ega/EGA.txt concerning debug step description.
+     
+     To configure scenario run, use the following options:
+     
+       ega.parameters.optional.iteration.num=<N>
+           - Sets th number of iterations for the scenario to pass, default value is 0.
+
+       ega.parameters.optional.run.time=<N>         
+           - Sets time in hours for the scenario to pass, default value is 48.
+             Ignored if used along with non-zero iteration.num.                 
+
+       ega.parameters.optional.delay.factor=<N>     
+           - Sets factor used in time delays inside the scenario, default value is 2.
+
+       ega.parameters.optional.kill.eclipse=<0|1>    
+           - Define kill Eclipse or not if the scenario fails, default value is 1.
+             0 - not kill, 1 - kill 
+                 
+     If you want to receive email notification with EGA run results use the properties listed below.
+     NOTE: This feature is applied only if run EGA under Cruise Control
+     
+       framework.parameters.usemail=<smtp server name>
+           - Sets smtp server name, default is framework.parameters.usemail if specified.
+     
+       framework.parameters.usemail.to=<some email address list>
+           - Recipients list, default is framework.parameters.usemail.to if specified.
+      
+       framework.parameters.usemail.from=<some email address>
+           - Sender, default is framework.parameters.usemail.from if specified.
+   
+       framework.parameters.usemail.always=<true/false>
+           - Set to false if you want to receive mail notification only on EGA status change.
+             Default is false.
+     
+     Similarly you may set in framework.local.properties any value of ega optional parameters 
+     indicated in adapters/ega/parameters.xml inside optional tag. 
+     
+     Cruise Control Web Port and Port for JMX console can be specified by the following properties:
+     (please, see BT Readmes for more information)
+     
+       framework.parameters.cc.jmxport=<PortNum> - default is 8000
+       framework.parameters.cc.webport=<PortNum> - default is 8080
+       
+    
+  7. Run EGA on the previously built Harmony HDK with the command:
+
+         buildtest -Dtest.suites="hdk,ega" run
+
+     Or run the EGA in continuous mode under Cruise Control with command:
+
+         buildtest -Dtest.suites="hdk,ega" run-cc
+
+  8. Run EGA on explicitly defined JRE with command:
+     (use <BT_DIR>/required-parameters.properties file to define tested JRE)
+
+           ant -Dtest.suites=ega run
+     Or
+           ant -Dtest.suites=ega run-cc
+
+
+NOTE: Do not any movements on the screen during EGA run, this may causes the scenario fail! 
+      It is better to use a remote machine for running EGA scenario.
+  
+      
+To check task status, if run EGA under Cruise Control, 
+point your browser to http://localhost:<framework.parameters.cc.jmxport>/ 
+Default is http://localhost:8080/
+
+
+NOTE: If you run EGA under Cruise Control along with hdk task, 
+      EGA will be run every time when some changes occurred in hdk modules
+
+      If you run EGA under Cruise Control on some explicitly defined JRE,
+      you should do force build from http://localhost:8080/ page to start EGA execution.
+
+Please, see EGA run results in <BT_DIR>/cc/build/results/ega
+Results are stored in the timestamp dirs under <BT_DIR>/cc/build/results/ega dir.
+Results contains EGA log and may contain Eclipse launching log, 
+Eclipse workspace log and picture of the screen if an error has occurred.
+Logs will be also sent to the email indicated in <BT_DIR>/framework.local.properties file
+
+For more information about Build Test configuration, please, 
+see <BT_DIR>/README.txt and <BT_DIR>/SPEC.txt 
+
+
+RUN EGA OUTSIDE OF BUILD TEST
+==============================
+
+If you don't won’t to run EGA under BT you just need ./test directory data
+from this archive. Unpack it for any convenient <EXTRACT_DIR> and
+do the following steps for EGA setup/run.
+
+ 1) Before the EGA setup update ega.properties file with the actual values if needed. 
+    For the build step you may need to update Eclipse 3.2.1 download address, 
+    Maven download address and version, Geronimo 1.2-beta download address.
+
+ 2) Set JAVA_HOME to JDK 1.5
+
+ 3) To setup EGA scenario call the following command from <EXTRACT_DIR>:
+
+      ant [setup] [-Dhttp.proxyHost=<host>] [-Dhttp.proxyPort=<port>]
+    
+    The following data must appear under <EXTRACT_DIR> directory after setup:
+
+    <EXTRACT_DIR>
+       |
+       +-- /eclipse-3.2.1/            -  Eclipse 3.2.1 home dir
+       |
+       +-- /maven-2.0.4/              -  Maven home dir
+       |
+       +-- /project/                  -  Eclipse test project
+       |     |
+       |     +-- /.m2/                -  Maven repository location
+       |     |
+       |     +-- /geronimo-1.2-beta/  -  Geronimo sources
+       |
+       +-- eclipse-SDK-3.2.1-win32.*  -  Eclipse archive
+       |
+       +-- geronimo-1.2-beta-src.*    -  Geronimo sources archive
+       |
+       +-- maven-2.0.4-bin.*          -  Maven archive
+
+ 4) Update 'EGA scenario run configuration' properties in ega.properties 
+    file with the personal settings (or you may pass it from command line).
+    Default values will be used for optional properties if they are not set.
+   
+    EGA scenario uses the following eight properties during run step:
+      1. tested.jre   - JRE under test (required) 
+      2. eclipse.home - Eclipse 3.2.1 home directory, default value is ./eclipse-3.2.1-os-arch
+      3. iteration.num                
+      4. run.time                    
+      5. delay.factor                
+      6. kill.eclipse                                   
+      7. tested.jre.options                           
+      8. tested.jre.options.for.debug 
+      
+    These properties were already discussed above in 'Run EGA Scenario under BT' section.
+    You may find properties definitions and defaults there or in the ega.properties file.
+    
+ 5) Run EGA from <EXTRACT_DIR> as follows:
+   
+       ant run 
+           
+    Options for the scenario run may be also passed from command line:
+     
+       ant run  -Dtested.jre=<tested_jre_home> \
+                 [-Declipse.home=<eclipse_home>] \
+                 [-Diteration.num=<N>] \
+                 [-Drun.time=<N>] \
+                 [-Ddelay.factor=<N>] \
+                 [-Dkill.eclipse ={0,1}] \
+                 [-Dvm.options="<opt1 opt2 ...>"] \
+                 [-Dvm.debug.options="<opt1 opt2 ...>"]
+
+ The following data must appear under <EXTRACT_DIR> directory after the run:
+
+ <EXTRACT_DIR>
+       |
+       +-- /workspace/               -  Eclipse 3.2.1 workspace dir
+       |
+       +-- /results/                 -  EGA run results
+            |
+            +-- /<date_time>/        
+                  |
+                  +-- EGA.log        -  Scenario log
+                  |
+                  +-- eclipse.log    -  Eclipse log
+                  |
+                  +-- workspace.log  -  Eclipse .log file copied from workspace\.metadata
+                  |
+                  +-- error.*        -  Screen snapshot (present if EGA run fails) 
+            
+      
+ NOTE: Use only 'clean' Eclipse, which isn't bound to any working projects, 
+       for running EGA scenario (<EXTRACT_DIR>/eclipse-3.2.1/ is provided), 
+       because Eclipse configuration will be cleaned during the scenario run!
+
+
+KNOWN ISSUES
+============
+
+    1) Using long paths may cause Geronimo build to behaves unexpectedly 
+       when it hits the 260 char limit for filenames on Windows*.
+       Please, place <BT_DIR> or <EXTRACT_DIR> as close as possible 
+       to disk root to avoid Geronimo build crash during EGA setup.
+
+    2) If any problems appear building Geronimo schemas it is 
+       strongly recommended to build the scenario using Sun JDK* 1.5.
+       
+    3) If the scenario often fails to observe some window, 
+       but no configuration or JRE errors is visible, 
+       it is recommended to increase delay.factor.
+     
+    4) If scenario fails during Help step it's recommended
+       to set Internet Explorer* on Windows* and Mozilla on Linux
+       as default browsers.
+     
+    5) If the scenario fails to observe some menu on Windows*,
+       it is recommended to uncheck 'Hide underlined letters 
+       for keyboard navigation until I press Alt key' in
+       Display properties -> Appearance -> Effects.
+    
+    6) If 'Cannot connect to VM' window appears during scenario 
+       debug step on Harmony Linux em64t build this most probably means 
+       that Harmony can work only in interpreter mode during debug.
+       Please, use tested.jre.options.for.debug=-Xint to fix the problem. 
+  
+    7) Note that Harmony built from classlib&drlvm is not enough 
+       to run EGA scenario because it needs JDWP libraries,
+       so Harmony HDK build may be used for EGA run.
+ 
+    8) If any unexpected problems appear during scenario contiguous run
+       under Cruise Control, it is strongly recommended to run BT framework 
+       using Sun JDK* 1.5.
+      
+    9) If use Remote Desktop Connection for the scenario run you should not 
+       minimize remote desktop window. Also, please, turn off screen saver. 
+       These are needed for correct work of GUI automation tools.
+           
+           
+DISCLAIMER AND LEGAL INFORMATION
+================================
+
+*) Other brands and names are the property of their respective owners.
+
+
+
+
+
+
+
+

Propchange: harmony/enhanced/buildtest/branches/2.0/tests/ega/README.txt
------------------------------------------------------------------------------
    svn:eol-style = native

Added: harmony/enhanced/buildtest/branches/2.0/tests/ega/build.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/buildtest/branches/2.0/tests/ega/build.xml?view=auto&rev=543394
==============================================================================
--- harmony/enhanced/buildtest/branches/2.0/tests/ega/build.xml (added)
+++ harmony/enhanced/buildtest/branches/2.0/tests/ega/build.xml Thu May 31 22:22:50 2007
@@ -0,0 +1,529 @@
+<?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="ega" default="setup" basedir=".">
+    
+    <description>
+        Eclipse 3.2.1 Geronimo Application scenario 
+        for Apache Harmony http://incubator.apache.org/harmony
+    </description>
+
+    <property file="ega.properties"/>
+    
+    <property environment="env"/>
+    
+    <tstamp>
+        <format property="timestamp" pattern="yyyyMMdd_hhmm" />
+    </tstamp>
+    
+    <property name="download.dir" value="${basedir}"/>
+    <property name="install.dir" value="${basedir}"/>
+    
+    <condition property="is.windows">
+        <os family="windows"/>
+    </condition>
+
+    <condition property="is.linux">
+        <and>
+            <os family="unix"/>
+            <os name="linux"/>
+        </and>
+    </condition>
+
+    <condition property="is.64bit">
+        <or>
+            <contains string="${os.arch}" substring="86_64"/>
+            <contains string="${os.arch}" substring="amd64"/>
+        </or>
+    </condition>
+
+    <condition property="is.windows.x86">
+        <and>
+            <isset property="is.windows"/>
+            <not><isset property="is.64bit"/></not>
+        </and>
+    </condition>
+
+    <condition property="is.windows.x86_64">
+        <and>
+            <isset property="is.windows"/>
+            <isset property="is.64bit"/>
+        </and>
+    </condition>
+
+    <condition property="is.linux.x86">
+        <and>
+            <isset property="is.linux"/>
+            <not><isset property="is.64bit"/></not>
+        </and>
+    </condition>
+
+    <condition property="is.linux.x86_64">
+        <and>
+            <isset property="is.linux"/>
+            <isset property="is.64bit"/>
+        </and>
+    </condition>
+    
+    <condition property="platform.supported">
+        <or>
+            <istrue value="${is.windows}"/>
+            <istrue value="${is.linux}"/>
+        </or>                                 
+    </condition>
+    
+    <condition property="eclipse.archive" value="eclipse-SDK-3.2.1-win32.zip">
+           <isset property="is.windows.x86"/>
+    </condition>
+    
+    <condition property="eclipse.archive" value="eclipse-SDK-3.2.1-win32-x86_64.zip">
+           <isset property="is.windows.x86_64"/>
+    </condition>
+    
+    <condition property="eclipse.archive" value="eclipse-SDK-3.2.1-linux-gtk.tar.gz">
+        <isset property="is.linux.x86"/>
+    </condition>
+
+    <condition property="eclipse.archive" value="eclipse-SDK-3.2.1-linux-gtk-x86_64.tar.gz">
+        <isset property="is.linux.x86_64"/>
+    </condition>
+
+    <condition property="eclipse-3.2.1.basedir" value="${install.dir}/eclipse-3.2.1-win-x86">
+        <isset property="is.windows.x86"/>
+    </condition>
+                
+    <condition property="eclipse-3.2.1.basedir" value="${install.dir}/eclipse-3.2.1-win-x86_64">
+        <isset property="is.windows.x86_64"/>
+    </condition>
+                
+    <condition property="eclipse-3.2.1.basedir" value="${install.dir}/eclipse-3.2.l-lnx-x86">
+        <isset property="is.linux.x86"/>
+    </condition>
+
+    <condition property="eclipse-3.2.1.basedir" value="${install.dir}/eclipse-3.2.1-lnx-x86_64">
+        <isset property="is.linux.x86_64"/>
+    </condition>
+
+    <property name="eclipse-3.2.1.homedir" value="${eclipse-3.2.1.basedir}/eclipse"/>
+
+    <condition property="eclipse.exists">
+        <available file="${eclipse-3.2.1.homedir}/startup.jar"/>
+    </condition>
+
+    <condition property="eclipse.archive.exists">
+        <available file="${download.dir}/${eclipse.archive}"/>
+    </condition>
+    
+    <condition property="maven.archive" value="maven-${maven.version}-bin.zip">
+        <isset property="is.windows"/>
+    </condition>
+        
+    <condition property="maven.archive" value="maven-${maven.version}-bin.tar.gz">
+        <isset property="is.linux"/>
+    </condition>
+        
+    <condition property="maven.archive.exists">
+        <available file="${download.dir}/${maven.archive}"/>
+    </condition>
+    
+    <condition property="maven.exec" value="mvn.bat">
+        <isset property="is.windows"/>
+    </condition>
+            
+    <condition property="maven.exec" value="mvn">
+        <isset property="is.linux"/>
+    </condition>
+    
+    <condition property="geronimo.archive" value="geronimo-1.2-beta-src.zip">
+        <isset property="is.windows"/>
+    </condition>
+            
+    <condition property="geronimo.archive" value="geronimo-1.2-beta-src.tar.gz">
+        <isset property="is.linux"/>
+    </condition>
+            
+    <condition property="geronimo.archive.exists">
+        <available file="${download.dir}/${geronimo.archive}"/>
+    </condition>
+    
+    <condition property="geronimo.unpacked">
+        <available file="${basedir}/project/geronimo-1.2-beta/testsupport/testsupport-common/src/main/java/org/apache/geronimo/testsupport/XmlBeansTestSupport.java"/>
+    </condition>
+    
+    <condition property="geronimo.already.built">
+        <available file="${basedir}/project/geronimo-1.2-beta/build.ok"/>
+    </condition>
+    
+    <condition property="test.class.compiled">
+        <available file="${basedir}/test.class"/>
+    </condition>
+    
+    <!-- ========================= Run Properties ========================= -->
+    
+    <condition property="ext" value=".exe" else="">
+        <isset property="is.windows"/>
+    </condition>    
+
+    <condition property="delay.factor.set" value="${delay.factor}" else="2">
+        <isset property="delay.factor"/>
+    </condition>
+
+    <condition property="iteration.num.set" value="${iteration.num}" else="0">
+        <isset property="iteration.num"/>
+    </condition>
+
+    <condition property="run.time.set" value="${run.time}" else="48">
+        <isset property="run.time"/>
+    </condition>
+
+    <condition property="kill.eclipse.set" value="${kill.eclipse}" else="1">
+        <isset property="kill.eclipse"/>
+    </condition>
+        
+    <condition property="eclipse.home.set" value="${eclipse.home}" else="${eclipse-3.2.1.homedir}">
+        <isset property="eclipse.home"/>
+    </condition>
+        
+    <condition property="jre.options" value="${tested.jre.options}" else="-showversion -Xmx1024M -Xms512M">
+        <and><isset property="tested.jre.options"/>
+        <length string="${tested.jre.options}" trim="true" length="0" when="greater"/></and>
+    </condition>
+                
+    <condition property="jre.options.for.debug" value="${tested.jre.options.for.debug}" else="">
+        <and><isset property="tested.jre.options.for.debug"/>
+        <length string="${tested.jre.options.for.debug}" trim="true" length="0" when="greater"/></and>
+    </condition>
+    
+    <condition property="runner" value="AutoIt3.exe">
+        <isset property="is.windows"/>
+    </condition>
+               
+    <condition property="runner" value="perl">
+        <isset property="is.linux"/>
+    </condition>
+
+    <condition property="linux.arch" value="x86">
+        <isset property="is.linux.x86"/>
+    </condition>
+                   
+    <condition property="linux.arch" value="x86_64">
+        <isset property="is.linux.x86_64"/>
+    </condition>
+    
+    <condition property="res.dir" value="${result.dir}/${timestamp}" else="${basedir}/results/${timestamp}">
+        <isset property="result.dir"/>
+    </condition>
+        
+    <condition property="args" value="ega_eclipse_3.2.1.au3 &quot;${eclipse.home.set}&quot; &quot;${tested.jre}&quot; 
+        &quot;${res.dir}&quot; ${iteration.num.set} ${run.time.set} ${delay.factor.set} 
+        ${kill.eclipse.set} &quot;${jre.options}&quot; &quot;${jre.options.for.debug}&quot;">
+        <isset property="is.windows"/>
+    </condition>
+        
+    <condition property="args" value="./ega_eclipse_3.2.1.pl &quot;${eclipse.home.set}&quot; &quot;${tested.jre}&quot; 
+        &quot;${res.dir}&quot; ${linux.arch} ${iteration.num.set} ${run.time.set} ${delay.factor.set} 
+        ${kill.eclipse.set} &quot;${jre.options}&quot; &quot;${jre.options.for.debug}&quot;">
+        <isset property="is.linux"/>
+    </condition>
+
+    <!-- ========================= Setup ========================= -->
+    
+    <target name="setup" description="Setup EGA scenario" depends="set.proxy" if="platform.supported">
+        <antcall target="install.eclipse"/>
+        <antcall target="install.maven"/>
+        <antcall target="install.geronimo"/>
+    </target>
+    
+     <target name="set.proxy" if="http.proxyHost">
+        <echo>Set proxy: ${http.proxyHost}:${http.proxyPort}</echo>
+        <setproxy proxyhost="${http.proxyHost}" proxyport="${http.proxyPort}"/>
+     </target>
+    
+    <!-- ========================= Setup eclipse-3.2.1 ========================= -->
+    
+    <target name="install.eclipse" description="Install Eclipse SDK 3.2.1 if Eclipse doesn't exist locally" unless="eclipse.exists">
+        <antcall target="download.eclipse"/>
+        <antcall target="unpack.eclipse.win"/>
+        <antcall target="unpack.eclipse.lnx"/>
+    </target>
+    
+    <target name="unpack.eclipse.win" description="Unpack Eclipse SDK 3.2.1 on Windows" if="is.windows">
+        <unzip src="${download.dir}/${eclipse.archive}" dest="${eclipse-3.2.1.basedir}"/>
+    </target>
+    
+    <target name="unpack.eclipse.lnx" description="Unpack Eclipse SDK 3.2.1 on Linux" if="is.linux">
+        <gunzip src="${download.dir}/${eclipse.archive}" dest="${download.dir}/eclipse_tmp.tar"/>
+        <untar src="${download.dir}/eclipse_tmp.tar" dest="${eclipse-3.2.1.basedir}"/>
+        <delete file="${download.dir}/eclipse_tmp.tar"/>
+        <chmod file="${eclipse-3.2.1.homedir}/eclipse" perm="744"/>
+    </target>
+    
+    <target name="download.eclipse" description="Download Eclipse SDK 3.2.1 if Eclipse archive doesn't exist locally" unless="eclipse.archive.exists">
+        <get src="${eclipse.download.address}/${eclipse.archive}" dest="${download.dir}/${eclipse.archive}" verbose="true"/>
+    </target>
+
+    <target name="update.eclipse.config.win" if="is.windows">
+        <unzip src="${download.dir}/${eclipse.archive}" dest="${eclipse-3.2.1.basedir}">
+            <patternset includes="eclipse/configuration/config.ini"/>
+        </unzip>
+    </target>
+
+    <target name="update.eclipse.config.lnx" if="is.linux">
+        <gunzip src="${download.dir}/${eclipse.archive}" dest="${download.dir}/eclipse_tmp.tar"/>
+        <untar src="${download.dir}/eclipse_tmp.tar" dest="${eclipse-3.2.1.basedir}">
+            <patternset includes="eclipse/configuration/config.ini"/>
+        </untar>
+        <delete file="${download.dir}/eclipse_tmp.tar"/>
+    </target>
+    
+    <!-- ========================= Setup maven ========================= -->
+    
+    <target name="install.maven" description="Install maven">
+        <antcall target="download.maven"/>
+        <antcall target="unpack.maven.win"/>
+        <antcall target="unpack.maven.lnx"/>
+        <antcall target="configure.maven"/>
+    </target>
+    
+    <target name="unpack.maven.win" description="Unpack maven on Windows if it doesn't exist locally" if="is.windows">
+        <unzip src="${download.dir}/${maven.archive}" dest="${install.dir}"/>
+    </target>
+    
+    <target name="unpack.maven.lnx" description="Unpack maven on Linux if it doesn't exist locally" if="is.linux">
+        <gunzip src="${download.dir}/${maven.archive}" dest="${download.dir}/maven_tmp.tar"/>
+        <untar src="${download.dir}/maven_tmp.tar" dest="${install.dir}"/>
+        <delete file="${download.dir}/maven_tmp.tar"/>
+        <chmod file="${install.dir}/maven-${maven.version}/bin/${maven.exec}" perm="744"/>
+    </target>
+    
+    <target name="download.maven" description="Download maven if maven archive doesn't exist locally" unless="maven.archive.exists">
+        <get src="${maven.download.address}/${maven.archive}" dest="${download.dir}/${maven.archive}" verbose="true"/>
+    </target>
+    
+    <target name="configure.maven">
+        <echo message="Set maven repository location to ${basedir}/project/.m2/repository"/>
+        <echo file="${install.dir}/maven-${maven.version}/conf/ega.settings.xml">
+&lt;localRepository&gt;${basedir}/project/.m2/repository&lt;/localRepository&gt;
+        </echo>
+        <antcall target="configure.maven.proxy"/>
+    </target>
+        
+    <target name="configure.maven.proxy" if="http.proxyHost">
+        <echo message="proxy.host=${http.proxyHost}"/>
+        <echo message="proxy.port=${http.proxyPort}"/>
+        <echo file="${install.dir}/maven-${maven.version}/conf/ega.settings.xml">
+&lt;settings&gt;
+    &lt;localRepository&gt;${basedir}/project/.m2/repository&lt;/localRepository&gt;
+    &lt;proxies&gt;
+        &lt;proxy&gt;
+            &lt;host&gt;${http.proxyHost}&lt;/host&gt;
+            &lt;port&gt;${http.proxyPort}&lt;/port&gt;
+        &lt;/proxy&gt;
+    &lt;/proxies&gt;
+&lt;/settings&gt;
+        </echo>
+    </target>
+    
+    <!-- ========================= Setup geronimo-1.2-beta ========================= -->
+    
+    <target name="install.geronimo" description="Install Geronimo">
+        <antcall target="download.geronimo"/>
+        <antcall target="unpack.geronimo.win"/>
+        <antcall target="unpack.geronimo.lnx"/>
+        <antcall target="build.geronimo"/>
+    </target>
+    
+    <target name="unpack.geronimo.win" description="Unpack Geronimo on Windows if it doesn't exist locally" 
+        if="is.windows" unless="geronimo.unpacked">
+        <unzip src="${download.dir}/${geronimo.archive}" dest="${basedir}/project"/>
+    </target>
+        
+    <target name="unpack.geronimo.lnx" description="Unpack Geronimo on Linux if it doesn't exist locally" 
+        if="is.linux" unless="geronimo.unpacked">
+        <gunzip src="${download.dir}/${geronimo.archive}" dest="${download.dir}/geronimo_tmp.tar"/>
+        <untar src="${download.dir}/geronimo_tmp.tar" dest="${basedir}/project"/>
+        <delete file="${download.dir}/geronimo_tmp.tar"/>
+    </target>
+        
+    <target name="download.geronimo" description="Download Geronimo if geronimo archive doesn't exist locally" unless="geronimo.archive.exists">
+        <get src="${geronimo.download.address}/${geronimo.archive}" dest="${download.dir}/${geronimo.archive}" verbose="true"/>
+    </target>
+    
+    <target name="build.geronimo" description="Build Geronimo projects for Eclipse" unless="geronimo.already.built">
+        <mkdir dir="${basedir}/project/.m2/repository"/>
+        
+        <echo message="MAVEN=${install.dir}/maven-${maven.version}/bin/${maven.exec}"/>
+        <echo message="GERONIMO_HOME=${basedir}/project/geronimo-1.2-beta"/>
+        <echo message="JAVA_HOME=${env.JAVA_HOME}"/>
+        
+        <exec executable="${install.dir}/maven-${maven.version}/bin/${maven.exec}" 
+                dir="${basedir}/project/geronimo-1.2-beta" 
+                failonerror="true" logError="true">
+                    <redirector outputproperty="geronimo.build.result" alwayslog="true"/>
+                    <arg line="-s ${install.dir}/maven-${maven.version}/conf/ega.settings.xml"/>
+                    <arg value="clean"/>
+                    <arg value="eclipse:eclipse"/>
+                    <env key="MAVEN_OPTS" value="-Xmx512m -XX:MaxPermSize=128m"/>
+                    <env key="JAVA_HOME" value="${env.JAVA_HOME}"/>
+        </exec>
+        <condition property="geronimo.build.failed">
+            <or>
+                <contains string="${geronimo.build.result}" substring="FATAL ERROR"/> 
+                <contains string="${geronimo.build.result}" substring="BUILD FAILED"/> 
+                <contains string="${geronimo.build.result}" substring="BUILD ERROR"/> 
+            </or>
+        </condition>
+        <antcall target="save.build.status"/>
+        <fail message="ERROR: Geronimo build failed!" if="geronimo.build.failed"/>
+    </target>
+    
+    <target name="save.build.status" unless="geronimo.build.failed">
+        <echo file="${basedir}/project/geronimo-1.2-beta/build.ok" 
+            message="Geronimo was successfully built at ${timestamp}"/>
+    </target>
+    
+    <!-- ========================= Run ========================= -->
+
+    <target name="run" description="Run EGA scenario" if="platform.supported">
+        <echo>----- Run EGA scenario on the following configuration -----</echo>
+        <echo>Tested JRE = ${tested.jre}</echo>
+        <echo>Eclipse Home = ${eclipse.home.set}</echo>
+        <echo>${line.separator}</echo>
+        <echo>Scenario iteration number = ${iteration.num.set}</echo>
+        <echo>Scenario run time = ${run.time.set}</echo>
+        <echo>Delay factor = ${delay.factor.set}</echo>
+        <echo>Kill Eclipse if scenario fails = ${kill.eclipse.set}</echo>
+        <echo>${line.separator}</echo>
+        <echo>Tested JRE options for Eclipse launching = ${jre.options}</echo>
+        <echo>Tested JRE options for EGA debug step = ${jre.options.for.debug}</echo>
+        <echo>------------------------------------------------------------</echo>
+        <antcall target="check.autoit"/>
+        <antcall target="check.java"/>
+        <antcall target="check.eclipse"/>
+        <antcall target="check.eclipse.version"/> 
+        <antcall target="check.vm.options"/>
+        <antcall target="check.vm.debug.options"/>
+        <echo>Cleaning Eclipse configuration ...</echo>
+        <delete dir="${eclipse.home.set}/configuration/org.eclipse.osgi"/>
+        <delete dir="${eclipse.home.set}/configuration/org.eclipse.core.runtime"/>
+        <delete dir="${eclipse.home.set}/configuration/org.eclipse.update"/>
+        <delete dir="${eclipse.home.set}/configuration/.settings"/>
+        <delete file="${eclipse.home.set}/configuration/config.ini"/>
+        <antcall target="update.eclipse.config.win"/>
+        <antcall target="update.eclipse.config.lnx"/>
+        <echo>Removing Eclipse workspace ...</echo>
+        <delete dir="${basedir}/workspace"/>
+        <echo>Creating results directory ...</echo>
+        <mkdir dir="${res.dir}"/> 
+        <echo>Start EGA scenario</echo>
+        <echo>Please, see ${res.dir}/EGA.log for details</echo>
+        <exec executable="${runner}" dir="${basedir}" resultproperty="ega.exit.code">
+            <redirector outputproperty="ega.output"/>
+            <arg line="${args}"/>
+        </exec>
+        <echo>${ega.output}</echo>
+        <condition property="ega.passed">
+            <equals arg1="${ega.exit.code}" arg2="0"/>
+        </condition>
+        <loadfile property="ega.log" srcFile="${res.dir}/EGA.log">
+            <filterchain>
+                <tokenfilter>
+                    <filetokenizer/>
+                    <replaceregex pattern="-*\s*Iteration\s*\d*\s*start\s*-*.*-*\s*Iteration\s*\d*\s*end\s*-*" 
+                        flags="s" replace="..."/>
+                </tokenfilter>
+            </filterchain>
+        </loadfile>
+        <loadfile property="eclipse.log" srcFile="${res.dir}/eclipse.log" failonerror="false"/>
+        <condition property="eclipse.log.message" value="
+${line.separator}======================= eclipse.log =======================
+${line.separator}${eclipse.log}" else="">
+            <isset property="eclipse.log"/>
+        </condition>    
+        <property name="fail.message" value="
+${line.separator}========================== EGA.log =======================
+${line.separator}${ega.log}
+${eclipse.log.message}
+${line.separator}==========================================================="/>
+        <antcall target="print.fail.message"/>
+        <fail message="EGA FAILED!" unless="ega.passed"/>
+        <echo>EGA PASSED!</echo>    
+    </target>
+    
+    <target name="print.fail.message" unless="ega.passed">
+        <echo level="error" message="${line.separator}${fail.message}${line.separator}"/>
+    </target>
+    
+    <target name="check.java" description="Checks if tested.jre is correct">
+        <condition property="no.java">
+            <not><available file="${tested.jre}/bin/java${ext}"/></not>
+        </condition>
+        <fail message="ERROR! Tested Java home is incorrect.${line.separator}
+Please, use -Dtested.jre=&lt;TESTED_JRE_HOME&gt;
+${line.separator}EGA FAILED!" if="no.java"/>
+    </target>
+    
+    <target name="check.eclipse" description="Checks if eclipse.home is correct">
+        <condition property="no.eclipse">
+            <not><available file="${eclipse.home.set}/eclipse${ext}"/></not>
+        </condition>
+        <fail message="ERROR! Eclipse home is incorrect.${line.separator}
+Please, use -Declipse.home=&lt;ECLIPSE_HOME&gt;
+${line.separator}EGA FAILED!" if="no.eclipse"/>
+    </target>
+        
+    <target name="check.eclipse.version" description="Checks if eclipse.home points to Eclipse 3.2.1">
+        <fileset id="found.plugin" dir="${eclipse.home.set}/plugins" includes="org.eclipse.jdt.core_3.2.1*.jar"/>
+        <property name="plugin-3.2.1" refid="found.plugin"/>
+        <condition property="wrong.eclipse.version">
+            <length string="${plugin-3.2.1}" when="less" length="1"/>
+        </condition>
+        <fail message="ERROR! eclipse.home doesn't point to Ecipse 3.2.1.${line.separator}EGA FAILED!" if="wrong.eclipse.version"/>
+    </target>
+        
+    <target name="check.autoit" if="is.windows" description="Checks if AutoIt3 is installed for EGA run on Windows">
+        <available file="AutoIt3.exe" filepath="${env.Path}" property="autoit"/>
+        <fail message="ERROR! AutoIt3 is not installed or it is not in the Path.${line.separator}EGA FAILED!" unless="autoit"/>
+    </target>
+
+    <target name="check.vm.options" if="tested.jre.options">
+        <antcall target="compile.test.class"/>
+        <exec executable="${tested.jre}/bin/java${ext}" failonerror="true">
+            <arg line="-cp ${basedir}"/>
+            <arg line="${jre.options}"/>
+            <arg value="test"/>
+        </exec>
+    </target>
+        
+    <target name="check.vm.debug.options" if="tested.jre.options.for.debug">
+        <antcall target="compile.test.class"/>
+        <exec executable="${tested.jre}/bin/java${ext}" failonerror="true">
+            <arg line="-cp ${basedir}"/>
+            <arg line="${jre.options.for.debug}"/>
+            <arg value="test"/>
+        </exec>
+    </target>
+        
+    <target name="compile.test.class" unless="test.class.compiled">
+        <exec executable="${env.JAVA_HOME}/bin/javac${ext}" dir="${basedir}" failonerror="true">
+            <arg value="test.java"/>
+        </exec>
+    </target>
+    
+</project>
+

Propchange: harmony/enhanced/buildtest/branches/2.0/tests/ega/build.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: harmony/enhanced/buildtest/branches/2.0/tests/ega/ega.properties
URL: http://svn.apache.org/viewvc/harmony/enhanced/buildtest/branches/2.0/tests/ega/ega.properties?view=auto&rev=543394
==============================================================================
--- harmony/enhanced/buildtest/branches/2.0/tests/ega/ega.properties (added)
+++ harmony/enhanced/buildtest/branches/2.0/tests/ega/ega.properties Thu May 31 22:22:50 2007
@@ -0,0 +1,86 @@
+##     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.
+## ======================================================================================
+
+
+#----------------------------------------------------------------------
+# Software downloads configuration used in build.xml
+#----------------------------------------------------------------------
+
+# Eclipse 3.2.1 download address
+eclipse.download.address=http://mirrors.nsa.co.il/eclipse/eclipse/downloads/drops/R-3.2.1-200609210945
+
+# Maven archive download address
+maven.download.address=http://apache.mirror.nedlinux.nl/maven/binaries
+
+# Maven version
+maven.version=2.0.4
+
+# Geronimo 1.2-beta sources download address
+geronimo.download.address=http://apache.ziply.com/geronimo/1.2-beta
+
+
+#----------------------------------------------------------------------
+# EGA scenario run configuration used in build.xml
+#
+# Update the following lines with appropriate info 
+# to avoid specifying these properties from command line
+#
+# NOTE: use only forward slashes (/) in the paths
+#----------------------------------------------------------------------
+
+# Tested JRE home (required)
+#tested.jre=./harmony/builds/last
+
+# Eclipse 3.2.1 home
+# NOTE: Use only "clean" Eclipse here
+# Eclipse workspace and configuration will be deleted during the scenario run
+# Default value is ./eclipse-3.2.1-os-arch
+#eclipse.home=./eclipse-3.2.1
+
+# Number of iterations for the scenario to pass
+# Should be integer >= 0
+# Default value is 0
+#iteration.num=1
+
+# Time in hours for the scenario to pass 
+# Ignored if used along with not zero iteration.num
+# To run EGA scenario for the given time comment iteration.num or 
+# set it to zero and uncomment the following line with appropriate info
+# Default value is 48
+#run.time=48
+
+# Factor used in time delays inside the scenario
+# Should be integer >= 1
+# Default value is 2
+#delay.factor=1
+
+# Kill Eclipse if scenario fails
+# Possible values: 0 - not kill, 1 - kill 
+# Default value is 1
+#kill.eclipse=0
+
+# Options to pass tested JRE for Eclipse launch
+# Default value is -showversion -Xmx1024M -Xms512M
+#tested.jre.options=-Xmx600M -Xms512M
+
+# Options to pass tested JRE for debug step of the scenario
+# Default value is empty string.
+#tested.jre.options.for.debug=-Xint
+
+#----------------------------------------------------------------------
+

Propchange: harmony/enhanced/buildtest/branches/2.0/tests/ega/ega.properties
------------------------------------------------------------------------------
    svn:eol-style = native



Mime
View raw message