kschrader    01/08/28 21:29:31

  Modified:    .        build.properties build.xml currenttdk.sh
               src      build.xml
               src/share/sample30/build build.properties build.xml
               src/src/test/org/apache/turbine/test TestLoginLogout.java
  Log:
  Modifying the build process to allow for the building and running of tests
  under the new version of Turbine and the TDK.
  
  Revision  Changes    Path
  1.8       +20 -13    jakarta-turbine-tdk/build.properties
  
  Index: build.properties
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine-tdk/build.properties,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- build.properties  2001/08/24 13:25:04     1.7
  +++ build.properties  2001/08/29 04:29:31     1.8
  @@ -1,20 +1,20 @@
   # -------------------------------------------------------------------
   # Properties for building the TDK
   # -------------------------------------------------------------------
  -#tdk.version = 3.0-dev
  -tdk.version = 2.2b1
  +tdk.version = 3.0-dev
  +#tdk.version = 2.2b1
   
   # These will be standardized when Maven is
   # finished, sorry for the inconsistency in naming.
   
  -turbine.home = ../jakarta-turbine-2
  -#turbine.home = ../jakarta-turbine-3
  +#turbine.home = ../jakarta-turbine-2
  +turbine.home = ../jakarta-turbine-3
   torque.home = ../jakarta-turbine-torque
   ant.src.home = ../jakarta-ant
   hypersonic.home = ../hypersonic
   velocity.home = ../jakarta-velocity
  -#flux.home = ../jakarta-turbine-flux
  -flux.home = ../jakarta-turbine-flux-2.1
  +flux.home = ../jakarta-turbine-flux
  +#flux.home = ../jakarta-turbine-flux-2.1
   tomcat.home = ../jakarta-tomcat-4.0
   servletapi.home = ../jakarta-servletapi-4
   site2.home = ../jakarta-site2
  @@ -25,8 +25,8 @@
   tdk.base = ./dist
   tdk.dist = ./dist/tdk-${tdk.version}
   
  -sample.dir = sample
  -#sample.dir = sample30
  +#sample.dir = sample
  +sample.dir = sample30
   
   # -------------------------------------------------------------------
   # J A R S
  @@ -39,21 +39,28 @@
   # -------------------------------------------------------------------
   
   ant.jar = ${lib.repo}/ant.jar
  +commons-cactus.jar = ${lib.repo}/commons-cactus-1.1.jar
  +commons-collections.jar = ${lib.repo}/commons-collections.jar
  +commons-email.jar = ${lib.repo}/commons-email-0.1-dev.jar
  +commons-util.jar = ${lib.repo}/commons-util-0.1-dev.jar
   ecs.jar = ${lib.repo}/ecs-1.4.1.jar
  +fulcrum.jar = ${lib.repo}/fulcrum-1.0.jar
  +httpunit.jar = ${lib.repo}/httpunit-1.2.6.jar
   jaf.jar = ${lib.repo}/activation-1.0.1.jar
   javamail.jar = ${lib.repo}/mail-1.2.jar
   jdbc.jar = ${lib.repo}/jdbc2_0-stdext.jar
   jndi.jar = ${lib.repo}/jndi-1.2.1.jar
   jta.jar = ${lib.repo}/jta1.0.1.jar
  -junit.jar = ${lib.repo}/junit.jar
  +junit.jar = ${lib.repo}/junit-3.7.jar
   log4j.jar = ${lib.repo}/log4j-1.1.jar
   oro.jar = ${lib.repo}/oro.jar
   regexp.jar = ${lib.repo}/jakarta-regexp-1.3-dev.jar
  -#servlet.jar = ${lib.repo}/servlet.jar
  -#torque.jar = ${lib.repo}/torque-1.0.jar
  +servlet.jar = ${lib.repo}/servlet.jar
  +tidy.jar = ${lib.repo}/tidy.jar
  +torque.jar = ${lib.repo}/torque-1.0.jar
   turbine.jar = ${lib.repo}/turbine-${tdk.version}.jar
   velocity.jar = ${lib.repo}/velocity-1.2-dev.jar
  -village.jar = ${lib.repo}/village-1.5.1.jar
  -xalan.jar = ${lib.repo}/xalan-2.0.0.jar
  +village.jar = ${lib.repo}/village-1.5.2.jar
  +xalan.jar = ${lib.repo}/xalan-2.1.0.jar
   xerces.jar = ${lib.repo}/xerces-1.3.0.jar
   xmlrpc.jar = ${lib.repo}/xmlrpc.jar
  
  
  
  1.7       +11 -0     jakarta-turbine-tdk/build.xml
  
  Index: build.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine-tdk/build.xml,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- build.xml 2001/08/22 19:31:17     1.6
  +++ build.xml 2001/08/29 04:29:31     1.7
  @@ -81,6 +81,9 @@
       <copy todir="${tdk.dist}/share/sample">
         <fileset dir="${tdk.src}/share/${sample.dir}"/>
       </copy>
  +    <copy todir="${tdk.dist}/share/sample/src">
  +      <fileset dir="${tdk.src}/src/test"/>
  +    </copy>
   
       <!-- =================================================================== -->
       <!-- T O M C A T                                                         -->
  @@ -146,7 +149,13 @@
       <!-- =================================================================== -->
   
       <copy file="${ant.jar}" todir="${tdk.dist.lib}"/>
  +    <copy file="${commons-cactus.jar}" todir="${tdk.dist.lib}"/>
  +    <copy file="${commons-collections.jar}" todir="${tdk.dist.lib}"/>
  +    <copy file="${commons-email.jar}" todir="${tdk.dist.lib}"/>
  +    <copy file="${commons-util.jar}" todir="${tdk.dist.lib}"/>
       <copy file="${ecs.jar}" todir="${tdk.dist.lib}"/>
  +    <copy file="${fulcrum.jar}" todir="${tdk.dist.lib}"/>
  +    <copy file="${httpunit.jar}" todir="${tdk.dist.lib}"/>
       <copy file="${jaf.jar}" todir="${tdk.dist.lib}"/>
       <copy file="${javamail.jar}" todir="${tdk.dist.lib}"/>
       <copy file="${jdbc.jar}" todir="${tdk.dist.lib}"/>
  @@ -158,6 +167,8 @@
       <!-- use the containers servlet jar
       <copy file="${servlet.jar}" todir="${tdk.dist.lib}"/>
       -->
  +    <copy file="${tidy.jar}" todir="${tdk.dist.lib}"/>
  +    <copy file="${torque.jar}" todir="${tdk.dist.lib}"/>
       <copy file="${turbine.jar}" todir="${tdk.dist.lib}"/>
       <copy file="${velocity.jar}" todir="${tdk.dist.lib}"/>
       <copy file="${village.jar}" todir="${tdk.dist.lib}"/>
  
  
  
  1.6       +13 -3     jakarta-turbine-tdk/currenttdk.sh
  
  Index: currenttdk.sh
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine-tdk/currenttdk.sh,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- currenttdk.sh     2001/08/24 21:34:54     1.5
  +++ currenttdk.sh     2001/08/29 04:29:31     1.6
  @@ -38,9 +38,7 @@
     fi
     cd build
     ./build-regexp.sh clean
  -  ./build-regexp.sh
  -  # Need to figure out a good way to copy
  -  # to lib.repo
  +  ./build-regexp.sh install-jar
   )
   
   # Update ServletApi stuff
  @@ -119,6 +117,7 @@
     if $TDKCVS = "true"
     then cvs up -Pd
     fi
  +  cd build
     ant clean
     ant install-jar
   )
  @@ -258,9 +257,13 @@
     echo --------------------------
     # Get it once to init the servlet
     # leaves behind junk though
  +  # so leave it in useless dir
     cd ./dist/tdk-${VERSION}
     wget http://localhost:8080/newapp/servlet/newapp
     cd ../../
  +  echo -------------------
  +  echo  PERFORMANCE TESTS
  +  echo -------------------
     # ApacheBench the install
     echo --------------------------
     echo  RUNNING APACHE BENCH
  @@ -273,6 +276,13 @@
     date >> ab.results
     echo ----------------------------- >> ab.results
     /usr/sbin/ab -c 25 -n 1000 http://localhost:8080/newapp/servlet/newapp >> 
