Browse Source

JUnit stack traces were missing when filtertrace="on", the default. Reported by N C, see http://marc.info/?l=ant-user&m=126488326902069&w=1 and http://marc.info/?l=ant-dev&m=126491578731948&w=2

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@905136 13f79535-47bb-0310-9956-ffa450edef68
master
Antoine Levy-Lambert 15 years ago
parent
commit
59487f22d5
2 changed files with 6 additions and 0 deletions
  1. +3
    -0
      WHATSNEW
  2. +3
    -0
      src/main/org/apache/tools/ant/taskdefs/optional/junit/JUnitTestRunner.java

+ 3
- 0
WHATSNEW View File

@@ -7,6 +7,9 @@ Changes that could break older environments:
Fixed bugs: Fixed bugs:
----------- -----------


* stack traces were not reported at all by <junit/>
when filtertrace="on", which is the default.

Other changes: Other changes:
-------------- --------------




+ 3
- 0
src/main/org/apache/tools/ant/taskdefs/optional/junit/JUnitTestRunner.java View File

@@ -44,6 +44,7 @@ import junit.framework.TestSuite;
import org.apache.tools.ant.BuildException; import org.apache.tools.ant.BuildException;
import org.apache.tools.ant.Project; import org.apache.tools.ant.Project;
import org.apache.tools.ant.types.Permissions; import org.apache.tools.ant.types.Permissions;
import org.apache.tools.ant.util.FileUtils;
import org.apache.tools.ant.util.StringUtils; import org.apache.tools.ant.util.StringUtils;
import org.apache.tools.ant.util.TeeOutputStream; import org.apache.tools.ant.util.TeeOutputStream;


@@ -898,6 +899,8 @@ public class JUnitTestRunner implements TestListener, JUnitTaskMirror.JUnitTestR
} }
} catch (Exception e) { } catch (Exception e) {
return stack; // return the stack unfiltered return stack; // return the stack unfiltered
} finally {
FileUtils.close(pw);
} }
return sw.toString(); return sw.toString();
} }


Loading…
Cancel
Save