You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beehive.apache.org by js...@apache.org on 2005/02/18 00:43:35 UTC
svn commit: r154205 - in incubator/beehive/trunk: controls/test/
controls/test/common/ controls/test/dist-test/
controls/test/dist-test/common/ controls/test/infra/gtlf/xsl/
controls/test/infra/tch/runtime/ test/dist-test/ test/dist-test/ant/
Author: jsong
Date: Thu Feb 17 15:43:29 2005
New Revision: 154205
URL: http://svn.apache.org/viewcvs?view=rev&rev=154205
Log:
Add controls-test package into distribution-test package.
Added:
incubator/beehive/trunk/controls/test/dist-test/
incubator/beehive/trunk/controls/test/dist-test/build.xml
incubator/beehive/trunk/controls/test/dist-test/common/
incubator/beehive/trunk/controls/test/dist-test/common/controls-test-imports.xml
incubator/beehive/trunk/controls/test/dist-test/common/controls-test-web.xml
incubator/beehive/trunk/controls/test/dist-test/common/path.properties
incubator/beehive/trunk/controls/test/dist-test/common/run-test-build.xml
Modified:
incubator/beehive/trunk/controls/test/build.xml
incubator/beehive/trunk/controls/test/common/path.properties
incubator/beehive/trunk/controls/test/infra/gtlf/xsl/build.xml
incubator/beehive/trunk/controls/test/infra/tch/runtime/build.xml
incubator/beehive/trunk/test/dist-test/ant/build.xml
incubator/beehive/trunk/test/dist-test/build.xml
Modified: incubator/beehive/trunk/controls/test/build.xml
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/controls/test/build.xml?view=diff&r1=154204&r2=154205
==============================================================================
--- incubator/beehive/trunk/controls/test/build.xml (original)
+++ incubator/beehive/trunk/controls/test/build.xml Thu Feb 17 15:43:29 2005
@@ -346,6 +346,8 @@
</fileset>
</copy>
+ <jar destfile="${controlstestjunits.jar}" basedir="${build.tests}"/>
+
<property name="_build.java.tests.ran" value="true"/>
</target>
Modified: incubator/beehive/trunk/controls/test/common/path.properties
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/controls/test/common/path.properties?view=diff&r1=154204&r2=154205
==============================================================================
--- incubator/beehive/trunk/controls/test/common/path.properties (original)
+++ incubator/beehive/trunk/controls/test/common/path.properties Thu Feb 17 15:43:29 2005
@@ -25,6 +25,7 @@
build.jars=${build.dir}/jars
controlstestbeans.jar=${build.dir}/controlstestbeans.jar
controlstestdrivers.jar=${build.dir}/controlstestdrivers.jar
+controlstestjunits.jar=${build.dir}/controlstestjunits.jar
external.dir=${beehive.home}/external
Added: incubator/beehive/trunk/controls/test/dist-test/build.xml
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/controls/test/dist-test/build.xml?view=auto&rev=154205
==============================================================================
--- incubator/beehive/trunk/controls/test/dist-test/build.xml (added)
+++ incubator/beehive/trunk/controls/test/dist-test/build.xml Thu Feb 17 15:43:29 2005
@@ -0,0 +1,166 @@
+<?xml version="1.0"?>
+
+<project name="Beehive/Controls/BuildTestDist" default="useage" basedir=".">
+
+ <property environment="os"/>
+
+ <property file="common/path.properties"/>
+ <!--import file="common/controls-test-imports.xml"/-->
+
+ <target name="usage">
+ <echo message=""/>
+ <echo message=""/>
+ <echo message="Build Controls Test Distribution"/>
+ <echo message="================================================================"/>
+ <echo message="| Usage |"/>
+ <echo message="================================================================"/>
+ <echo message=" "/>
+ <echo message="build.test - build/jar controls, drivers and junits classes. "/>
+ <echo message="assemble.tests - put all the parts needed by the test together. "/>
+ <echo message=""/>
+ <echo message=""/>
+ </target>
+
+
+ <!-- ========================================= -->
+ <!-- Targets for building the standalone test -->
+ <!-- package for testing Beehive distribution. -->
+ <!-- ========================================= -->
+
+ <target name="build.tests" description="Build all controls tests">
+ <ant dir="../" antfile="build.xml" target="dbControl" inheritAll="false"/>
+ <ant dir="../" antfile="build.xml" target="build" inheritAll="false"/>
+ <ant dir="../" antfile="build.xml" target="build-test-webapp" inheritAll="false"/>
+ </target>
+ <target name="dirs">
+ <mkdir dir="${test.dist.base.dir}/beehive-test-dist"/>
+ <mkdir dir="${test.dist.base.dir}/beehive-test-dist/controls"/>
+ <mkdir dir="${test.dist.base.dir}/beehive-test-dist/controls/external"/>
+ <mkdir dir="${test.dist.base.dir}/beehive-test-dist/controls/test"/>
+ <mkdir dir="${test.dist.base.dir}/beehive-test-dist/controls/test/common"/>
+ <mkdir dir="${test.dist.base.dir}/beehive-test-dist/controls/test/infra"/>
+ <mkdir dir="${test.dist.base.dir}/beehive-test-dist/controls/test/jars"/>
+ <mkdir dir="${test.dist.base.dir}/beehive-test-dist/controls/test/cases"/>
+ <mkdir dir="${test.dist.base.dir}/beehive-test-dist/controls/test/webapps"/>
+ </target>
+
+ <target name="assemble.tests"
+ description="Assemble all components for controls test distribution"
+ depends="dirs">
+
+ <!-- Copy external jars required by controls tests to beehive-test-dist/controls/external -->
+ <!-- beehive-antext jars -->
+ <copy todir="${test.dist.base.dir}/beehive-test-dist/controls/external">
+ <fileset dir="../../../external/beehive-antext">
+ <include name="*.jar" />
+ </fileset>
+ </copy>
+
+ <!-- derby jars -->
+ <copy todir="${test.dist.base.dir}/beehive-test-dist/controls/external">
+ <fileset dir="../../../external/derby">
+ <include name="*.jar" />
+ </fileset>
+ </copy>
+ <!-- httpunit jars -->
+ <copy todir="${test.dist.base.dir}/beehive-test-dist/controls/external">
+ <fileset dir="../../../external/httpunit">
+ <include name="*.jar" />
+ </fileset>
+ </copy>
+ <!-- jakarta.jar -->
+ <copy todir="${test.dist.base.dir}/beehive-test-dist/controls/external">
+ <fileset dir="../../../external/jakarta">
+ <include name="*.jar" />
+ </fileset>
+ </copy>
+ <!-- junit jars -->
+ <copy todir="${test.dist.base.dir}/beehive-test-dist/controls/external">
+ <fileset dir="../../../external/junit">
+ <include name="*.jar" />
+ </fileset>
+ </copy>
+ <!-- servlet jars -->
+ <copy todir="${test.dist.base.dir}/beehive-test-dist/controls/external">
+ <fileset dir="../../../external/servlet">
+ <include name="*.jar" />
+ </fileset>
+ </copy>
+ <!-- velocity jars -->
+ <copy todir="${test.dist.base.dir}/beehive-test-dist/controls/external">
+ <fileset dir="../../../external/velocity">
+ <include name="*.jar" />
+ </fileset>
+ </copy>
+
+ <!-- Copy internal tools from controls/test/infra to beehive-test-dist/controls/test/infra-->
+ <copy todir="${test.dist.base.dir}/beehive-test-dist/controls/test/infra">
+ <fileset dir="../infra" />
+ </copy>
+
+ <!-- Copy test jars -->
+ <copy file="../../../samples/controls-db/build/dbControl.jar"
+ tofile="${test.dist.base.dir}/beehive-test-dist/controls/test/jars/dbControl.jar"/>
+ <copy file="../build/controlstestbeans.jar"
+ tofile="${test.dist.base.dir}/beehive-test-dist/controls/test/jars/controls.jar"/>
+ <copy file="../build/controlstestdrivers.jar"
+ tofile="${test.dist.base.dir}/beehive-test-dist/controls/test/jars/drivers.jar"/>
+ <copy file="../build/controlstestjunits.jar"
+ tofile="${test.dist.base.dir}/beehive-test-dist/controls/test/jars/junits.jar"/>
+
+ <!-- Copy test suites -->
+ <copy todir="${test.dist.base.dir}/beehive-test-dist/controls/test/cases">
+ <fileset dir="../build/mantis.tch.cases" />
+ </copy>
+
+
+ <!--we need to make sure availability of location="${db.control.jar}"/-->
+
+ <!-- Copy the web application to beehive-test-dist/controls/test/webapps-->
+ <copy todir="${test.dist.base.dir}/beehive-test-dist/controls/test/webapps/controlsWeb">
+ <fileset dir="../build/webapps/controlsWeb" />
+ </copy>
+
+ <!--Copu build script over/-->
+ <copy file="common/run-test-build.xml"
+ tofile="${test.dist.base.dir}/beehive-test-dist/controls/test/build.xml"/>
+ <copy file="common/path.properties"
+ tofile="${test.dist.base.dir}/beehive-test-dist/controls/test/common/path.properties"/>
+ <copy file="common/controls-test-imports.xml"
+ tofile="${test.dist.base.dir}/beehive-test-dist/controls/test/common/controls-test-imports.xml"/>
+ <copy file="common/controls-test-web.xml"
+ tofile="${test.dist.base.dir}/beehive-test-dist/controls/test/webapps/build.xml"/>
+
+
+ </target>
+
+ <!-- ================================================================ -->
+ <!-- -->
+ <!-- Target to run all drt/bvt tests -->
+ <!-- Not sure if we need this in controls test -->
+ <!-- -->
+ <!-- ================================================================ -->
+ <target name="run.tests" description="Run all tests">
+ <available property="build.present" file="${build.dir}"/>
+ <antcall target="clean"/>
+ <antcall target="prepare.build"/>
+
+ <antcall target="controls.tests"/>
+ </target>
+
+ <target name="controls.tests" description="Run netui tests">
+ <ant dir=".." antfile="build.xml" target="checkin.tests" inheritAll="false" />
+ <ant dir=".." antfile="build.xml" target="detailed.tests" inheritAll="false" />
+ </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>
\ No newline at end of file
Added: incubator/beehive/trunk/controls/test/dist-test/common/controls-test-imports.xml
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/controls/test/dist-test/common/controls-test-imports.xml?view=auto&rev=154205
==============================================================================
--- incubator/beehive/trunk/controls/test/dist-test/common/controls-test-imports.xml (added)
+++ incubator/beehive/trunk/controls/test/dist-test/common/controls-test-imports.xml Thu Feb 17 15:43:29 2005
@@ -0,0 +1,66 @@
+<?xml version="1.0"?>
+
+<project name="Beehive/Controls/controls-test-import" default="usage" basedir=".">
+
+ <property environment="os"/>
+ <property file="path.properties"/>
+
+ <fileset id="velocity.fileset" dir="${test.home}/controls/external">
+ <include name="velocity-1.4.jar"/>
+ <include name="velocity-dep-1.4.jar"/>
+ </fileset>
+
+ <path id="ant-all.dependency.path">
+ <fileset dir="${os.ANT_HOME}/lib">
+ <include name="*.jar"/>
+ </fileset>
+ </path>
+
+ <path id="beehive-antext.dependency.path">
+ <pathelement location="${test.home}/controls/external/beehive-antext.jar"/>
+ </path>
+
+ <path id="controls.dependency.path">
+ <pathelement location="${dist.home}/lib/controls/controls.jar"/>
+ </path>
+
+ <path id="derby.dependency.path">
+ <pathelement location="${test.home}/controls/external/derby_46005.jar"/>
+ </path>
+
+ <path id="junit.dependency.path">
+ <pathelement location="${test.home}/controls/external/junit.jar"/>
+ </path>
+
+ <path id="servlet.dependency.path">
+ <pathelement location="${servlet24.jar}"/>
+ <pathelement location="${jsp20.jar}"/>
+ </path>
+
+ <path id="tools.dependency.path">
+ <pathelement location="${os.JAVA_HOME}/lib/tools.jar"/>
+ </path>
+
+ <path id="velocity.dependency.path">
+ <fileset refid="velocity.fileset"/>
+ </path>
+
+ <path id="webservice.classpath">
+ <fileset id="webservice.jars" dir="${dist.home}/lib/wsm">
+ <include name="wsdl4j.jar"/>
+ <include name="saaj.jar"/>
+ <include name="jaxrpc.jar"/>
+ <include name="commons-logging.jar"/>
+ <include name="commons-discovery.jar"/>
+ <include name="axis-ant.jar"/>
+ <include name="axis.jar"/>
+ </fileset>
+ </path>
+
+ <!-- ======================================================================== -->
+ <!-- Common Beehive tasks -->
+ <!-- ======================================================================== -->
+ <taskdef name="gethostname"
+ classname="org.apache.beehive.test.tools.antext.GetHostName"
+ classpathref="beehive-antext.dependency.path"/>
+</project>
Added: incubator/beehive/trunk/controls/test/dist-test/common/controls-test-web.xml
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/controls/test/dist-test/common/controls-test-web.xml?view=auto&rev=154205
==============================================================================
--- incubator/beehive/trunk/controls/test/dist-test/common/controls-test-web.xml (added)
+++ incubator/beehive/trunk/controls/test/dist-test/common/controls-test-web.xml Thu Feb 17 15:43:29 2005
@@ -0,0 +1,191 @@
+<?xml version="1.0"?>
+<!--
+===========================================================================
+
+ This project consists of targets to build/clean a web appplication with
+ the latest Beehive NETUI artifacts, start/stop Tomcat server, and deploy
+ the web application to a started Tomcat server.
+
+============================================================================
+-->
+<project name="Beehive/Controls/dist-test/Controls-Test-Web" default="usage" basedir=".">
+
+ <import file="../../../test-imports.xml"/>
+ <!-- Not sure if we need them -->
+ <import file="../common/controls-test-imports.xml"/>
+ <property file="../common/path.properties"/>
+
+ <property name="webapp.name" value="controlsWeb"/>
+ <property name="server.root.url" value="http://localhost:8080"/>
+ <property name="webapp.waitfor.url" value="${server.root.url}/${webapp.name}"/>
+ <property name="dbControl.jar" location="${dist.home}/samples/controls-db/build/dbControl.jar"/>
+ <property name="derby.jar" location="../external/derby_46005.jar"/>
+
+ <target name="usage">
+ <echo message="" />
+ <echo message="" />
+ <echo message="web app build scripts for controls testing" />
+ <echo message="================================================================" />
+ <echo message="| Usage |" />
+ <echo message="================================================================" />
+ <echo message="" />
+ <echo message="-------------------------------------------------------------------" />
+ <echo message="| Standard Targets |" />
+ <echo message="-------------------------------------------------------------------" />
+ <echo message="start - start Tomcat server"/>
+ <echo message="stop - stop Tomcat server"/>
+ <echo message="deploy - deploys a built webapp to a started Tomcat" />
+ <echo message="" />
+ <echo message="" />
+ </target>
+
+ <target name="-init">
+
+ <property name="webapp.build.dir" location="${build.dir}/webapps"/>
+ <property name="webapp.dir" location="${webapp.build.dir}/${webapp.name}"/>
+
+ <available file="${webapp.dir}" property="webapp.dir.present"/>
+
+ <mkdir dir="${webapp.build.dir}"/>
+
+ <property file="${controls.test.webapp.root}/${webapp.name}/app.properties"/>
+
+ <condition property="do.inject.netui">
+ <istrue value="${app.inject.netui}"/>
+ </condition>
+ <condition property="do.inject.wsm">
+ <istrue value="${app.inject.wsm}"/>
+ </condition>
+ <condition property="do.inject.milton">
+ <istrue value="${app.inject.milton}"/>
+ </condition>
+ <condition property="do.inject.test.controls">
+ <isset property="app.inject.test.controls"/>
+ </condition>
+ <condition property="do.inject.test.controls.src">
+ <equals arg1="${app.inject.test.controls}" arg2="src"/>
+ </condition>
+ <condition property="do.inject.test.controls.jar">
+ <equals arg1="${app.inject.test.controls}" arg2="jar"/>
+ </condition>
+ <condition property="do.inject.test.drivers">
+ <isset property="app.inject.test.drivers"/>
+ </condition>
+ <condition property="do.inject.test.drivers.src">
+ <equals arg1="${app.inject.test.drivers}" arg2="src"/>
+ </condition>
+ <condition property="do.inject.test.drivers.jar">
+ <equals arg1="${app.inject.test.drivers}" arg2="jar"/>
+ </condition>
+ <condition property="do.inject.test.controlhaus.jars">
+ <istrue value="${app.inject.controlhaus.jars}"/>
+ </condition>
+ </target>
+
+ <!-- webapps are copied into a staging directory where additional build steps can be performed -->
+ <target name="stage.webapp" depends="-init">
+ <copy todir="${webapp.dir}" overwrite="true">
+ <fileset dir="${controls.test.webapp.root}/${webapp.name}"/>
+ </copy>
+ </target>
+
+
+ <target name="clean" description="Clean webapp" depends="-init" if="webapp.dir.present">
+ <echo message="----------------------------------------------"/>
+ <echo message="| Controls ${webapp.name} clean starting |"/>
+ <echo message="----------------------------------------------"/>
+
+ <undeploy-netui webappDir="${webapp.dir}"/>
+
+ <delete dir="${webapp.build.dir}"/>
+ <delete file="velocity.log"/>
+
+ <echo message="----------------------------------------------"/>
+ <echo message="| Controls ${webapp.name} clean ending |"/>
+ <echo message="----------------------------------------------"/>
+ </target>
+
+ <target name="scrub" depends="clean" description="Scrub webapp">
+ <delete dir="${tomcat.dir}/work/Catalina/localhost/${webapp.name}" includeEmptyDirs="true"/>
+ <delete file="${tomcat.dir}/conf/Catalina/localhost/${webapp.name}.xml"/>
+ </target>
+
+ <!-- ================================================================ -->
+ <!-- -->
+ <!-- Targets for deploying the webapp on a server -->
+ <!-- -->
+ <!-- ================================================================ -->
+ <target name="deploy" description="Deploy webapp" depends="-init">
+ <deploy-webapp webappDir="${webapp.dir}" contextPath="${webapp.name}"/>
+ </target>
+
+ <target name="undeploy" description="Undeploy webapp">
+ <undeploy-webapp contextPath="${webapp.name}"/>
+ </target>
+
+ <target name="redeploy" description="Redeploy webapp">
+ <undeploy-webapp contextPath="${webapp.name}"/>
+ </target>
+
+ <!-- ================================================================ -->
+ <!-- -->
+ <!-- Targets for starting / stopping a server -->
+ <!-- -->
+ <!-- ================================================================ -->
+ <target name="start" description="Start server">
+ <start-server shmem="false" javaOptions=""/>
+ </target>
+
+ <target name="start.with.shmem" description="Start server">
+ <start-server shmem="true" javaOptions=""/>
+ </target>
+
+ <target name="start.with.asserts" description="Start server with asserts enabled for org.apache.beehive.netui">
+ <start-server shmem="false" javaOptions="-ea:org.apache.beehive.netui..."/>
+ </target>
+
+ <target name="start.with.shmem.asserts" description="Start server with asserts enabled for org.apache.beehive.netui">
+ <start-server shmem="true" javaOptions="-ea:org.apache.beehive.netui..."/>
+ </target>
+
+ <target name="stop" description="Stop server">
+ <stop-server/>
+ </target>
+
+ <target name="ensure.deployed" description="Deploy webapp for the test recorder">
+ <echo>Ensuring that the webapp ${webapp.name} is deployed on a running server at the url ${webapp.waitfor.url}</echo>
+
+ <waitfor maxwait="5" maxwaitunit="second" timeoutproperty="unavailable">
+ <http url="${webapp.waitfor.url}"/>
+ </waitfor>
+ <antcall target="do.deploy"/>
+ <antcall target="do.redeploy"/>
+ <fail if="still.unavailable" message="Couldn't find webapp with path ${webapp.waitfor.url}"/>
+ </target>
+
+ <target name="do.deploy" if="unavailable">
+ <echo>Webapp is not deployed; deploying</echo>
+
+ <antcall target="deploy"/>
+ <echo>...deploy complete</echo>
+
+ <waitfor maxwait="120" maxwaitunit="second" timeoutproperty="still.unavailable">
+ <http url="${webapp.waitfor.url}"/>
+ </waitfor>
+ </target>
+
+ <target name="do.redeploy" unless="unavailable">
+ <echo>Webapp is deployed; undeploy and redeploy</echo>
+
+ <antcall target="undeploy"/>
+ <echo>...undeploy complete</echo>
+
+ <antcall target="deploy"/>
+ <echo>...deploy complete</echo>
+
+ <waitfor maxwait="120" maxwaitunit="second" timeoutproperty="still.unavailable">
+ <http url="${webapp.waitfor.url}"/>
+ </waitfor>
+ </target>
+
+</project>
Added: incubator/beehive/trunk/controls/test/dist-test/common/path.properties
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/controls/test/dist-test/common/path.properties?view=auto&rev=154205
==============================================================================
--- incubator/beehive/trunk/controls/test/dist-test/common/path.properties (added)
+++ incubator/beehive/trunk/controls/test/dist-test/common/path.properties Thu Feb 17 15:43:29 2005
@@ -0,0 +1,31 @@
+#need to do <property environment="os"/> before loading this property file
+
+controls.test.home=${test.home}/controls
+
+#properties required by tch to generate test report
+controls.test.root=${controls.test.home}
+controls.test.infra.dir=${controls.test.home}/test/infra
+
+#Where are the test binaries
+controls.test.junits.jar=${controls.test.home}/test/jars/junits.jar
+controls.test.drivers.jar=${controls.test.home}/test/jars/drivers.jar
+controls.test.controls.jar=${controls.test.home}/test/jars/controls.jar
+
+#tch is a test util
+tch.home=${controls.test.home}/test/infra/tch
+tch.jar=${tch.home}/tchx.jar
+tch.schema.jar=${tch.home}/schema.jar
+tch.xbean.jar=${tch.home}/xbean-1.0.2.jar
+
+
+milton.jar=${test.home}/controls/test/infra/milton/milton.jar
+jakarta.jar=${test.home}/controls/external/jakarta-regexp-1.2.jar
+xerces.jar=${test.home}/controls/external/xerces-1.4.4.jar
+httpunit.jar=${test.home}/controls/external/httpunit.jar
+httpunit-xerces.jar=${test.home}/controls/external/xercesImpl.jar
+nekohtml.jar=${test.home}/controls/external/nekohtml.jar
+
+mantis.milton.srcgen.dir=${test.home}
+mantis.milton.bingen.dir=${test.home}
+mantis.milton.log.dir=${test.home}/mantis.milton.logs
+mantis.milton.control.test.units=${mantis.milton.srcgen.dir}/testsrcgen
\ No newline at end of file
Added: incubator/beehive/trunk/controls/test/dist-test/common/run-test-build.xml
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/controls/test/dist-test/common/run-test-build.xml?view=auto&rev=154205
==============================================================================
--- incubator/beehive/trunk/controls/test/dist-test/common/run-test-build.xml (added)
+++ incubator/beehive/trunk/controls/test/dist-test/common/run-test-build.xml Thu Feb 17 15:43:29 2005
@@ -0,0 +1,232 @@
+<?xml version="1.0"?>
+
+<!-- ================================================================
+
+ A project tests Beehive controls distribution
+
+================================================================ -->
+<project name="Beehive/Controls/distribution-test" default="usage" basedir=".">
+
+ <import file="../../test-imports.xml"/>
+ <import file="common/controls-test-imports.xml"/>
+ <property file="common/path.properties"/>
+
+ <target name="usage">
+ <echo message=""/>
+ <echo message=""/>
+ <echo message="Test Controls Distribution"/>
+ <echo message="================================================================"/>
+ <echo message="| Usage |"/>
+ <echo message="================================================================"/>
+ <echo message=" "/>
+ <echo message="run.tests - run checkin.tests and detailed.tests. "/>
+ <echo message="checkin.tests - run checkin.tests. "/>
+ <echo message="detailed.tests - run detailed.tests. "/>
+ <echo message=""/>
+ <echo message=""/>
+ </target>
+
+
+ <!-- Maybe we need a controls.test.dbcontrols.jar at here -->
+ <path id="db.controls.jar">
+ <pathelement path="${dist.home}/lib/controls/jdbc-controls.jar"/>
+ </path>
+
+ <!-- Inherited from beehive/controls/test/build.xml -->
+ <path id="tch.run.classpath">
+
+ <pathelement location="${tch.jar}"/>
+ <pathelement location="${tch.schema.jar}"/>
+ <pathelement location="${tch.xbean.jar}"/>
+ <pathelement location="${milton.jar}"/>
+
+ <pathelement location="${jakarta.jar}"/>
+ <pathelement location="${httpunit.jar}"/>
+ <pathelement location="${httpunit-xerces.jar}"/>
+ <pathelement location="${nekohtml.jar}"/>
+
+ <path refid="ant-all.dependency.path"/>
+ <path refid="controls.dependency.path"/>
+ <path refid="velocity.dependency.path"/>
+ <path refid="servlet.dependency.path"/>
+ <path refid="junit.dependency.path"/>
+ <path refid="tools.dependency.path"/>
+ <path refid="derby.dependency.path"/>
+
+ <pathelement location="${db.control.jar}"/>
+ <pathelement location="${controls.test.controls.jar}"/>
+ <pathelement location="${controls.test.drivers.jar}"/>
+ <pathelement location="${controls.test.junits.jar}" />
+
+ <pathelement path="${mantis.milton.srcgen.dir}"/>
+ <!-- the following are needed for axis clients -->
+ <path refid="webservice.classpath"/>
+ </path>
+
+ <!-- ================================================================ -->
+ <!-- -->
+ <!-- Target to run all checkin/detailed tests -->
+ <!-- -->
+ <!-- ================================================================ -->
+ <target name="run.tests" description="Run all tests">
+ <sequential>
+ <antcall target="checkin.tests"/>
+ <!--antcall target="detailed.tests"/-->
+ </sequential>
+ </target>
+ <!-- This is not needed in controls test-->
+ <!--target name="prepare.netui.testweb" description="Prepare netui test web in the build area">
+ <copy todir="${build.dir}/webapps">
+ <fileset dir="${test.dir}/webapps"/>
+ </copy>
+ </target-->
+
+ <!-- ================================================================ -->
+ <!-- -->
+ <!-- Targets for running JUnit test suites -->
+ <!-- -->
+ <!-- ================================================================ -->
+
+ <target name="junit.drt" description="Run JUnit drt test suite">
+ <antcall target="checkin.tests"/>
+ </target>
+
+ <target name="junit.bvt" description="Run JUnit bvt test suite">
+ <antcall target="detailed.tests"/>
+ </target>
+
+
+ <!-- =================================================================== -->
+ <!-- Targets to checkin tests and detailed tests -->
+ <!-- Inherited from beehive/controls/test/build.xml -->
+ <!-- ==================================================================== -->
+
+ <target name="checkin.tests" >
+ <antcall target="clean" />
+ <!--antcall target="mantis.tch" /-->
+ <!--antcall target="run" /-->
+ <echo message="${do.start.tomcat}"/>
+ <property name="test.freq" value="checkin"/>
+ <antcall target="run.test" />
+ </target>
+
+ <target name="detailed.tests" >
+ <antcall target="clean" />
+ <!--antcall target="mantis.tch" /-->
+ <property name="test.freq" value="detailed"/>
+ <antcall target="run.test" />
+ </target>
+
+ <target name="run.test">
+ <parallel>
+ <echo message="start a new thread to build controlsWeb"/>
+ <antcall target="tomcat.start"/>
+ <sequential>
+ <echo message="continue the new thread, wait for tomcat to start"/>
+ <sleep seconds="20"/>
+ <echo message="continue the new thread, deploy controlsTestWeb"/>
+ <ant dir ="./webapps" antfile="build.xml" target="ensure.deployed">
+ <property name="build.dir" value="${basedir}"/>
+ </ant>
+ <echo message="continue the new thread, run junit tests"/>
+ <antcall target="run"/>
+ <echo message="continue the new thread, undeploy controlsTestWeb"/>
+ <ant dir ="./webapps" antfile="build.xml" target="undeploy"/>
+ <echo message="stop tomcat server, finish the new thread"/>
+ <antcall target="tomcat.stop"/>
+ </sequential>
+ </parallel>
+ </target>
+
+ <!-- =========================================================== -->
+ <!-- target to start Tomcat server -->
+ <!-- =========================================================== -->
+
+ <target name="tomcat.start">
+ <echo message="starting tomcat"/>
+ <ant dir ="./webapps" antfile="build.xml" target="start"/>
+ </target>
+
+ <!-- =========================================================== -->
+ <!-- target to stop Tomcat server -->
+ <!-- =========================================================== -->
+
+ <target name="tomcat.stop">
+ <echo message="stopping tomcat"/>
+ <ant dir ="./webapps" antfile="build.xml" target="stop"/>
+ </target>
+
+ <!-- =========================================================== -->
+ <!-- targets to run junit tests -->
+ <!-- =========================================================== -->
+
+ <target name="clean" >
+ <delete dir="${build.dir}"/>
+ <delete dir="${test.logs}"/>
+ <delete dir="${mantis.tch.log.dir}"/>
+ <delete dir="${mantis.tch.cases.dir}"/>
+ <delete dir="${mantis.milton.log.dir}"/>
+ <delete dir="${mantis.milton.cases.dir}"/>
+
+ <delete dir="${derby.data}"/>
+ <delete file="derby.log"/>
+ <delete file="velocity.log"/>
+ <delete><fileset dir="." includes="tch*.*"/></delete>
+ <!--ant dir="webapps" target="clean"/-->
+ </target>
+
+ <target name="run.junit.java">
+ <property name="tch.test.names" value="org-apache-beehive-controls-test-java*.*"/>
+ <antcall target="run"/>
+ </target>
+
+ <target name="run.junit.jpf">
+ <property name="tch.test.names" value="org-apache-beehive-controls-test-jpf*.*"/>
+ <antcall target="run"/>
+ </target>
+
+ <target name="run">
+ <gethostname/> <!-- set ${hostname} -->
+ <property name="gtlf.dtd.use.remote" value="true"/>
+ <property name="gtlf.dtd.remote" value="http://incubator.apache.org/beehive/dtd/gtlf/gtlf-config-2.0.dtd"/>
+ <property name="gtlf.dtd.local" value="../tools/gtlf/gtlf-config-2.0.dtd"/>
+
+ <property name="test.hostname" value="${hostname}" />
+ <property name="test.hostname.port" value="8080" /> <!-- tomcat default port -->
+ <property name="test-suite" value="${test.home}/controls/test/cases/root.xml"/>
+ <property name="tch.base-logfile-name" value="tch"/>
+
+ <tch tchHome="${tch.home}"
+ testfile="${test-suite}"
+ fork="true"
+ classpathref="tch.run.classpath"
+ failureproperty="run.failed"
+ dir="${test.home}/controls/test">
+
+ <arg value="-emacs"/>
+ <property name="tch.replication.entry-point" value="ant -f ${controls.test.root}/build.xml run"/>
+ <property name="tch.filter.frequencies" value="${test.freq}"/>
+ <sysproperty key="TEST_HOSTNAME" value="${test.hostname}" />
+ <sysproperty key="TEST_HOSTNAME_PORT" value="${test.hostname.port}" />
+
+ <sysproperty key="gtlf.dtd.use.remote" value="${gtlf.dtd.use.remote}"/>
+ <sysproperty key="gtlf.dtd.remote" value="${gtlf.dtd.remote}"/>
+ <sysproperty key="gtlf.dtd.local" value="${gtlf.dtd.local}"/>
+ </tch>
+
+ <ant antfile="${test.home}/controls/test/infra/tch/runtime/build.xml"
+ target="generate-html-log" dir="${basedir}/">
+ <property name="gtlf.file" value="${basedir}/${tch.base-logfile-name}.xml"/>
+ <property name="output.file" value="${basedir}/${tch.base-logfile-name}.html"/>
+ </ant>
+ </target>
+
+ <!-- =============================================== -->
+ <!-- TCH and Mantis targets for running tests -->
+ <!-- =============================================== -->
+
+ <taskdef name="tch"
+ classname="org.apache.beehive.test.tools.tch.TchVMTask"
+ classpathref="tch.run.classpath"/>
+
+</project>
Modified: incubator/beehive/trunk/controls/test/infra/gtlf/xsl/build.xml
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/controls/test/infra/gtlf/xsl/build.xml?view=diff&r1=154204&r2=154205
==============================================================================
--- incubator/beehive/trunk/controls/test/infra/gtlf/xsl/build.xml (original)
+++ incubator/beehive/trunk/controls/test/infra/gtlf/xsl/build.xml Thu Feb 17 15:43:29 2005
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<project name="test" basedir=".">
- <import file="../../../../../beehive-imports.xml"/>
+ <!--import file="../../../../../beehive-imports.xml"/-->
<property file="../../../common/path.properties"/>
<!-- properties for customizing to diff environment -->
Modified: incubator/beehive/trunk/controls/test/infra/tch/runtime/build.xml
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/controls/test/infra/tch/runtime/build.xml?view=diff&r1=154204&r2=154205
==============================================================================
--- incubator/beehive/trunk/controls/test/infra/tch/runtime/build.xml (original)
+++ incubator/beehive/trunk/controls/test/infra/tch/runtime/build.xml Thu Feb 17 15:43:29 2005
@@ -52,6 +52,7 @@
<echo message="gtlf.file: ${gtlf.file}"/>
<!-- fork Ant because I could not find a more elegant way to get -->
<!-- reportutils.jar onto the classpath -->
+ <property name="beehive.home" value="${test.home}" />
<java classname="org.apache.tools.ant.Main" fork="true">
<classpath>
<pathelement path="${java.class.path}"/>
@@ -72,6 +73,7 @@
<arg value="-f"/>
<arg value="${controls.test.infra.dir}/gtlf/xsl/build.xml"/>
<arg value="test.report"/>
+ <arg value="-Dbeehive.home=${beehive.home}"/>
<arg value="-Dtest.home=${test.home}"/>
<arg value="-emacs"/>
</java>
Modified: 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=diff&r1=154204&r2=154205
==============================================================================
--- incubator/beehive/trunk/test/dist-test/ant/build.xml (original)
+++ incubator/beehive/trunk/test/dist-test/ant/build.xml Thu Feb 17 15:43:29 2005
@@ -20,20 +20,23 @@
<antcall target="clean"/>
<antcall target="prepare.build"/>
- <antcall target="netui.tests"/>
+ <antcall target="netui.tests" />
+ <antcall target="controls.tests" />
+ <!-- antcall target="wsm.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>
+ </target>
- <!-- Controls tests here -->
-
- <!-- WSM tests here -->
-
+ <target name="controls.tests" description="Run controls tests">
+ <!-- controls tests here -->
+ <ant dir="${test.home}/controls/test" antfile="build.xml" inheritAll="false" target="run.tests">
+ <property name="test.home" value="${test.home}"/>
+ </ant>
</target>
<target name="clean" if="build.present" description="Clean webapp">
Modified: incubator/beehive/trunk/test/dist-test/build.xml
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/test/dist-test/build.xml?view=diff&r1=154204&r2=154205
==============================================================================
--- incubator/beehive/trunk/test/dist-test/build.xml (original)
+++ incubator/beehive/trunk/test/dist-test/build.xml Thu Feb 17 15:43:29 2005
@@ -28,6 +28,7 @@
<antcall target = "build.netui.tests"/>
<!-- Build Controls tests here -->
+ <antcall target = "build.controls.tests"/>
<!-- Build JWS tests here -->
@@ -36,8 +37,9 @@
<antcall target="assemble.netui.tests"/>
<!-- Assemble controls tests here -->
+ <antcall target="assemble.controls.tests"/>
- <!-- Assemble controls tests here -->
+ <!-- Assemble wsm tests here -->
<!-- Assemble resources for all tests -->
<copy todir="${test.dist.base.dir}/beehive-test-dist">
@@ -72,8 +74,23 @@
</ant>
</target>
+ <target name="build.controls.tests" description="Build netui tests">
+ <ant dir="${beehive.home}/controls/test/dist-test" antfile="build.xml"
+ target="build.tests">
+ <property name="test.dist.base.dir" value="${test.dist.base.dir}"/>
+ <property name="beehive.home" value="${beehive.home}"/>
+ </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="assemble.controls.tests" description="Assemble the netui tests for the distribution">
+ <ant dir="${beehive.home}/controls/test/dist-test" antfile="build.xml"
target="assemble.tests" inheritAll="false">
<property name="test.dist.base.dir" value="${test.dist.base.dir}"/>
</ant>