You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by bu...@apache.org on 2007/11/17 23:24:54 UTC

DO NOT REPLY [Bug 43892] New: - org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner returns incorrect error code

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=43892>.
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=43892

           Summary: org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRu
                    nner returns incorrect error code
           Product: Ant
           Version: 1.7.0
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: regression
          Priority: P1
         Component: Optional Tasks
        AssignedTo: dev@ant.apache.org
        ReportedBy: bcurnow@gfs.com


I've been trying to upgrade our build system to Ant 1.7.0 and I'm running into a
problem with the JUnit task. I have a very simple test case where I have a
single class (no methods, constants, just a class) and a single test case with a
single test method which simple does a fail(). I've got the JUnit task setup
with haltonerror=true and haltonfailure=false so when running this test I'd
expect my build to succeed. It's not. If I set holdonerror=false then it works.
The core of the issue seems to be that
org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner is returning an
error code of 2 (ERRORS) instead of 1 (FAILURES) which is causing the JUnit task
to treat the failure as an error and fail the build.

I've run my build in debug mode to get the exact command that ant is executing
and replaced the ant-junit.jar with the one from 1.6.2 and the error code (echo
%errorlevel%) is correct so this appears to be a regression with 1.7.0.

I've attached a zip containing my project and ant build script. This is run
against a standard 1.7.0 binary distribution.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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


DO NOT REPLY [Bug 43892] - org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner returns incorrect error code

Posted by bu...@apache.org.
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=43892>.
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=43892





------- Additional Comments From bcurnow@gfs.com  2007-11-17 14:33 -------
I've verified that the test case works fine with Ant 1.6.2 and Ant 1.6.5 with
junit-4.0.jar in the ANT_HOME/lib directory.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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


DO NOT REPLY [Bug 43892] - org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner returns incorrect error code

Posted by bu...@apache.org.
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=43892>.
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=43892


bodewig@apache.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|dev@ant.apache.org          |notifications@ant.apache.org




-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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


DO NOT REPLY [Bug 43892] - org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner returns incorrect error code

Posted by bu...@apache.org.
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=43892>.
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=43892





------- Additional Comments From bcurnow@gfs.com  2007-11-17 14:32 -------
Created an attachment (id=21142)
 --> (http://issues.apache.org/bugzilla/attachment.cgi?id=21142&action=view)
Test case that reproduces the issue


-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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