jakarta-watchdog-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pier...@locus.apache.org
Subject cvs commit: jakarta-watchdog-4.0/src/tools/org/apache/jspxml GetWorkspaceInXML.java
Date Wed, 13 Dec 2000 18:04:03 GMT
pierred     00/12/13 10:04:02

  Modified:    src/bin  watchdog.bat
               src/conf runtest.xml
               src/tools/org/apache/jspxml GetWorkspaceInXML.java
  Log:
  Enable the execution of the "jsp-xml" test suite.
  
  Revision  Changes    Path
  1.5       +10 -1     jakarta-watchdog-4.0/src/bin/watchdog.bat
  
  Index: watchdog.bat
  ===================================================================
  RCS file: /home/cvs/jakarta-watchdog-4.0/src/bin/watchdog.bat,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- watchdog.bat	2000/12/03 00:50:00	1.4
  +++ watchdog.bat	2000/12/13 18:04:01	1.5
  @@ -34,8 +34,17 @@
   
   echo "using classpath=" %CLASSPATH%
   
  +if not "%SUITE%"=="jsp-xml" goto runit
  +if not "%TOMCAT_HOME%" == "" goto gotTomcatHome
  +echo You must set TOMCAT_HOME to point at your TOMCAT-4.0 installation
  +goto end
  +:gotTomcatHome
  +
  +%JAVA_HOME%\bin\java -DJSP_ROOT=%TOMCAT_HOME%\webapps\jsp-tests\jsp -DWATCHDOG_HOME=%WATCHDOG_HOME%
org.apache.jspxml.GetWorkspaceInXML
  +
  +:runit
   rem Execute the Requested Test Suite
  -java org.apache.tools.ant.Main -Dport=%PORT% -Dhost=%HOST% "-Dwatchdog.home=%WATCHDOG_HOME%"
-f "%WATCHDOG_HOME%\conf\runtest.xml" %SUITE%
  +%JAVA_HOME%\bin\java org.apache.tools.ant.Main -Dport=%PORT% -Dhost=%HOST% "-Dwatchdog.home=%WATCHDOG_HOME%"
-f "%WATCHDOG_HOME%\conf\runtest.xml" %SUITE%
   
   rem Restore Environment Variables
   set WATCHDOG_HOME=%_WATCHDOG_HOME%
  
  
  
  1.3       +4 -2      jakarta-watchdog-4.0/src/conf/runtest.xml
  
  Index: runtest.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-watchdog-4.0/src/conf/runtest.xml,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- runtest.xml	2000/12/03 00:29:57	1.2
  +++ runtest.xml	2000/12/13 18:04:02	1.3
  @@ -7,8 +7,10 @@
      </target>
   
      <!-- JSP - XML Syntax Tests -->
  -   <!-- No test executions defined yet -->
  -   <target name="jsp-xml"/>
  +   <target name="jsp-xml">
  +     <ant antfile="${watchdog.home}/conf/jsp-gtest-xml.xml"
  +           target="jsp-test"/>
  +   </target>
   
      <!-- JSP - All JSP Tests -->
      <target name="jsp-all" depends="jsp,jsp-xml"/>
  
  
  
  1.4       +6 -0      jakarta-watchdog-4.0/src/tools/org/apache/jspxml/GetWorkspaceInXML.java
  
  Index: GetWorkspaceInXML.java
  ===================================================================
  RCS file: /home/cvs/jakarta-watchdog-4.0/src/tools/org/apache/jspxml/GetWorkspaceInXML.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- GetWorkspaceInXML.java	2000/11/30 01:20:31	1.3
  +++ GetWorkspaceInXML.java	2000/12/13 18:04:02	1.4
  @@ -14,6 +14,7 @@
   
   public static void main (String[] args )
   {
  +    System.out.println("\n--> Executing getWorkspaceInXML.main()");
    String jsp_file=null;
    String xml_file=null ;
    String jsp_root_dir = System.getProperty("JSP_ROOT");
  @@ -36,6 +37,8 @@
   
   FileLister lister = new FileLister(jsp_root_dir , extension) ;
   Object[] files = lister.listFiles();
  +System.out.println("" + files.length + " files to process in " + 
  +		   jsp_root_dir);
   
   for(int i=0; i< files.length;i++)
   {
  @@ -43,6 +46,7 @@
   int index = jsp_file.lastIndexOf(".jsp");
   
     if(index !=-1)
  +      if (jsp_file.endsWith("XML.jsp")) continue;
       xml_file = jsp_file.substring(0,index) + "XML" + ".jsp" ; 
   
   //it should convert only if the jsp file is newer than the XML file
  @@ -50,6 +54,7 @@
   File file_jsp = new File (jsp_file) ;
   File file_xml = new File (xml_file);
   
  +System.out.println("processing " + jsp_file);
    if ( file_xml.exists()  )  //there was already a conversion
     {
   if( file_xml.lastModified() > file_jsp.lastModified() )
  @@ -58,6 +63,7 @@
   
   //if we are here means we need to convert the jsp file to xml
   
  +System.out.println("*** converting to " + xml_file);
   jsp2XML jsp_converter = new jsp2XML(jsp_file);
   String xml= jsp_converter.ConvertJsp2XML();
   
  
  
  

Mime
View raw message