Author: stocco
Date: Thu Feb 10 16:53:21 2005
New Revision: 153310

URL: http://svn.apache.org/viewcvs?view=rev&rev=153310
Log:
This patch is submitted by Julie Zhuo.  This is for minor tweaks to the test 
distribution.  

**** Things Fixed in the Patch ********
* Updated the test.dist to reflect the recent TestRecorder location change.
* Created top level test.dist build structure for easy including of other tests
* Moved the tomcat-import.xml to the root level ant directory in the test 
distribution for sharing across tests.
* Created shell scripts to build the test distribution
* Decoupled web server related calls for easy plug in of other web servers

There is still an issue with build.dist.archives as it appears to not be 
generating binary/zip.  Bug will be filed.  Apparently parameter not being set. 
${dist.lib.name}

Added:
    incubator/beehive/trunk/buildTestDistro.cmd   (with props)
    incubator/beehive/trunk/buildTestDistro.sh   (with props)
    incubator/beehive/trunk/netui/test/dist-test/ant/netui-test.properties   
(with props)
    incubator/beehive/trunk/test/dist-test/
    incubator/beehive/trunk/test/dist-test/README.txt   (with props)
    incubator/beehive/trunk/test/dist-test/ant/
    incubator/beehive/trunk/test/dist-test/ant/build.xml   (with props)
    incubator/beehive/trunk/test/dist-test/ant/test-imports.xml   (with props)
    incubator/beehive/trunk/test/dist-test/build.xml   (with props)
Removed:
    incubator/beehive/trunk/netui/test/dist-test/README.txt
    incubator/beehive/trunk/netui/test/dist-test/ant/buildTestDist.xml
    incubator/beehive/trunk/netui/test/dist-test/ant/test-dist.properties
Modified:
    incubator/beehive/trunk/distribution.xml
    incubator/beehive/trunk/netui/test/dist-test/ant/netui-build.xml
    incubator/beehive/trunk/netui/test/dist-test/ant/test-imports.xml
    incubator/beehive/trunk/netui/test/dist-test/ant/testRecorder.xml
    incubator/beehive/trunk/netui/test/dist-test/ant/testWebBuild.xml
    incubator/beehive/trunk/netui/test/dist-test/build.xml

Added: incubator/beehive/trunk/buildTestDistro.cmd
URL: 
http://svn.apache.org/viewcvs/incubator/beehive/trunk/buildTestDistro.cmd?view=auto&rev=153310
==============================================================================
--- incubator/beehive/trunk/buildTestDistro.cmd (added)
+++ incubator/beehive/trunk/buildTestDistro.cmd Thu Feb 10 16:53:21 2005
@@ -0,0 +1,11 @@
+REM
+REM Build Beehive Test Distribution
+REM
+
+set
+
+REM Build the source and beehive distribution
+call ant bootstrap clean deploy build.dist 
+
+REM Build the test distribution
+call ant -f distribution.xml build.dist.archives build.test.dist

Propchange: incubator/beehive/trunk/buildTestDistro.cmd
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/beehive/trunk/buildTestDistro.sh
URL: 
http://svn.apache.org/viewcvs/incubator/beehive/trunk/buildTestDistro.sh?view=auto&rev=153310
==============================================================================
--- incubator/beehive/trunk/buildTestDistro.sh (added)
+++ incubator/beehive/trunk/buildTestDistro.sh Thu Feb 10 16:53:21 2005
@@ -0,0 +1,12 @@
+#!/bin/sh
+#
+# Build the Beehive Test Distribution
+#
+
+env
+
+# Build Beehive source and distribution
+ant bootstrap clean deploy build.dist
+
+# Build Beehive test distribution
+ant -f distribution.xml build.dist.archives build.test.dist

Propchange: incubator/beehive/trunk/buildTestDistro.sh
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/beehive/trunk/buildTestDistro.sh
------------------------------------------------------------------------------
    svn:executable = *

Modified: incubator/beehive/trunk/distribution.xml
URL: 
http://svn.apache.org/viewcvs/incubator/beehive/trunk/distribution.xml?view=diff&r1=153309&r2=153310
==============================================================================
--- incubator/beehive/trunk/distribution.xml (original)
+++ incubator/beehive/trunk/distribution.xml Thu Feb 10 16:53:21 2005
@@ -20,7 +20,7 @@
     <!-- Distribution targets                          -->
     <!--                                               -->
     <!-- ============================================= -->
-    <target name="build.dist" description="Builds a Beehive distribution" 
unless="dist.present">
+    <target name="build.dist" description="Builds a Beehive distribution">
         <mkdir dir="${dist.dir}"/>
 
         <antcall target="build.dist.core"/>
@@ -492,12 +492,10 @@
     <!--                                              -->
     <!-- ===========================================  -->
     <target name="build.test.dist" description="Build and package the test 
module for testing distribution">
-       <available file="build/dist/${dist.name}" property="dist.present"/>
-       <antcall target="build.dist"/>
-       <ant  dir="${beehive.home}/netui/test/dist-test/ant" 
-             antfile="buildTestDist.xml" 
-                 target="build.test.dist"
-                 inheritall="false"/>
+       <ant  dir="${beehive.home}/test/dist-test" 
+             antfile="build.xml" 
+                 target="build.test.dist"
+                 inheritall="false"/>
     </target>
 
     <!-- ============================================= -->

