ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@apache.org
Subject cvs commit: ant/src/main/org/apache/tools/ant/taskdefs/optional/junit JUnitTask.java
Date Mon, 31 Mar 2003 12:27:14 GMT
bodewig     2003/03/31 04:27:14

  Modified:    .        WHATSNEW
               docs/manual/OptionalTasks junit.html
               src/main/org/apache/tools/ant/taskdefs/optional/junit
                        JUnitTask.java
  Log:
  Add tempdir attribute to <junit> to control placement of temporary file.
  
  PR: 15454
  
  Revision  Changes    Path
  1.382     +3 -0      ant/WHATSNEW
  
  Index: WHATSNEW
  ===================================================================
  RCS file: /home/cvs/ant/WHATSNEW,v
  retrieving revision 1.381
  retrieving revision 1.382
  diff -u -r1.381 -r1.382
  --- WHATSNEW	31 Mar 2003 09:23:57 -0000	1.381
  +++ WHATSNEW	31 Mar 2003 12:27:13 -0000	1.382
  @@ -196,6 +196,9 @@
   * <concat> now supports filtering and can check timestamps before
     overriding a file.  Bugzilla Report 18166.
   
  +* <junit> has a new attribute tempdir that controls the placement of
  +  temporary files.  Bugzilla Report 15454.
  +
   Changes from Ant 1.5.2 to Ant 1.5.3
   ===================================
   
  
  
  
  1.24      +8 -1      ant/docs/manual/OptionalTasks/junit.html
  
  Index: junit.html
  ===================================================================
  RCS file: /home/cvs/ant/docs/manual/OptionalTasks/junit.html,v
  retrieving revision 1.23
  retrieving revision 1.24
  diff -u -r1.23 -r1.24
  --- junit.html	6 Sep 2002 06:16:39 -0000	1.23
  +++ junit.html	31 Mar 2003 12:27:13 -0000	1.24
  @@ -142,6 +142,13 @@
         formatters receive the output.</td>
       <td align="center" valign="top">No</td>
     </tr>
  +  <tr>
  +    <td valign="top">tempdir</td>
  +    <td valign="top">Where Ant should place temporary files.
  +      <em>Since Ant 1.6</em>.</td>
  +    <td align="center" valign="top">No; default is the project's base
  +      directory.</td>
  +  </tr>
   </table>
   
   <p>By using the <code>errorproperty</code> and <code>failureproperty</code>
  @@ -479,7 +486,7 @@
   <code>${reports.tests}</code>.</p>
   
   <hr>
  -<p align="center">Copyright &copy; 2000-2002 Apache Software Foundation. All
rights
  +<p align="center">Copyright &copy; 2000-2003 Apache Software Foundation. All
rights
   Reserved.</p>
   </body>
   </html>
  
  
  
  1.59      +12 -1     ant/src/main/org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.java
  
  Index: JUnitTask.java
  ===================================================================
  RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.java,v
  retrieving revision 1.58
  retrieving revision 1.59
  diff -u -r1.58 -r1.59
  --- JUnitTask.java	7 Mar 2003 11:23:06 -0000	1.58
  +++ JUnitTask.java	31 Mar 2003 12:27:14 -0000	1.59
  @@ -174,6 +174,7 @@
       private Path antRuntimeClasses = null;
   
       private boolean showOutput = false;
  +    private File tmpDir;
   
       /**
        * If true, smartly filter the stack frames of
  @@ -502,6 +503,15 @@
       }
   
       /**
  +     * Where Ant should place temporary files.
  +     *
  +     * @since Ant 1.6
  +     */
  +    public void setTempdir(File tmpDir) {
  +        this.tmpDir = tmpDir;
  +    }
  +
  +    /**
        * Adds the jars or directories containing Ant, this task and
        * JUnit to the classpath - this should make the forked JVM work
        * without having to specify them directly.
  @@ -636,6 +646,7 @@
           // forked test
           File propsFile =
               FileUtils.newFileUtils().createTempFile("junit", ".properties",
  +                                                    tmpDir != null ? tmpDir :
                                                       getProject().getBaseDir());
           cmd.createArgument().setValue("propsfile="
                                         + propsFile.getAbsolutePath());
  
  
  

Mime
View raw message