ab.results
  +  echo   >> ab.results
  +  echo ----------------------------- >> ab.results
  +  echo -------------------
  +  echo  FUNCTIONAL TESTS
  +  echo -------------------
  +  cd ./dist/tdk-${VERSION}/webapps/newapp/WEB-INF/build
  +  ant test
   )
   
   
  
  
  
  1.18      +14 -0     jakarta-turbine-tdk/src/build.xml
  
  Index: build.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine-tdk/src/build.xml,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- build.xml 2001/08/28 21:19:05     1.17
  +++ build.xml 2001/08/29 04:29:31     1.18
  @@ -39,6 +39,7 @@
       <property name="template.path" value="bin/torque/templates"/>
       <property name="output.directory" value="../src"/>
       <property name="schema.directory" value="../conf"/>
  +    <property name="test.directory" value="./src/test"/>
   
       <property name="app.root.templates" value="${app.src}/templates"/>
       <property name="app.root.resources" value="${app.src}/resources"/>
  @@ -66,6 +67,7 @@
       <antcall target="build"/>
       <antcall target="conf"/>
       <antcall target="sample-source"/>
  +    <antcall target="test-source"/>
       <antcall target="turbine-resources"/>
       <antcall target="flux"/>
   
  @@ -160,6 +162,7 @@
       <!-- ================================================================= -->
         
       <mkdir dir="${app.src}/java"/>
  +    <mkdir dir="${app.src}/test"/>
       <mkdir dir="${app.src}/sql"/>
           
     </target>
  @@ -294,6 +297,17 @@
         <fileset dir="${app.root.modules}"/>
       </copy>
     </target>
  +  
  +  <!-- ================================================================= -->
  +  <!-- T E S T  S O U R C E                                              -->
  +  <!-- ================================================================= -->
  +  
  +  <target name="test-source">
  +    <copy todir="${app.src}/test" filtering="yes">
  +      <fileset dir="${test.directory}"/>
  +    </copy>
  +  </target>
  +  
   
     <!-- ================================================================= -->
     <!-- D E P L O Y M E N T  D E S C R I P T O R                          -->
  
  
  
  1.2       +1 -0      jakarta-turbine-tdk/src/share/sample30/build/build.properties
  
  Index: build.properties
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine-tdk/src/share/sample30/build/build.properties,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- build.properties  2001/07/13 20:55:28     1.1
  +++ build.properties  2001/08/29 04:29:31     1.2
  @@ -12,6 +12,7 @@
   version=0.1
   build.dest=../classes
   src.dir=../src/java
  +test.src.dir=../src/test
   conf.dir=../conf
   master.conf.dir=../../../../share/conf
   debug=on
  
  
  
  1.5       +46 -0     jakarta-turbine-tdk/src/share/sample30/build/build.xml
  
  Index: build.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine-tdk/src/share/sample30/build/build.xml,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- build.xml 2001/08/14 16:27:44     1.4
  +++ build.xml 2001/08/29 04:29:31     1.5
  @@ -85,6 +85,8 @@
   
       <antcall target="project"/>
       
  +    <antcall target="compile-tests"/>
  +    
     </target>
   
   
  @@ -461,6 +463,50 @@
       </javac>
     
     </target>
  +  
  +  <!-- =================================================================== -->
  +  <!-- C O M P I L E    T E S T S                                          -->
  +  <!-- =================================================================== -->  
  +  
  +  <target name="compile-tests" description="--> compiles the test code">
  +        
  +    <javac srcdir="${test.src.dir}"
  +      destdir="${build.dest}"
  +      debug="${debug}"
  +      deprecation="${deprecation}"
  +      optimize="${optimize}">
  +            
  +      <classpath refid="classpath"/>
  +
  +    </javac>
  +  
  +  </target>
  +  
  +  <!-- =================================================================== -->
  +  <!-- T E S T                                                             -->
  +  <!-- =================================================================== --> 
  +
  +  <path id="testpath">
  +    <fileset dir="../lib">
  +      <include name="**/*.jar"/>
  +    </fileset>
  +    <fileset dir="../../../../bin">
  +      <include name="**/servlet*.jar"/>
  +    </fileset>
  +    <pathelement path="../classes"/>
  +  </path>
  +
  +  <target name="test" description="--> runs the tests">
  +  
  +    <junit printsummary="yes" >
  +      <formatter type="plain" />
  +      <classpath refid="testpath"/>
  +      <test name="org.apache.turbine.test.TestLoginLogout"/>
  +    </junit>
  +
  +  </target>
  +
  +  
   
     <!-- ================================================================ -->
     <!-- C L E A N                                                        -->
  
  
  
  1.2       +2 -4      