Modified: incubator/beehive/trunk/netui/test/dist-test/ant/netui-build.xml
URL: 
http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/test/dist-test/ant/netui-build.xml?view=diff&r1=153309&r2=153310
==============================================================================
--- incubator/beehive/trunk/netui/test/dist-test/ant/netui-build.xml (original)
+++ incubator/beehive/trunk/netui/test/dist-test/ant/netui-build.xml Thu Feb 10 
16:53:21 2005
@@ -8,9 +8,8 @@
 ================================================================ -->
 <project name="Beehive/NetUI/distribution-test" default="usage" basedir=".">
 
-    <property environment="os"/>
-    <dirname property="test.dir" file="build.xml"/>
-    <property file="test-dist.properties"/>
+    <import file="../test-imports.xml"/>
+    <import file="${test.home}/netui/ant/test-imports.xml"/>
 
     <path id="test.classpath">
            <pathelement path="${test.classes.dir}/junitTests"/>
@@ -28,11 +27,13 @@
     <!--                                                                  -->
     <!-- ================================================================ -->
     <target name="run.tests" description="Run all tests">
-       <antcall target="prepare.netui.testweb"/>
-       <antcall target="dist.drt"/>
-       <antcall target="dist.bvt">
-           <param name="test.continue" value="true"/>
-       </antcall>
+      <sequential>
+          <antcall target="prepare.netui.testweb"/>
+          <antcall target="dist.drt"/>
+          <antcall target="dist.bvt">
+             <param name="test.continue" value="true"/>
+          </antcall>
+      </sequential>
     </target>
 
     <target name="prepare.netui.testweb" description="Prepare netui test web 
in the build area">
@@ -61,6 +62,7 @@
 
     <target name="junit.drt" description="Run JUnit drt test suite">
       <ant dir="${test.dir}/ant" antfile="junitCore.xml" target="run.tests" 
inheritAll="false">
+         <property name="test.home" value="${test.home}"/>
          <property name="test.dir" value="${test.dir}"/>
          <property name="testout.dir" value="${drt.testResults.dir}"/>
          <reference refid="test.classpath"/> 
@@ -71,6 +73,7 @@
 
     <target name="junit.bvt" description="Run JUnit bvt test suite">
       <ant dir="${test.dir}/ant" antfile="junitCore.xml" target="run.tests">
+         <property name="test.home" value="${test.home}"/>
          <property name="test.dir" value="${test.dir}"/>
          <property name="testout.dir" value="${bvt.testResults.dir}"/>
          <reference refid="test.classpath"/> 
@@ -88,12 +91,14 @@
 
     <target name="testRecorder.drt" description="Run the drt suite with full 
server start / stop support.">
         <ant antfile="${test.dir}/ant/testWebBuild.xml" inheritAll="false" 
target="drt">
+             <property name="test.home" value="${test.home}"/>
              <property name="test.dir" value="${test.dir}"/>
         </ant>
     </target>
 
     <target name="testRecorder.bvt" description="Run the bvt suite with full 
server start / stop support.">
         <ant antfile="${test.dir}/ant/testWebBuild.xml" inheritAll="false" 
target="bvt">
+             <property name="test.home" value="${test.home}"/>
              <property name="test.dir" value="${test.dir}"/>
         </ant>
      </target>

Added: incubator/beehive/trunk/netui/test/dist-test/ant/netui-test.properties
URL: 
http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/test/dist-test/ant/netui-test.properties?view=auto&rev=153310
==============================================================================
--- incubator/beehive/trunk/netui/test/dist-test/ant/netui-test.properties 
(added)
+++ incubator/beehive/trunk/netui/test/dist-test/ant/netui-test.properties Thu 
Feb 10 16:53:21 2005
@@ -0,0 +1,60 @@
+#
+#
+# NetUI Distribution Test Properties
+#
+#
+
+# Netui test root dir
+test.dir=${test.home}/netui
+
+# netui tests
+test.classes.dir=${test.dir}/junit
+
+# netui Test Webapp properties
+webapp.name=coreWeb
+webapp.dir=${build.dir}/webapps/${webapp.name}
+webapp.waitfor.url=${server.root.url}/${webapp.name}
+
+# Webapp build properties
+netuiconfig.xml.name=netui-config.xml
+
+buildWebapp.ant=${dist.home}/ant/buildWebapp.xml
+
+webapp.waitfor.url=http://localhost:8080/${webapp.name}
+app.build.file=${test.dir}/ant/testWebBuild.xml
+
+# External JARs
+junit.jar.name=junit.jar
+junit.jar=${test.dir}/junit/lib/${junit.jar.name}
+
+ant-junit.jar=${os.ANT_HOME}/lib/ant-junit.jar
+
+log4j.jar=${webapp.dir}/WEB-INF/lib/log4j-1.2.8.jar
+jsr173.jar=${webapp.dir}/WEB-INF/lib/jsr173_1.0_api.jar
+xbean.jar=${webapp.dir}/WEB-INF/lib/apache-xbean.jar
+
+# Netui test JARs/resources
+testRecorder.config.name=netui-server-drt-config
+_testRecorder.base.dir=${test.dir}/testRecorder
+_testRecorder.resource.dir=${_testRecorder.base.dir}/testRecorder-jsp
+
+test-recorder.jar.name=testRecorder.jar
+test-recorder.jar=${_testRecorder.base.dir}/lib/${test-recorder.jar.name}
+
+commons-logging.jar=${webapp.dir}/WEB-INF/lib/commons-logging.jar
+httpClient.jar.name=commons-httpclient-2.0.jar
+httpClient.jar=${_testRecorder.base.dir}/lib/${httpClient.jar.name}
+
+drt.testResults.dir=${test.result.root}/netui/drt.testResults
+bvt.testResults.dir=${test.result.root}/netui/bvt.testResults
+
+netui.ant.dir=${test.dir}/ant
+
+drtbvt.maxWait=300
+
+log4jconfig.verbose.junit=${test.dir}/conf/junitLogCfgVerbose.xml
+log4jconfig.junit=${test.dir}/conf/junitLogCfg.xml
+
+
+
+

