vmassol 01/06/17 06:32:40 Modified: cactus/conf/sample/build/servlet22 build-tests.xml cactus/conf/sample/build/servlet23 build-tests.xml Log: added support for Resin 2.0 Revision Changes Path 1.3 +110 -1 jakarta-commons/cactus/conf/sample/build/servlet22/build-tests.xml Index: build-tests.xml =================================================================== RCS file: /home/cvs/jakarta-commons/cactus/conf/sample/build/servlet22/build-tests.xml,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- build-tests.xml 2001/05/02 15:17:38 1.2 +++ build-tests.xml 2001/06/17 13:32:39 1.3 @@ -21,6 +21,7 @@ <echo message=" Targets for running the tests for Servlet API 2.2 :"/> <echo message=""/> <echo message=" tests_all --> run tests on all servlet engines"/> + <echo message=" tests_resin_20 --> run tests for Resin 2.0"/> <echo message=" tests_resin_12 --> run tests for Resin 1.2"/> <echo message=" tests_tomcat_32 --> run tests for Tomcat 3.2"/> <echo message=" tests_weblogic_51 --> run tests for WebLogic 5.1"/> @@ -35,7 +36,115 @@ ======================================================================== --> <target name="tests_all" - depends="tests_resin_12,tests_tomcat_32,tests_orion_14,tests_weblogic_51"> + depends="tests_resin_20,tests_resin_12,tests_tomcat_32,tests_orion_14,tests_weblogic_51"> + </target> + + <!-- + ======================================================================== + Run Resin 2.0 tests + ======================================================================== + --> + <target name="tests_resin_20" depends="prepare_tests_resin_20" if="resin.home.20"> + + <!-- Start the servlet engine, wait for it to be started, run the + unit tests, stop the servlet engine, wait for it to be stopped. + The servlet engine is stopped if the tests fail for any reason --> + + <runservertests testURL="http://localhost:8080/test" + startTarget="start_resin_20" + stopTarget="stop_resin_20" + testTarget="tests"/> + + </target> + + <!-- + ======================================================================== + Start Resin 2.0 + ======================================================================== + --> + <target name="start_resin_20"> + + <java classname="org.apache.commons.cactus.ant.ResinRun" fork="yes"> + + <arg value="-start"/> + + <arg value="-conf"/> + <arg value="resin.conf"/> + + <!-- Needed so that Resin use the resin.home.20 variable as it's + root directory for resolving file paths --> + <jvmarg value="-Dresin.home=${out.resin20.dir}"/> + + <classpath> + <pathelement location="${cactus.ant.jar}"/> + <fileset dir="${resin.home.20}/lib"> + <include name="*.jar"/> + </fileset> + </classpath> + + </java> + + </target> + + <!-- + ======================================================================== + Stop Resin 2.0 + ======================================================================== + --> + <target name="stop_resin_20"> + + <java classname="org.apache.commons.cactus.ant.ResinRun" fork="yes"> + + <arg value="-stop"/> + + <classpath> + <pathelement location="${cactus.ant.jar}"/> + <fileset dir="${resin.home.20}/lib"> + <include name="*.jar"/> + </fileset> + </classpath> + + </java> + + </target> + + <!-- + ======================================================================== + Display a warning message if the needed servlet engine home property + is not set + ======================================================================== + --> + <target name="check_tests_resin_20" depends="testwar" unless="resin.home.20"> + + <echo message=""/> + <echo message="*********************************************************"/> + <echo message="WARNING : The 'resin.home.20' property has not been set."/> + <echo message=" No test will be run on that servlet engine."/> + <echo message="*********************************************************"/> + <echo message=""/> + + </target> + + <!-- + ======================================================================== + Prepare directories and variables for running the tests + ======================================================================== + --> + <target name="prepare_tests_resin_20" depends="check_tests_resin_20" if="resin.home.20"> + + <echo message="resin.home.20 = ${resin.home.20}"/> + + <property name="out.resin20.dir" value="${out.test.dir}/resin20"/> + <property name="conf.resin20.dir" value="${conf.test.dir}/resin20"/> + + <mkdir dir="${out.resin20.dir}"/> + + <!-- Copy resin configuration files --> + <copy file="${conf.resin20.dir}/resin.conf" tofile="${out.resin20.dir}/resin.conf"/> + + <!-- Create the war file --> + <copy file="${out.test.dir}/test.war" tofile="${out.resin20.dir}/test.war"/> + </target> <!-- 1.3 +110 -1 jakarta-commons/cactus/conf/sample/build/servlet23/build-tests.xml Index: build-tests.xml =================================================================== RCS file: /home/cvs/jakarta-commons/cactus/conf/sample/build/servlet23/build-tests.xml,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- build-tests.xml 2001/05/02 15:17:41 1.2 +++ build-tests.xml 2001/06/17 13:32:39 1.3 @@ -21,6 +21,7 @@ <echo message=" Targets for running the tests for Servlet API 2.3 :"/> <echo message=""/> <echo message=" tests_all --> run tests on all servlet engines"/> + <echo message=" tests_resin_20 --> run tests for Resin 2.0"/> <echo message=" tests_resin_13 --> run tests for Resin 1.3"/> <echo message=" tests_tomcat_40 --> run tests for Tomcat 4.0"/> <echo message=""/> @@ -32,7 +33,115 @@ Run all Cactus tests for Servlet API 2.3 ======================================================================== --> - <target name="tests_all" depends="tests_resin_13,tests_tomcat_40"> + <target name="tests_all" depends="tests_resin_20,tests_resin_13,tests_tomcat_40"> + </target> + + <!-- + ======================================================================== + Run Resin 2.0 tests + ======================================================================== + --> + <target name="tests_resin_20" depends="prepare_tests_resin_20" if="resin.home.20"> + + <!-- Start the servlet engine, wait for it to be started, run the + unit tests, stop the servlet engine, wait for it to be stopped. + The servlet engine is stopped if the tests fail for any reason --> + + <runservertests testURL="http://localhost:8080/test" + startTarget="start_resin_20" + stopTarget="stop_resin_20" + testTarget="tests"/> + + </target> + + <!-- + ======================================================================== + Start Resin 2.0 + ======================================================================== + --> + <target name="start_resin_20"> + + <java classname="org.apache.commons.cactus.ant.ResinRun" fork="yes"> + + <arg value="-start"/> + + <arg value="-conf"/> + <arg value="resin.conf"/> + + <!-- Needed so that Resin use the resin.home.20 variable as it's + root directory for resolving file paths --> + <jvmarg value="-Dresin.home=${out.resin20.dir}"/> + + <classpath> + <pathelement location="${cactus.ant.jar}"/> + <fileset dir="${resin.home.20}/lib"> + <include name="*.jar"/> + </fileset> + </classpath> + + </java> + + </target> + + <!-- + ======================================================================== + Stop Resin 2.0 + ======================================================================== + --> + <target name="stop_resin_20"> + + <java classname="org.apache.commons.cactus.ant.ResinRun" fork="yes"> + + <arg value="-stop"/> + + <classpath> + <pathelement location="${cactus.ant.jar}"/> + <fileset dir="${resin.home.20}/lib"> + <include name="*.jar"/> + </fileset> + </classpath> + + </java> + + </target> + + <!-- + ======================================================================== + Display a warning message if the needed servlet engine home property + is not set + ======================================================================== + --> + <target name="check_tests_resin_20" depends="testwar" unless="resin.home.20"> + + <echo message=""/> + <echo message="*********************************************************"/> + <echo message="WARNING : The 'resin.home.20' property has not been set."/> + <echo message=" No test will be run on that servlet engine."/> + <echo message="*********************************************************"/> + <echo message=""/> + + </target> + + <!-- + ======================================================================== + Prepare directories and variables for running the tests + ======================================================================== + --> + <target name="prepare_tests_resin_20" depends="check_tests_resin_20" if="resin.home.20"> + + <echo message="resin.home.20 = ${resin.home.20}"/> + + <property name="out.resin20.dir" value="${out.test.dir}/resin20"/> + <property name="conf.resin20.dir" value="${conf.test.dir}/resin20"/> + + <mkdir dir="${out.resin20.dir}"/> + + <!-- Copy resin configuration files --> + <copy file="${conf.resin20.dir}/resin.conf" tofile="${out.resin20.dir}/resin.conf"/> + + <!-- Create the war file --> + <copy file="${out.test.dir}/test.war" tofile="${out.resin20.dir}/test.war"/> + </target> <!--