jakarta-turbine-tdk/src/src/test/org/apache/turbine/test/TestLoginLogout.java
  
  Index: TestLoginLogout.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-turbine-tdk/src/src/test/org/apache/turbine/test/TestLoginLogout.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- TestLoginLogout.java      2001/08/28 13:23:08     1.1
  +++ TestLoginLogout.java      2001/08/29 04:29:31     1.2
  @@ -54,17 +54,14 @@
    * <http://www.apache.org/>.
    */
   
  -import junit.framework.*;
  +import junit.framework.TestCase;
   
   import com.meterware.httpunit.WebConversation;
  -import com.meterware.httpunit.WebConversation;
   import com.meterware.httpunit.WebForm;
   import com.meterware.httpunit.WebLink;
   import com.meterware.httpunit.WebResponse;
   import com.meterware.httpunit.WebRequest;
  -import com.meterware.httpunit.WebTable;
   import com.meterware.httpunit.SubmitButton;
  -import com.meterware.httpunit.TableCell;
   import com.meterware.httpunit.GetMethodWebRequest;
   
   import java.io.File;
  @@ -76,6 +73,7 @@
    *
    * @author <a href="mailto:[EMAIL PROTECTED]";>Jerome Verleyen</a>
    * @authod <a href="mailto:[EMAIL PROTECTED]";>Kurt Schrader</a>
  + * @version $Id: TestLoginLogout.java,v 1.2 2001/08/29 04:29:31 kschrader Exp $
    */
   
   public class TestLoginLogout extends TestCase {
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to