Propchange: 
incubator/beehive/trunk/netui/test/dist-test/ant/netui-test.properties
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/beehive/trunk/netui/test/dist-test/ant/test-imports.xml
URL: 
http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/test/dist-test/ant/test-imports.xml?view=diff&r1=153309&r2=153310
==============================================================================
--- incubator/beehive/trunk/netui/test/dist-test/ant/test-imports.xml (original)
+++ incubator/beehive/trunk/netui/test/dist-test/ant/test-imports.xml Thu Feb 
10 16:53:21 2005
@@ -3,8 +3,7 @@
 <project name="Beehive/NetUI/distribution-test-import" default="usage" 
basedir=".">
   
     <property environment="os"/>
-
-    <property file="../test-dist.properties"/>
+    <property file="${test.home}/netui/ant/netui-test.properties"/>
 
     <path id="junit-tests.dependency.path">
        <pathelement path="${test.classes.dir}/junitTests"/>

Modified: incubator/beehive/trunk/netui/test/dist-test/ant/testRecorder.xml
URL: 
http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/test/dist-test/ant/testRecorder.xml?view=diff&r1=153309&r2=153310
==============================================================================
--- incubator/beehive/trunk/netui/test/dist-test/ant/testRecorder.xml (original)
+++ incubator/beehive/trunk/netui/test/dist-test/ant/testRecorder.xml Thu Feb 
10 16:53:21 2005
@@ -1,7 +1,7 @@
 <?xml version="1.0"?>
 
 <project name="Beehive/NetUI/TestRecorder" default="" basedir=".">
-
+    <import file="../../test-imports.xml"/>
     <import file="test-imports.xml"/>
 
     <property name="_testRecorder.base.dir" 
location="${build.dir}/testRecorder"/>

Modified: incubator/beehive/trunk/netui/test/dist-test/ant/testWebBuild.xml
URL: 
http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/test/dist-test/ant/testWebBuild.xml?view=diff&r1=153309&r2=153310
==============================================================================
--- incubator/beehive/trunk/netui/test/dist-test/ant/testWebBuild.xml (original)
+++ incubator/beehive/trunk/netui/test/dist-test/ant/testWebBuild.xml Thu Feb 
10 16:53:21 2005
@@ -10,9 +10,8 @@
 -->
 <project name="Beehive/NetUI/TestRecorder-webapp" default="usage" basedir=".">
 
-    <property environment="os"/>
-    <property file="${test.dir}/test-dist.properties"/>
-
+    <import file="../../test-imports.xml"/>
+    <import file="test-imports.xml"/>
 
     <!-- ================================================================ -->
     <!--                                                                  -->
@@ -27,9 +26,7 @@
       
         <antcall target="update.runtime"/>
         <antcall target="deploy.testrecorder"/>
-        <ant dir="${dist.home}/ant/" antfile="buildWebapp.xml" target="build" 
inheritAll="false">
-            <property name="webapp.dir" location="${webapp.dir}"/>
-        </ant>
+        <build-webapp webappDir="${webapp.dir}"/>
 
         <echo message="--------------------------------------------------"/>
         <echo message="|     NetUI test webApp build ending             |"/>
@@ -42,29 +39,26 @@
     </target>
 
     <target name="update.runtime" description="Update the NetUI runtime in the 
webapp without building the resources">
-         <ant dir="${dist.home}/ant" antfile="webappRuntimeCore.xml" 
target="deploy.beehive.webapp.runtime" inheritAll="false">
-            <property name="webapp.dir" location="${webapp.dir}"/>
-        </ant>
 
-        <copy file="${webapp.dir}/WEB-INF/local-netui-config.xml" 
+         <deploy-netui webappDir="${webapp.dir}"/>
+
+         <copy file="${webapp.dir}/WEB-INF/local-netui-config.xml" 
               tofile="${webapp.dir}/WEB-INF/${netuiconfig.xml.name}" 
               overwrite="true" failonerror="false"/>
 
-        <copy todir="${webapp.dir}/WEB-INF">
+         <copy todir="${webapp.dir}/WEB-INF">
               <fileset dir="${dist.home}/samples/netui-blank/WEB-INF" 
