ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 43892] New: - org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner returns incorrect error code
Date Sat, 17 Nov 2007 22:24:54 GMT
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


Mime
View raw message