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 JUnitTestRunner.java
Date Thu, 24 Mar 2005 08:36:40 GMT
bodewig     2005/03/24 00:36:40

  Modified:    .        Tag: ANT_16_BRANCH WHATSNEW
               src/main/org/apache/tools/ant/taskdefs/optional/junit Tag:
                        ANT_16_BRANCH JUnitTask.java JUnitTestRunner.java
  Log:
  merge
  
  Revision  Changes    Path
  No                   revision
  No                   revision
  1.503.2.207 +3 -0      ant/WHATSNEW
  
  Index: WHATSNEW
  ===================================================================
  RCS file: /home/cvs/ant/WHATSNEW,v
  retrieving revision 1.503.2.206
  retrieving revision 1.503.2.207
  diff -u -r1.503.2.206 -r1.503.2.207
  --- WHATSNEW	21 Mar 2005 18:10:22 -0000	1.503.2.206
  +++ WHATSNEW	24 Mar 2005 08:36:40 -0000	1.503.2.207
  @@ -281,6 +281,9 @@
   * <xslt> failed to process file-hierarchies of more than one level if
     scanincludeddirectories was true.  Bugzilla Report 24866.
   
  +* forkmode="perBatch" or "once" would ignore extension attributes that
  +  had been specified for <formatter>s.  Bugzilla Report 32973.
  +
   Changes from Ant 1.6.1 to Ant 1.6.2
   ===================================
   
  
  
  
  No                   revision
  No                   revision
  1.83.2.19 +5 -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.83.2.18
  retrieving revision 1.83.2.19
  diff -u -r1.83.2.18 -r1.83.2.19
  --- JUnitTask.java	9 Mar 2005 18:56:29 -0000	1.83.2.18
  +++ JUnitTask.java	24 Mar 2005 08:36:40 -0000	1.83.2.19
  @@ -1159,7 +1159,11 @@
        */
       protected File getOutput(FormatterElement fe, JUnitTest test) {
           if (fe.getUseFile()) {
  -            String filename = test.getOutfile() + fe.getExtension();
  +            String base = test.getOutfile();
  +            if (base == null) {
  +                base = JUnitTestRunner.IGNORED_FILE_NAME;
  +            }
  +            String filename = base + fe.getExtension();
               File destFile = new File(test.getTodir(), filename);
               String absFilename = destFile.getAbsolutePath();
               return getProject().resolveFile(absFilename);
  
  
  
  1.42.2.9  +16 -0     ant/src/main/org/apache/tools/ant/taskdefs/optional/junit/JUnitTestRunner.java
  
  Index: JUnitTestRunner.java
  ===================================================================
  RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/optional/junit/JUnitTestRunner.java,v
  retrieving revision 1.42.2.8
  retrieving revision 1.42.2.9
  diff -u -r1.42.2.8 -r1.42.2.9
  --- JUnitTestRunner.java	17 Mar 2005 08:13:56 -0000	1.42.2.8
  +++ JUnitTestRunner.java	24 Mar 2005 08:36:40 -0000	1.42.2.9
  @@ -79,6 +79,15 @@
       public static final int ERRORS = 2;
   
       /**
  +     * Used in formatter arguments as a placeholder for the basename
  +     * of the output file (which gets replaced by a test specific
  +     * output file name later).
  +     *
  +     * @since Ant 1.6.3
  +     */
  +    public static final String IGNORED_FILE_NAME = "IGNORETHIS";
  +
  +    /**
        * Holds the registered formatters.
        */
       private Vector formatters = new Vector();
  @@ -594,6 +603,13 @@
               fe.setUseFile(true);
               if (!multipleTests) {
                   fe.setOutfile(new File(line.substring(pos + 1)));
  +            } else {
  +                int fName = line.indexOf(IGNORED_FILE_NAME);
  +                if (fName > -1) {
  +                    fe.setExtension(line
  +                                    .substring(fName
  +                                               + IGNORED_FILE_NAME.length()));
  +                }
               }
           }
           fromCmdLine.addElement(fe);
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message