includes="*.xml"/>
-        </copy>
+         </copy>
 
     </target>
 
     <target name="clean" description="Clean the test web" 
unless="test.continue">
         <echo message="Clean the webapp!"/>
+        <clean-webapp webappDir="${webapp.dir}"/>
         <delete dir="${webapp.dir}/WEB-INF/lib"/>
         <delete>
            <fileset dir="${webapp.dir}/WEB-INF" 
includes="beehive-netui-tags*.*"/>
         </delete>
-        <delete dir="${webapp.dir}/WEB-INF/classes"/>
-        <delete dir="${webapp.dir}/WEB-INF/.tmpbeansrc"/>
-        <delete dir="${webapp.dir}/WEB-INF/.pageflow-struts-generated"/>
     </target>
 
     <!-- ================================================================ -->
@@ -114,22 +108,15 @@
     <!--                                                                  -->
     <!-- ================================================================ -->
     <target name="deploy" description="Deploy webapp">
-        <ant dir="${test.dir}/ant" antfile="tomcat-imports.xml" 
target="deploy" inheritAll="false">
-            <property name="webapp.dir" location="${webapp.dir}"/>
-            <property name="context.path" value="${webapp.name}"/>
-        </ant>
+        <deploy-webapp webappDir="${webapp.dir}" contextPath="${webapp.name}"/>
     </target>
 
     <target name="undeploy" description="Undeploy webapp">
-        <ant dir="${test.dir}/ant" antfile="tomcat-imports.xml" 
target="undeploy" inheritAll="false">
-            <property name="context.path" value="${webapp.name}"/>
-        </ant>
+        <undeploy-webapp contextPath="${webapp.name}"/>
     </target>
 
     <target name="redeploy" description="Redeploy webapp">
-        <ant dir="${test.dir}/ant" antfile="tomcat-imports.xml" 
target="redeploy" inheritAll="false">
-            <property name="context.path" value="${webapp.name}"/>
-        </ant>
+        <redeploy-webapp contextPath="${webapp.name}"/>
     </target>
 
     <!-- ================================================================ -->
@@ -139,14 +126,11 @@
     <!-- ================================================================ -->
 
     <target name="start" description="Start server with asserts enabled for 
org.apache.beehive.netui">
-        <ant dir="${test.dir}/ant" antfile="tomcat-imports.xml" target="start" 
inheritAll="false">
-            <property name="java.options" 
value="-ea:org.apache.beehive.netui..."/>
-        </ant>
+        <start-server shmem="false" 
javaOptions="-ea:org.apache.beehive.netui..."/>
     </target>
 
     <target name="stop" description="Stop server">
-        <ant dir="${test.dir}/ant" antfile="tomcat-imports.xml" target="stop" 
inheritAll="false">
-        </ant>
+       <stop-server/>
     </target>
 
     <target name="ensure.deployed" description="Deploy webapp for the test 
recorder">

Modified: incubator/beehive/trunk/netui/test/dist-test/build.xml
URL: 
http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/test/dist-test/build.xml?view=diff&r1=153309&r2=153310
==============================================================================
--- incubator/beehive/trunk/netui/test/dist-test/build.xml (original)
+++ incubator/beehive/trunk/netui/test/dist-test/build.xml Thu Feb 10 16:53:21 
2005
@@ -1,49 +1,75 @@
 <?xml version="1.0"?>
 
-<!-- ================================================================
-
-  This project is a test for Beehive distribution using the test 
-  recorder against a Tomcat web application.  
-
-================================================================ -->
-<project name="Beehive/distribution-test" default="usage" basedir=".">
-
-    <property environment="os"/>
-    <dirname property="test.home" file="build.xml"/>
-
-
-    <!-- ================================================================ -->
-    <!--                                                                  -->
-    <!-- Target to run all drt/bvt tests                                  -->
-    <!--                                                                  -->
-    <!-- ================================================================ -->
-    <target name="run.tests" description="Run all tests">
-          <available property="build.present" file="${build.dir}"/>
-          <antcall target="clean"/>
-          <antcall target="prepare.build"/>
-
-          <antcall target="netui.tests"/>
-    </target>
-
-    <target name="netui.tests" description="Run netui tests">
-        
-        <!-- netui tests here -->
-        <ant dir="${test.home}/netui" antfile="build.xml" inheritAll="false" 
target="run.tests"/>
-
-        <!-- Controls tests here -->
-
-        <!-- WSM tests here -->
+<project name="Beehive/NetUI/BuildTestDist" default="build.test.dist" 
basedir=".">
+    
+    <import file="../ant/test-imports.xml"/>
+
+    <!-- ========================================= -->
+    <!-- Targets for building the standalone test  -->
+    <!-- package for testing Beehive distribution. -->
+    <!-- ========================================= -->   
+
+    <target name="build.tests" description="Build all netui tests">
+        <property name="test.dist.base.dir" value="${build.dir}/test-dist"/>
+   
+        <!-- Build the Junit tests -->
+        <ant antfile="${test.dir}/ant/build.xml" target="test.build" 
inheritAll="false"/>
+
+        <!-- Build testRecorder config jar file  -->
+        <ant antfile="${test.dir}/ant/testRecorder.xml" 
target="build.config.jar" inheritAll="false">
+            <property name="testRecorder.config.name" 
value="netui-server-drt-config"/>
+            <property name="test.file" 
location="${app.dir}/drt/testRecorder/config/testRecorder-tests.xml"/>
+            <property name="config.file" 
location="${app.dir}/drt/testRecorder/config/testRecorder-config.xml"/>
+            <property name="webapp.file" 
location="${app.dir}/drt/testRecorder/config/testRecorder-webapp.xml"/>
+        </ant>
 
     </target>
 
