costin      01/01/20 12:11:04

  Modified:    src/tests build.xml
               src/tests/share/gtest GTest.java
               src/tests/webpages index.html
               src/tests/webpages/WEB-INF test-tomcat.xml
  Log:
  Few changes to the self-test building.
  
  The Golden files will be part of the .war file ( no need to polute /lib ),
  allow less config headache.
  
  Reverted to the old package name for the (old) GTest - until the improved
  version is ready.
  
  This is work on progress.
  
  Revision  Changes    Path
  1.2       +12 -11    jakarta-tomcat/src/tests/build.xml
  
  Index: build.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat/src/tests/build.xml,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- build.xml 2000/12/29 00:20:28     1.1
  +++ build.xml 2001/01/20 20:11:03     1.2
  @@ -37,37 +37,38 @@
   
     <!-- ==================== Build the internal test app ================== -->
     <target name="sanity-test" >
  -    <mkdir dir="${tomcat.dist}/lib/test"/>
  -    <mkdir dir="${tomcat.dist}/lib/test/Golden"/>
  -    <copy todir="${tomcat.dist}/lib/test/Golden">
  +    <mkdir dir="${tomcat.build}/webapps/test"/>
  +    <!-- the golden files will be part of the webapp - no 
  +         need to have a separate directory or polute lib -->
  +
  +    <mkdir dir="${tomcat.build}/webapps/test/Golden"/>
  +    <copy todir="${tomcat.build}/webapps/test/Golden">
               <fileset dir="src/tests/share/tests/jsp/Golden"/>
       </copy>
   
  -      <!-- Test application -->
  -    <mkdir dir="${tomcat.build}/webapps/test"/>
       <copy 
          todir="${tomcat.build}/webapps/test">
               <fileset dir="src/tests/webpages"/>
       </copy>
  +
       <javac 
           srcdir="src/tests/webpages/WEB-INF/classes" 
           optimize="${optimize}" 
           destdir="${tomcat.build}/webapps/test/WEB-INF/classes" 
           classpath="${tomcat.build}/classes;${servlet22.jar}" />
  +
  +    <!-- build the test driver -->
       <javac 
           srcdir="src/tests/share/gtest" 
           optimize="${optimize}" 
           destdir="${tomcat.build}/webapps/test/WEB-INF/classes" 
           classpath="${tomcat.build}/classes" />
  -    <copy 
  -       todir="${tomcat.dist}/webapps/test">
  -            <fileset dir="${tomcat.build}/webapps/test"/>
  -    </copy>
  +  </target>
   
  +  <target name="test.war" depends="sanity-test" >
       <jar 
         jarfile="${tomcat.dist}/webapps/test.war" 
  -      basedir="${tomcat.dist}/webapps/test" includes="**"/> 
  -    <delete dir="${tomcat.dist}/webapps/test"/>
  +      basedir="${tomcat.build}/webapps/test" includes="**"/> 
     </target>
   
     <!-- ==================== Admin & agreagate ==================== -->
  
  
  
  1.2       +1 -1      jakarta-tomcat/src/tests/share/gtest/GTest.java
  
  Index: GTest.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat/src/tests/share/gtest/GTest.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- GTest.java        2001/01/20 02:35:36     1.1
  +++ GTest.java        2001/01/20 20:11:03     1.2
  @@ -56,7 +56,7 @@
    * [Additional notices, if required by prior licensing conditions]
    *
    */ 
  -package org.apache.tomcat.util.test;
  +package org.apache.tomcat.util.task;
   
   import java.net.*;
   import java.io.*;
  
  
  
  1.3       +62 -8     jakarta-tomcat/src/tests/webpages/index.html
  
  Index: index.html
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat/src/tests/webpages/index.html,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- index.html        1999/11/11 22:09:51     1.2
  +++ index.html        2001/01/20 20:11:03     1.3
  @@ -1,8 +1,62 @@
  -<title>Test Heiarchy Base Page</title>
  -<body bgcolor="#FF0000">
  -<p><font face="Arial, Helvetica, sans-serif"><b><font color="#33FF00">This is 
  -  the home page of the test hierarchy. It doesn't do too much good to look at 
  -  it directly... Instead, why don't you run the tests to find out what you might 
  -  want to know.</font></b></font></p>
  -<p><b><font face="Arial, Helvetica, sans-serif" color="#33FF00">Oh, by the way, 
  -  merry christmas.. :)</font></b></p>
  +<title>Sanity Test Base Page</title>
  +
  +<body>
  +
  +This is the home page of the self test hierarchy. 
  +
  +<h2>Running the tests from the web</h2>
  +
  +You first need to enable the /admin application. You'll need that for other 
  +purposes as well. 
  +
  +<p>Edit TOMCAT_HOME/conf/server.xml  and replace:
  +
  +<br>
  + &lt;Context path="/admin" 
  +          docBase="webapps/admin" 
  +          debug="0" 
  +          reloadable="true" 
  +          <b>trusted="false"</b> &gt;
  +<br>
  +
  +With:
  +
  +<br>
  + &lt; Context path="/admin" 
  +          docBase="webapps/admin" 
  +          debug="0" 
  +          reloadable="true" 
  +          <b>trusted="false"</b> &gt; 
  +<p>
  +
  +You'll also need to edit TOMCAT_HOME/conf/users/admin-users.xml and 
  +change the password ( very important for security reasons ).
  +
  +<p>
  +
  +After that you can just go to 
  +<a href="/admin/test/test.jsp" >/admin/test/test.jsp</a> and you'll see
  +the test results. 
  +
  +<p>You can run only subsets of the tests:
  +<ul>
  +<li>soon, I need to finish test.jsp first to see what param I'll use :-)
  +</ul>
  +
  +<h2>Autmated ( script based ) run</h2>
  +
  +There are 2 ways to run the sanity checks in a nightly or automated way.
  +
  +<p>
  +The easiest is to use a bit of "sed" magic to make /admin "trusted", then
  +start the server and use "wget" or "htget" or any equivalent program 
  +( I'll include a java one soon ) to get the /admin/test/test.jsp page.
  +
  +<p>
  +The alternate solution is to run the scripts provided in 
  +TOMCAT_HOME/webapps/test/WEB-INF/scripts ( instructions will be added soon
  +if anyone asks )
  +
  +
  +
  +</p>
  
  
  
  1.3       +2 -1      jakarta-tomcat/src/tests/webpages/WEB-INF/test-tomcat.xml
  
  Index: test-tomcat.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat/src/tests/webpages/WEB-INF/test-tomcat.xml,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- test-tomcat.xml   2001/01/07 00:24:00     1.2
  +++ test-tomcat.xml   2001/01/20 20:11:04     1.3
  @@ -1,5 +1,6 @@
   <project name="TestRun" default="main">
  -   <!-- To test tomcat standalone, type:
  +   <!-- 
  +        To test tomcat standalone, type:
             bin/tomcat.sh ant -f conf/test-tomcat.xml client
           or for Windows systems, type:
             bin\tomcat.bat ant -f conf/test-tomcat.xml client
  
  
  

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

Reply via email to