You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ant.apache.org by bo...@apache.org on 2008/04/03 16:01:58 UTC
svn commit: r644320 -
/ant/core/trunk/src/tests/junit/org/apache/tools/ant/taskdefs/optional/junit/JUnitTaskTest.java
Author: bodewig
Date: Thu Apr 3 07:01:58 2008
New Revision: 644320
URL: http://svn.apache.org/viewvc?rev=644320&view=rev
Log:
Try to get more information from test failure in Gump
Modified:
ant/core/trunk/src/tests/junit/org/apache/tools/ant/taskdefs/optional/junit/JUnitTaskTest.java
Modified: ant/core/trunk/src/tests/junit/org/apache/tools/ant/taskdefs/optional/junit/JUnitTaskTest.java
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/tests/junit/org/apache/tools/ant/taskdefs/optional/junit/JUnitTaskTest.java?rev=644320&r1=644319&r2=644320&view=diff
==============================================================================
--- ant/core/trunk/src/tests/junit/org/apache/tools/ant/taskdefs/optional/junit/JUnitTaskTest.java (original)
+++ ant/core/trunk/src/tests/junit/org/apache/tools/ant/taskdefs/optional/junit/JUnitTaskTest.java Thu Apr 3 07:01:58 2008
@@ -22,6 +22,7 @@
import java.io.FileReader;
import java.io.IOException;
+import org.apache.tools.ant.BuildException;
import org.apache.tools.ant.BuildFileTest;
public class JUnitTaskTest extends BuildFileTest {
@@ -99,6 +100,7 @@
// $ ant -f junit.xml failureRecorder.runtest
// But running the JUnit testcase fails in 4th run.
public void testFailureRecorder() {
+ try {
File testDir = new File(getProjectDir(), "out");
File collectorFile = new File(getProjectDir(), "out/FailedTests.java");
@@ -175,6 +177,13 @@
//assertOutputNotContaining("4th run: should not run A.test03", "A.test03");
assertOutputContaining("4th run: should run B.test04", "B.test04");
assertOutputContaining("4th run: should run D.test10", "D.test10");
+ } catch (BuildException be) {
+ be.printStackTrace();
+ System.err.println("nested build's log: " + getLog());
+ System.err.println("nested build's System.out: " + getOutput());
+ System.err.println("nested build's System.err: " + getError());
+ fail("Ant execution failed: " + be.getMessage());
+ }
}