-    <target name="clean" if="build.present" description="Clean webapp">
-        <delete dir="${build.dir}"/>
-    </target>
+    <target name="assemble.tests" description="Assemble all netui tests for 
test distribution">
+        <!-- Clean coreWeb -->
+        <ant antfile="${app.dir}/drt/build.xml" target="clean"/>
+
+        <!-- Moving files to the right place for packaging -->
+       <mkdir dir="${test.dist.base.dir}/beehive-test-dist"/>
+       <mkdir dir="${test.dist.base.dir}/beehive-test-dist/netui"/>
+       <mkdir dir="${test.dist.base.dir}/beehive-test-dist/controls"/>
+       <mkdir dir="${test.dist.base.dir}/beehive-test-dist/wsm"/>
+
+       <copy file="${test.dir}/dist-test/ant/netui-build.xml" 
+             tofile="${test.dist.base.dir}/beehive-test-dist/netui/build.xml"/>
+
+       <copy todir="${test.dist.base.dir}/beehive-test-dist/netui/ant">
+            <fileset dir="${test.dir}/dist-test/ant" 
includes="netui-test.properties,testRecorder.xml,test-imports.xml,testWebBuild.xml"/>
+       </copy> 
+
+       <copy todir="${test.dist.base.dir}/beehive-test-dist/netui/ant">
+            <fileset dir="${test.dir}/ant"
+                 includes="junitCore.xml"/>
+       </copy> 
+
+       <copy 
todir="${test.dist.base.dir}/beehive-test-dist/netui/webapps/coreWeb">
+            <fileset dir="${app.dir}/drt/coreWeb"/>
+       </copy>
+
+       <copy 
todir="${test.dist.base.dir}/beehive-test-dist/netui/junit/junitTests/org">
+            <fileset dir="${test.classes.dir}/junitTests/org"/>
+       </copy>
+
+       <copy 
todir="${test.dist.base.dir}/beehive-test-dist/netui/testRecorder/config">
+            <fileset dir="${build.dir}/testRecorder/config"/>
+       </copy>
+
+       <copy 
todir="${test.dist.base.dir}/beehive-test-dist/netui/testRecorder">
+            <fileset dir="${build.dir}/tools/testRecorder"/>
+       </copy>
+
+       <copy todir="${test.dist.base.dir}/beehive-test-dist/netui/conf">
+            <fileset dir="${test.dir}/conf"/>
+       </copy>
+
+       <copy 
todir="${test.dist.base.dir}/beehive-test-dist/netui/testRecorder/tests">
+            <fileset dir="${app.dir}/drt/testRecorder/tests"/>
+       </copy>
 
-    <target name="prepare.build" if="build.present" description="Prepare test 
build area">
-       <mkdir dir="build"/>
-       <mkdir dir="build/webapps"/>
-       <mkdir dir="build/testResults"/>
     </target>
-
 </project>

