Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cbi-dev] Mark a build as failed when the compile failed

>I wonder why it still failed since it was set to ignore the test errors. 

see the discussion on

https://bugs.eclipse.org/bugs/show_bug.cgi?id=410685

Jan

From: cbi-dev-bounces@xxxxxxxxxxx [mailto:cbi-dev-bounces@xxxxxxxxxxx] On Behalf Of Samuel Wu
Sent: Montag, 9. Februar 2015 23:00
To: Common-build Developers discussion
Subject: Re: [cbi-dev] Mark a build as failed when the compile failed

Hi Mickael,
Unfortunately when I changed the Fail Mode to At_End, the build failed.
https://hudson.eclipse.org/webtools/job/WTP-R3_7_Integration/310/
https://hudson.eclipse.org/webtools/job/WTP-R3_6_3_Maintenance/160/
It looks that the problem was caused by test.
[ERROR] Failed to execute goal org.eclipse.tycho:tycho-surefire-plugin:0.20.0:test (default-test) on project org.eclipse.jst.server.core.tests: An unexpected error occured (return code 143). See log for details. -> [Help 1]
[ERROR] Failed to execute goal org.eclipse.tycho:tycho-surefire-plugin:0.20.0:test (default-test) on project org.eclipse.wst.wsi.tests: No tests found. -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
[ERROR] 
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn <goals> -rf :org.eclipse.jst.server.core.tests
[DEBUG] Waiting for process to finish
[DEBUG] Result: 1

I wonder why it still failed since it was set to ignore the test errors. Thank you

Best Regards

Samuel Wu
Samuel Wu---02/09/2015 11:04:19 AM---Thank you so much, Mickael, for the suggestion. It looks that WTP build already has  maven.test.erro

From: Samuel Wu/Toronto/IBM@IBMCA
To: Common-build Developers discussion <cbi-dev@xxxxxxxxxxx>
Date: 02/09/2015 11:04 AM
Subject: Re: [cbi-dev] Mark a build as failed when the compile failed
Sent by: cbi-dev-bounces@xxxxxxxxxxx
________________________________________



Thank you so much, Mickael, for the suggestion. It looks that WTP build already has  maven.test.error.ignore=true and maven.test.failure.ignore=true and I think AT_END sounds like a good candidate for us. I've made the change and running a build.

Best Regards

Samuel Wu
Mickael Istria ---02/09/2015 10:41:29 AM---On 02/09/2015 04:29 PM, Samuel Wu wrote: >

From: Mickael Istria <mistria@xxxxxxxxxx>
To: cbi-dev@xxxxxxxxxxx
Date: 02/09/2015 10:41 AM
Subject: Re: [cbi-dev] Mark a build as failed when the compile failed
Sent by: cbi-dev-bounces@xxxxxxxxxxx
________________________________________



On 02/09/2015 04:29 PM, Samuel Wu wrote: 

The WTP build currently keeps going as usual when a compile problem happens and marks the build as a successful one. We need to go to check the log to figure out whether the build fails. I wonder how to change the build to mark it as failed when a compile error happens. 


In the Maven step of your CI job https://hudson.eclipse.org/webtools/job/WTP-R3_7_Integration/configure
In the advanced settings, there is a parameter called "FAIL_MODE", which is set to Never. You should either use NORMAL or AT_END.

Setting FAIL_MODE to Never is contrary to the goal of continuous build: you want to know about failures loudly and ASAP. I suggest you check job configuration history to find out who changed that, and discuss with the author of this change what are the best and worst practices of CI builds ;) 

Due to the historical reason, there are a few JUNIT tests fail during the build. I guess that's the reason the build has been set up this way. I don't think we can clean up the JUNIT tests right now. It would be great if the build can differentiate the test errors and the compile ones and handle them differently.

There are the maven.test.error.ignore=true and maven.test.failure.ignore=true settings to configure the behaviour regarding tests. You should only use this one and restore the FAIL_MODE to a better value.
-- 
Mickael Istria
Eclipse developer at JBoss, by Red Hat
My blog - My Tweets_______________________________________________
cbi-dev mailing list
cbi-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/cbi-dev_______________________________________________
cbi-dev mailing list
cbi-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/cbi-dev


Back to the top