[ 
http://jira.codehaus.org/browse/SUREFIRE-686?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=252160#action_252160
 ] 

panxiaobo edited comment on SUREFIRE-686 at 1/20/11 1:31 AM:
-------------------------------------------------------------

hi Kristian Rosenvold,

I tried junit 4.4, 4.6, 4.8.1 and got the same error. 

I tried to add <forkMode>none</forkMode> to the pom.xml, and maven build 
successfully, but the continuum reported FAILED.

After looking into the code, I found that Surefire use a process ExitCode to 
detected the build status, 0 for success, other for fail. 
if forkMode=once, org.apache.maven.surefire.booter.ForkedBooter will call 
System.exit( 0 ); to exit the process. but returnCode = 
CommandLineUtils.executeCommandLine(...) in 
org.apache.maven.plugin.surefire.booterclient.ForkStarter received 128.

I guess the COM change the ExitCode from 0 to 128.





      was (Author: pxb1988):
    hi Kristian Rosenvold,

I tried junit 4.4, 4.6, 4.8.1 and got the same error. 

I tried to add <forkMode>none</forkMode> to the pom.xml, and maven build 
successfully, but the continuum reported FAILED.

After looking into the code, I found that Surefire use a process return code to 
detected the build status, 0 for success, other for fail. 
if forkMode=once, org.apache.maven.surefire.booter.ForkedBooter will call 
System.exit( 0 ); to exit the process. but returnCode = 
CommandLineUtils.executeCommandLine(...) in 
org.apache.maven.plugin.surefire.booterclient.ForkStarter received 128.

I guess the COM i used change the return code from 0 to 128.




  
> maven reported "BUILD FAILURE" even if all tests passed
> -------------------------------------------------------
>
>                 Key: SUREFIRE-686
>                 URL: http://jira.codehaus.org/browse/SUREFIRE-686
>             Project: Maven Surefire
>          Issue Type: Bug
>    Affects Versions: 2.7.1
>         Environment: windows 2003 zh_CN
> jdk 1.5.0_07
> maven 2.2.1, 3.0.1, 3.0.2
>            Reporter: panxiaobo
>         Attachments: build-output-2.7.2.txt, build-output.txt
>
>
> I tried to build a project with maven, the project contains junit test.
> maven reported "BUILD FAILURE" even if all tests passed.
> maven output:
> =============================
> Results :
> Tests run: 9, Failures: 0, Errors: 0, Skipped: 0
> [INFO] 
> ------------------------------------------------------------------------
> [ERROR] BUILD FAILURE
> [INFO] 
> ------------------------------------------------------------------------
> [INFO] There are test failures.
> =============================
> one of the tests is using jacob 1.14.3 to instance a COM, and after deleting 
> the test, maven build successfully.
> more detail output are attached

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to