Added: incubator/beehive/trunk/test/dist-test/README.txt
URL: 
http://svn.apache.org/viewcvs/incubator/beehive/trunk/test/dist-test/README.txt?view=auto&rev=153310
==============================================================================
--- incubator/beehive/trunk/test/dist-test/README.txt (added)
+++ incubator/beehive/trunk/test/dist-test/README.txt Thu Feb 10 16:53:21 2005
@@ -0,0 +1,71 @@
+Follow the following steps to test your Beehive Distribution.  This assumes 
you have created the build.dist and
+build.test.dist using the scripts found under trunk.
+
+For Windows run buildTestDistro.cmd
+For Unix/Linux run buildTestDistro.sh
+
+These shell scripts will produce the binaries you can then use to test the 
Beehive distribution you created.
+
+Once the buildTestDistro.cmd or buildTestDistro.sh script has completed 
successfully, follow the steps below
+to test your distribution:
+
+1. Locate the distribution and test distribution binaries, which can be found 
in the directory
+
+ <SVN TRUNK>/build/dist/apache-beehive-incubating-svn-snapshot  (note, not yet 
compressed bug pending)
+and
+ <SVN 
TRUNK>/build/testDistArchives/apache-beehive-incubating-svn-snapshot-test.zip
+ (For unix/linux, see file apache-beehive-incubating-svn-snapshot-test.tar.gz)
+
+2. Move dist and test dist to shared location on your disk where you would 
like tests to run.  Suggest a path 
+like the following: (referred to from here on out as <dist_home> in these 
notes.
+  c:\beehiveDist
+
+After copy and extraction the directory structure will look something like 
this.
+<dist_home>\apache-beehive-incubating-svn-snapshot
+<dist_home>\beehive-test-dist
+
+3. Make sure the following environment variables are set for the shell,
+         %CATALINA_HOME% ($CATALINA_HOME for unix)
+         %ANT_HOME% ($ANT_HOME for unix)
+         %JAVA_HOME% {$JAVA_HOME for unix}
+
+    also make sure that you %JAVA_HOME%\bin and %ANT_HOME%\bin is in your path.
+
+  Here is an example of the script that you might want to use to set your 
environment,
+  *********************
+    @echo off
+    REM
+    REM Customize this file based on where you install various 3rd party 
components
+    REM such as the JDK, Ant and Tomcat, and also the location of the 
distribution 
+    REM you are going to test against.
+    REM
+
+    REM location of a JDK
+    set JAVA_HOME=C:\jdk1.5.0-B64
+
+    REM location of Ant
+    set ANT_HOME=C:\apache-ant-1.6.2
+
+    REM location of Tomcat
+    set CATALINA_HOME=C:\jakarta-tomcat-5.0.25
+
+    set PATH=%PATH%;%JAVA_HOME%\bin;%ANT_HOME%\bin
+  **************************
+
+4. Change directory to beehive-test-dist
+5. run 'ant run.tests' to test the default distribution that come with the 
package
+
+   If you get a deployment error around coreWeb already existing.  This needs 
to 
+   be undeployed manually.  To do this, start Tomcat and undeploy using the 
following:
+     ant -f netui/ant/tomcat-import.xml undeploy -Dcontext.path=coreWeb
+   This will only occur is running the source tree and distribution tree with 
the same
+   tomcat instance.
+
+6. Or run 'ant -Ddist.home=d:\beehive-distibution run.tests' to run tests on 
an alternative beehive distribution.
+
+You will find the test reports in /beehive-test-dist/build/testResults 
directory. For example,
+                       
testResults/netui/drt.testResults/html/junit-noframes.html (Junit drt test 
results)
+                       
testResults/netui/bvt.testResults/html/junit-noframes.html (Junit bvt test 
results)
+                       
testResults/netui/testRecorder/drt/html/junit-noframes.html (Test Recorder drt 
test results)
+                       
testResults/netui/bvt.testResults/html/junit-noframes.html (Junit bvt test 
results)
+

Propchange: incubator/beehive/trunk/test/dist-test/README.txt
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/beehive/trunk/test/dist-test/ant/build.xml
URL: 
http://svn.apache.org/viewcvs/incubator/beehive/trunk/test/dist-test/ant/build.xml?view=auto&rev=153310
==============================================================================
--- incubator/beehive/trunk/test/dist-test/ant/build.xml (added)
+++ incubator/beehive/trunk/test/dist-test/ant/build.xml Thu Feb 10 16:53:21 
2005
@@ -0,0 +1,49 @@
+<?xml version="1.0"?>
+
+<!-- ================================================================
+
+  This project is a test for Beehive distribution using the test 
+  recorder against a Tomcat web application.  
+
+================================================================ -->
+<project name="Beehive/distribution-test" default="usage" basedir=".">
+
+    <import file="test-imports.xml"/>
+
+    <!-- ================================================================ -->
+    <!--                                                                  -->
+    <!-- Target to run all drt/bvt tests                                  -->
+    <!--                                                                  -->
+    <!-- ================================================================ -->
+    <target name="run.tests" description="Run all tests">
+          <available property="build.present" file="${build.dir}"/>
+          <antcall target="clean"/>
+          <antcall target="prepare.build"/>
+
+          <antcall target="netui.tests"/>
+    </target>
+
+    <target name="netui.tests" description="Run netui tests">
+        
+        <!-- netui tests here -->
+        <ant dir="${test.home}/netui" antfile="build.xml" inheritAll="false" 
target="run.tests">
+             <property name="test.home" value="${test.home}"/>
+        </ant>
+
+        <!-- Controls tests here -->
+
+        <!-- WSM tests here -->
+
+    </target>
+
+    <target name="clean" if="build.present" description="Clean webapp">
+        <delete dir="${build.dir}"/>
+    </target>
+
+    <target name="prepare.build" if="build.present" description="Prepare test 
build area">
+       <mkdir dir="build"/>
+       <mkdir dir="build/webapps"/>
+       <mkdir dir="build/testResults"/>
+    </target>
+
+</project>

Propchange: incubator/beehive/trunk/test/dist-test/ant/build.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/beehive/trunk/test/dist-test/ant/test-imports.xml
URL: 
http://svn.apache.org/viewcvs/incubator/beehive/trunk/test/dist-test/ant/test-imports.xml?view=auto&rev=153310
==============================================================================
--- incubator/beehive/trunk/test/dist-test/ant/test-imports.xml (added)
+++ incubator/beehive/trunk/test/dist-test/ant/test-imports.xml Thu Feb 10 
16:53:21 2005
@@ -0,0 +1,154 @@
+<?xml version="1.0"?>
+<!--
+   Copyright 2004 The Apache Software Foundation.
+
+   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.
+  
+   $Header:$
+ -->
+
+<!--
+    A build file that needs to be imported by all beehive distribution test 
modules.             
+-->
+<project name="test-imports" default="" basedir=".">
+
+    <property environment="os"/>
+    <dirname property="test.home" file="${ant.file.test-imports}"/>
+    <property name="dist.home" value="${test.home}/../@DIST-NAME@"/>
+    <property name="build.dir" value="${test.home}/build"/>
+    <property name="test.result.root" value="${build.dir}/testResults"/>
+    <property name="test.webapp.root" value="${build.dir}/webapps"/>
+    <property name="servlet.runtime" value="tomcat"/>
+    <property name="server.root.url" value="http://localhost:8080"/>
+    <property name="tomcat.dir" value="${os.CATALINA_HOME}"/>
+    <property name="ant-junit.jar" value="${os.ANT_HOME}/lib/ant-junit.jar"/>
+    <property name="servlet24.jar" 
value="${tomcat.dir}/common/lib/servlet-api.jar"/>
+    <property name="jsp20.jar" value="${tomcat.dir}/common/lib/jsp-api.jar"/>
+
+
+    <!-- 
======================================================================== -->
+    <!-- Common Beehive Distribution Test Ant macros                           
   -->
+    <!-- 
======================================================================== -->
+
+    <macrodef name="build-webapp">
+        <attribute name="webappDir"/>
+        <sequential>
+            <echo>Build webapp ${webapp.dir}</echo>
+            <ant dir="${dist.home}/ant" antfile="buildWebapp.xml" 
target="build" inheritAll="false">
+                <property name="webapp.dir" location="@{webappDir}"/>
+            </ant>
+        </sequential>
+    </macrodef>
+
+    <macrodef name="clean-webapp">
+        <attribute name="webappDir"/>
+        <sequential>
+            <echo>Clean webapp ${webapp.dir}</echo>
+            <ant dir="${dist.home}/ant" antfile="buildWebapp.xml" 
target="clean" inheritAll="false">
+                <property name="webapp.dir" location="@{webappDir}"/>
+            </ant>
+        </sequential>
+    </macrodef>
+
+    <macrodef name="deploy-netui">
+        <attribute name="webappDir"/>
+        <sequential>
+            <echo>Deploy NetUI to webapp ${webapp.dir}</echo>
+            <ant dir="${dist.home}/ant" antfile="webappRuntimeCore.xml" 
+                 target="deploy.beehive.webapp.runtime" inheritAll="false">
+                <property name="webapp.dir" location="@{webappDir}"/>
+            </ant>
+        </sequential>
+    </macrodef>
+
+    <macrodef name="deploy-wsm">
+        <attribute name="webappDir"/>
+        <sequential>
+            <echo>Deploy WSM to webapp ${webapp.dir}</echo>
+            <ant dir="${dist.home}/ant" antfile="webappRuntimeCore.xml" 
+                 target="deploy.wsm.webapp.runtime" inheritAll="false">
+                <property name="webapp.dir" location="@{webappDir}"/>
+            </ant>
+        </sequential>
+    </macrodef>
+
+    <!--
+       Target not available in distribution
+     -->
+    <!--
+    <macrodef name="undeploy-netui">
+        <attribute name="webappDir"/>
+        <sequential>
+            <ant dir="${dist.home}/ant" antfile="webappRuntimeCore.xml" 
+                 target="undeploy.beehive.webapp.runtime" inheritAll="false">
+                <property name="webapp.dir" location="@{webappDir}"/>
+            </ant>
+        </sequential>
+    </macrodef>
+    -->
+
+    <macrodef name="deploy-webapp">
+        <attribute name="webappDir"/>
+        <attribute name="contextPath"/>
+        <sequential>
+            <ant dir="${test.home}/ant" 
antfile="${servlet.runtime}-imports.xml" target="deploy" 
+                                        inheritAll="false">
+                <property name="webapp.dir" location="@{webappDir}"/>
+                <property name="context.path" value="@{contextPath}"/>
+            </ant>
+        </sequential>
+    </macrodef>
+
+    <macrodef name="undeploy-webapp">
+        <attribute name="contextPath"/>
+        <sequential>
+            <ant dir="${test.home}/ant" 
antfile="${servlet.runtime}-imports.xml" target="undeploy" inheritAll="false">
+                <property name="context.path" value="@{contextPath}"/>
+            </ant>
+        </sequential>
+    </macrodef>
+
+    <macrodef name="redeploy-webapp">
+        <attribute name="contextPath"/>
+        <sequential>
+            <ant dir="${test.home}/ant" 
antfile="${servlet.runtime}-imports.xml" target="redeploy" inheritAll="false">
+                <property name="context.path" value="@{contextPath}"/>
+            </ant>
+        </sequential>
+    </macrodef>
+
+    <macrodef name="start-server">
+        <attribute name="shmem"/>
+        <attribute name="javaOptions"/>
+        <sequential>
+            <!-- if shmem, set target to "start.shmem" -->
+            <condition property="start.target" value="start.with.shmem">
+                 <istrue value="@{shmem}"/>
+            </condition>
+            <condition property="start.target" value="start">
+                 <isfalse value="@{shmem}"/>
+            </condition>
+
+            <ant dir="${test.home}/ant" 
antfile="${servlet.runtime}-imports.xml" 
+                 target="${start.target}" inheritAll="false">
+                <property name="java.options" value="@{javaOptions}"/>
+            </ant>
+        </sequential>
+    </macrodef>
+
+    <macrodef name="stop-server">
+        <sequential>
+            <ant dir="${test.home}/ant" 
antfile="${servlet.runtime}-imports.xml" target="stop" inheritAll="false"/>
+        </sequential>
+    </macrodef>
+</project>

Propchange: incubator/beehive/trunk/test/dist-test/ant/test-imports.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/beehive/trunk/test/dist-test/build.xml
URL: 
http://svn.apache.org/viewcvs/incubator/beehive/trunk/test/dist-test/build.xml?view=auto&rev=153310
==============================================================================
--- incubator/beehive/trunk/test/dist-test/build.xml (added)
+++ incubator/beehive/trunk/test/dist-test/build.xml Thu Feb 10 16:53:21 2005
@@ -0,0 +1,101 @@
+<?xml version="1.0"?>
+
+<project name="Beehive/BuildTestDist" default="build.test.dist" basedir=".">
+    
+    <!-- ========================================= -->
+    <!-- Targets for building the standalone test  -->
+    <!-- package for testing Beehive distribution. -->
+    <!-- ========================================= -->  
+    <import file="../../beehive-imports.xml"/>
+
+    <property name="build.dir" value="${beehive.home}/build"/>
+    <property name="build.tmp.dir" value="${build.dir}/tmp"/>
+    <property name="test.dist.base.dir" value="${build.tmp.dir}/test-dist"/>
+ 
+
+    <target name="prep" description="Prepare the test-distribution assembling 
area">
+       <mkdir dir="${test.dist.base.dir}/beehive-test-dist"/>
+       <mkdir dir="${test.dist.base.dir}/beehive-test-dist/netui"/>
+       <mkdir dir="${test.dist.base.dir}/beehive-test-dist/controls"/>
+       <mkdir dir="${test.dist.base.dir}/beehive-test-dist/wsm"/>
+    </target>
+
+    <target name="build.test.dist" depends="prep" 
+            description="Build the test package for Beehive distribution test">
+   
+        <!-- Build the tests -->
+            <!-- Build netui tests here -->
+            <antcall target = "build.netui.tests"/>
+
+            <!-- Build Controls tests here -->
+
+            <!-- Build JWS tests here -->
+
+        <!-- Assemble the tests for distribution -->
+            <!-- Assemble netui tests -->
+            <antcall target="assemble.netui.tests"/>
+
+            <!-- Assemble controls tests here -->
+
+            <!-- Assemble controls tests here -->
+
+            <!-- Assemble resources for all tests -->
+            <copy todir="${test.dist.base.dir}/beehive-test-dist">
+                    <fileset dir="${beehive.home}/test/dist-test" 
+                             includes="README.txt"/>
+            </copy>
+
+            <copy todir="${test.dist.base.dir}/beehive-test-dist">
+                    <fileset dir="${beehive.home}/test/dist-test/ant" 
+                             includes="build.xml"/>
+            </copy>
+
+            <copy todir="${test.dist.base.dir}/beehive-test-dist">
+                    <fileset dir="${beehive.home}/test/dist-test/ant" 
+                             includes="test-imports.xml"/>
+                   <filterset>
+                        <filter token="DIST-NAME" value="${dist.name}"/>
+                   </filterset>
+            </copy>
+
+            <copy todir="${test.dist.base.dir}/beehive-test-dist/ant">
+                <fileset file="${beehive.home}/ant/*-imports.xml"/>
+            </copy> 
+
+         <!-- Package the test distribution -->
+        <antcall target="package.test.dist"/>
+    </target>
+
+    <target name="build.netui.tests" description="Build netui tests">
+         <ant dir="${beehive.home}/netui/test/dist-test" antfile="build.xml"
+                             target="build.tests" inheritAll="false">
+         </ant>
+    </target>
+
+    <target name="assemble.netui.tests" description="Assemble the netui tests 
for the distribution">
+         <ant dir="${beehive.home}/netui/test/dist-test" antfile="build.xml"
+                             target="assemble.tests" inheritAll="false">
+               <property name="test.dist.base.dir" 
value="${test.dist.base.dir}"/>
+         </ant>
+    </target>
+
+    <target name="package.test.dist" description="Package beehive test 
distribution into archive files">
+        <mkdir dir="${beehive.home}/build/testDistArchives"/>
+        <zip 
destfile="${beehive.home}/build/testDistArchives/${dist.name}-test.zip" >
+            <!-- Not to include beehive dist into the test distribution -->
+            <!--
+            <fileset dir="${beehive.home}/build/dist"/>
+            -->
+            <fileset dir="${test.dist.base.dir}" excludes="**/*.gz,**/*.sh"/>
+        </zip>
+
+        <tar 
destfile="${beehive.home}/build/testDistArchives/${dist.name}-test.tar.gz" 
compression="gzip">
+            <!-- Not to include beehive dist into the test distribution -->
+            <!--
+            <tarfileset dir="${beehive.home}/build/dist"/>
+             -->
+            <tarfileset dir="${test.dist.base.dir}" 
excludes="**/*.zip,**/*.cmd"/>
+        </tar>
+      </target>
+
+</project>

Propchange: incubator/beehive/trunk/test/dist-test/build.xml
------------------------------------------------------------------------------
    svn:eol-style = native


Reply via email to