ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 12390] New: - junit-noframes.html generated whithout content when frames report is requested via default.
Date Sat, 07 Sep 2002 14:39:07 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=12390>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=12390

junit-noframes.html generated whithout content when frames report is requested via default.

           Summary: junit-noframes.html generated whithout content when
                    frames report is requested via default.
           Product: Ant
           Version: 1.5
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Optional Tasks
        AssignedTo: ant-dev@jakarta.apache.org
        ReportedBy: ant@kruithof.xs4all.nl


When invoking the junitreport in the following form:
         <junitreport todir="${reportdir}" tofile="${unitreport}">
             <fileset dir="${reportdir}">
                 <include name="TEST-*.xml"/>
             </fileset>
            <report todir="${reportdir}/html/unit"/>
         </junitreport>
an empty file is created named junit-noframes.html
This is because the format is an optional field defaulting to FRAMES. This error
is still present in the current CVS version. The following patch fixes this.

[jkf@user junit]$ cvs diff -u XalanExecutor.java
Index: XalanExecutor.java
===================================================================
RCS file:
/home/cvspublic/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/junit/XalanExecutor.java,v
retrieving revision 1.6
diff -u -r1.6 XalanExecutor.java
--- XalanExecutor.java  15 Aug 2002 10:25:42 -0000      1.6
+++ XalanExecutor.java  7 Sep 2002 14:16:50 -0000
@@ -78,12 +78,15 @@

     /** get the appropriate stream based on the format (frames/noframes) */
     protected OutputStream getOutputStream() throws IOException {
-        if (caller.FRAMES.equals(caller.format)){
+        // martijn@kruithof.xs4all.nl
+        // switch condition as FRAMES is default and therefore
+        // need not be defined while FRAMES is active
+        if (caller.NOFRAMES.equals(caller.format)){
+            return new FileOutputStream(new File(caller.toDir,
"junit-noframes.html"));
+        } else {
             // dummy output for the framed report
             // it's all done by extension...
             return new ByteArrayOutputStream();
-        } else {
-            return new FileOutputStream(new File(caller.toDir,
"junit-noframes.html"));
         }
     }

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


Mime
View raw message