Author: jsong
Date: Tue Mar 15 22:56:08 2005
New Revision: 157711
URL: http://svn.apache.org/viewcvs?view=rev&rev=157711
Log:
Update run-test-build.xml and redirect distributed controls test result to
testResult dir.
Modified:
incubator/beehive/trunk/controls/test/dist-test/common/run-test-build.xml
Modified:
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=diff&r1=157710&r2=157711
==============================================================================
--- incubator/beehive/trunk/controls/test/dist-test/common/run-test-build.xml
(original)
+++ incubator/beehive/trunk/controls/test/dist-test/common/run-test-build.xml
Tue Mar 15 22:56:08 2005
@@ -63,24 +63,26 @@
<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" 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-->
+ <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 -->
@@ -101,38 +103,36 @@
<!-- 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}"/>
+ <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" >
- <antcall target="clean" />
- <!--antcall target="mantis.tch" /-->
- <property name="test.freq" value="detailed"/>
+ <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>
- <echo message="start a new thread to build
controlsWeb"/>
- <antcall target="tomcat.start"/>
+ <antcall target="tomcat.start"/>
<sequential>
- <echo message="continue the new thread, wait for tomcat
to start"/>
+ <echo message="start a second thread, wait for Tomcat
to start."/>
<sleep seconds="20"/>
- <echo message="continue the new thread, deploy
controlsTestWeb"/>
+ <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 new thread, run junit
tests"/>
+ <echo message="continue the second thread, run junit
tests."/>
<antcall target="run"/>
- <echo message="continue the new thread, undeploy
controlsTestWeb"/>
+ <echo message="continue the second thread, undeploy
controlsTestWeb."/>
<ant dir ="./webapps" antfile="build.xml"
target="undeploy"/>
- <echo message="stop tomcat server, finish the new
thread"/>
+ <echo message="stop tomcat server, finish all the
threads."/>
<antcall target="tomcat.stop"/>
</sequential>
</parallel>
@@ -161,7 +161,8 @@
<!-- =========================================================== -->
<target name="clean" >
- <delete dir="${test.logs}"/>
+ <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}"/>
@@ -170,7 +171,7 @@
<delete dir="${derby.data}"/>
<delete file="derby.log"/>
<delete file="velocity.log"/>
- <delete><fileset dir="." includes="tch*.*"/></delete>
+ <delete><fileset dir="." includes="tch*.*"/></delete-->
<!--ant dir="webapps" target="clean"/-->
</target>
@@ -200,7 +201,7 @@
fork="true"
classpathref="tch.run.classpath"
failureproperty="run.failed"
- dir="${test.home}/controls/test">
+ 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"/>
@@ -214,9 +215,9 @@
</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"/>
+ 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>