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/03/23 04:52:38 UTC

svn commit: r158724 - incubator/beehive/branches/v1/beta/controls/test/dist-test/common/run-test-build.xml

Author: jsong
Date: Tue Mar 22 19:52:37 2005
New Revision: 158724

URL: http://svn.apache.org/viewcvs?view=rev&rev=158724
Log:
Update controls/test/dist-test/common/run-test-build.xml in v1 beta branch to redirect dist-test report to testResults dir.

Modified:
    incubator/beehive/branches/v1/beta/controls/test/dist-test/common/run-test-build.xml

Modified: incubator/beehive/branches/v1/beta/controls/test/dist-test/common/run-test-build.xml
URL: http://svn.apache.org/viewcvs/incubator/beehive/branches/v1/beta/controls/test/dist-test/common/run-test-build.xml?view=diff&r1=158723&r2=158724
==============================================================================
--- incubator/beehive/branches/v1/beta/controls/test/dist-test/common/run-test-build.xml (original)
+++ incubator/beehive/branches/v1/beta/controls/test/dist-test/common/run-test-build.xml Tue Mar 22 19:52:37 2005
@@ -1,232 +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>
+<?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>
+
+   	<condition property="controls.dir.exist">
+		<available file="${build.dir}/testResults/controls"/>
+   	</condition>
+
+    <!-- ================================================================ -->
+    <!--                                                                  -->
+    <!-- Target to run all checkin/detailed tests                                  -->
+    <!--                                                                  -->
+    <!-- ================================================================ -->
+    <target name="run.tests" depends="make.controls.report.dir" description="Run all tests">
+		<antcall target="checkin.tests"/>
+		<!--It is OK to have failures in detailed.tests. commented out temporarily-->
+    	<!--antcall target="detailed.tests"/-->
+    </target>
+
+	<target name="make.controls.report.dir" unless="controls.dir.exist">
+		<echo message="make.controls.report.dir get called"/>
+		<mkdir dir="${build.dir}/testResults/controls"/>				
+	</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" depends="make.controls.report.dir">
+        <property name="test.freq" value="checkin"/>
+        <delete dir="${build.dir}/testResults/controls/${test.freq}"/>
+        <mkdir dir="${build.dir}/testResults/controls/${test.freq}"/>
+        <echo message="${do.start.tomcat}"/>
+        <antcall target="run.test" />
+    </target>
+
+    <target name="detailed.tests" depends="make.controls.report.dir">
+		<property name="test.freq" value="detailed"/>
+        <delete dir="${build.dir}/testResults/controls/${test.freq}"/>
+        <mkdir dir="${build.dir}/testResults/controls/${test.freq}"/>
+        <antcall target="run.test" />        
+    </target>
+    
+    <target name="run.test">
+	<parallel>
+       	<antcall target="tomcat.start"/>
+		<sequential>
+			<echo message="start a second thread, wait for Tomcat to start."/>
+			<sleep seconds="20"/>
+			<echo message="continue the second thread, deploy controlsTestWeb."/>
+			<ant dir ="./webapps" antfile="build.xml" target="ensure.deployed">
+				<property name="build.dir" value="${basedir}"/>
+			</ant>
+			<echo message="continue the second thread, run junit tests."/>
+			<antcall target="run"/>
+			<echo message="continue the second thread, undeploy controlsTestWeb."/>
+			<ant dir ="./webapps" antfile="build.xml" target="undeploy"/>
+			<echo message="stop tomcat server, finish all the threads."/>
+            <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}/testResults/controls/${test.freq}"/>
+        <!--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}/build/testResults/controls/${test.freq}">
+
+            <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="${build.dir}/testResults/controls/${test.freq}/">
+			<property name="gtlf.file" value="${build.dir}/testResults/controls/${test.freq}/${tch.base-logfile-name}.xml"/>
+			<property name="output.file" value="${build.dir}/testResults/controls/${test.freq}/${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>