ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From co...@apache.org
Subject cvs commit: jakarta-ant/src/testcases/org/apache/tools/ant/taskdefs TaskdefsTest.java
Date Mon, 20 Aug 2001 14:03:46 GMT
conor       01/08/20 07:03:46

  Modified:    src/testcases/org/apache/tools/ant/taskdefs Tag:
                        ANT_14_BRANCH TaskdefsTest.java
  Log:
  Store the full log when running tests - useful for debugging tests which
  fail
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.6.2.1   +11 -0     jakarta-ant/src/testcases/org/apache/tools/ant/taskdefs/TaskdefsTest.java
  
  Index: TaskdefsTest.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/testcases/org/apache/tools/ant/taskdefs/TaskdefsTest.java,v
  retrieving revision 1.6
  retrieving revision 1.6.2.1
  diff -u -r1.6 -r1.6.2.1
  --- TaskdefsTest.java	2001/07/25 14:40:54	1.6
  +++ TaskdefsTest.java	2001/08/20 14:03:46	1.6.2.1
  @@ -66,6 +66,7 @@
       protected Project project;
       
       private StringBuffer logBuffer;
  +    private StringBuffer fullLogBuffer;
       private StringBuffer outBuffer;
       private StringBuffer errBuffer;
       private BuildException buildException;
  @@ -78,6 +79,12 @@
           return logBuffer.toString();
       }
   
  +    protected String getFullLog() { 
  +        return fullLogBuffer.toString();
  +    }
  +
  +    
  +
       protected void expectBuildException(String taskname, String cause) { 
           expectSpecificBuildException(taskname, cause, null);
       }
  @@ -136,6 +143,7 @@
       
       protected void configureProject(String filename) { 
           logBuffer = new StringBuffer();
  +        fullLogBuffer = new StringBuffer();
           project = new Project();
           project.init();
           project.setUserProperty( "ant.file" , new File(filename).getAbsolutePath() );
  @@ -156,6 +164,7 @@
               PrintStream err = new PrintStream(new AntOutputStream());
               System.setErr(err);
               logBuffer = new StringBuffer();
  +            fullLogBuffer = new StringBuffer();
               buildException = null;
               project.executeTarget(targetName);
           } finally { 
  @@ -253,6 +262,8 @@
               {
                   logBuffer.append(event.getMessage());
               }
  +            fullLogBuffer.append(event.getMessage());
  +            
           }
       }
   
  
  
  

Mime
View raw message