DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=30333>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=30333

A forked jvm crash/core failure does not generate any xml output

           Summary: A forked jvm crash/core failure does not generate any
                    xml output
           Product: Ant
           Version: 1.6.1
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Optional Tasks
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


Similar to Bug 2499 - "A timeout failure does not generate any xml output".

A simple test to reproduce this problem would be to within a test call
System.exit(256) (or otherwise cause your test to core the jvm).  Ex)


import junit.framework.TestCase;
                                                                                
public class NeatoTest extends TestCase
{
    public void testCrash()
    {
        System.exit(256);
    }
}
                                                                                


****************************************************************************

We have a complicated build.xml here to run our tests, but to reproduce it
should only need:

  <!-- timeout is in milliseconds -->
  <junit timeout="600000" fork="yes" printsummary="yes" haltonfailure="no"
showoutput="${show}" failureproperty="test.failure">

    <formatter type="xml"/>
    <test name="${testSuite}" todir="${reportsDir}" if="testSuite"/>
    <batchtest todir="${reportsDir}" unless="testSuite">
      <fileset dir="${classes.dir}">
        <include name="${testDir2}/*Test.class" if="testDir2"/>
        <!-- Default case to recurse through all dirs in sf -->
        <include name="**/*Test.class" unless="testDir2"/>
      </fileset>
    </batchtest>
  </junit>

  <junitreport todir="${reportsDir}">
    <fileset dir="${reportsDir}">
      <include name="TEST-*.xml"/>
    </fileset>
    <report format="frames" todir="${reportsDir}"/>
  </junitreport>

**************************************************************************

It *seems* that the solution would be something similar to that of Bug 2499, but
I'm unsure how to test for the jvm crash.  A solution would be to after a test
is run (perhaps when the failureproperty is being set), check if the TEST-*.xml
is empty, and if so, fill it with something to say that it failed.  Otherwise
the report can't read it (it's invalid xml) and the report doesn't show that
test as ever being run (and thus that failure is not reported in the HTML).

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to