From 6362427b085c8b677409bc376b4805e8e50fbe8c Mon Sep 17 00:00:00 2001 From: Stefan Bodewig Date: Thu, 30 Sep 2004 09:55:03 +0000 Subject: [PATCH] Improved BWC, not that good, though git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@276901 13f79535-47bb-0310-9956-ffa450edef68 --- .../taskdefs/optional/junit/JUnitTask.java | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.java b/src/main/org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.java index 41fac1b75..22b73d379 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.java @@ -1474,7 +1474,22 @@ public class JUnitTask extends Task { * * @since Ant 1.6.2 */ - protected void actOnTestResult(TestResultHolder result,JUnitTest test, + protected void actOnTestResult(int exitValue, boolean wasKilled, + JUnitTest test, String name) { + TestResult t = new TestResult(); + t.exitValue = exitValue; + t.wasKilled = wasKilled; + actOnTestResult(t, test, name); + } + + /** + * Logs information about failed tests, potentially stops + * processing (by throwing a BuildException) if a failure/error + * occured or sets a property. + * + * @since Ant 1.7 + */ + protected void actOnTestResult(TestResultHolder result, JUnitTest test, String name) { // if there is an error/failure and that it should halt, stop // everything otherwise just log a statement @@ -1503,7 +1518,7 @@ public class JUnitTask extends Task { } } - private class TestResultHolder { + protected class TestResultHolder { public int exitCode = JUnitTestRunner.ERRORS; public boolean timedOut = false; public boolean crashed = false;