Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

ConsoleTool: Not run tests if build is failing?
GreenMoose
#1 Posted : Tuesday, September 12, 2017 6:10:35 AM(UTC)
Rank: Advanced Member

Groups: Registered
Joined: 6/17/2012(UTC)
Posts: 326

Thanks: 55 times
Was thanked: 36 time(s) in 35 post(s)
[NCrunch Console Tool v3.10.0.6]

Is there a way I can avoid running tests if NCrunch reports compile error?
(I don't want to hold up the build server by running tests if the build is already set to fail. The only workaround I see is to have a separate compile step with msBuild, and avoid calling NCrunch if it fails).

Thanks.
Remco
#2 Posted : Tuesday, September 12, 2017 7:22:43 AM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 4,974

Thanks: 664 times
Was thanked: 781 time(s) in 743 post(s)
There isn't anything in NCrunch that can be configured to do this. The engine will always build what it can, then run tests with whatever assemblies it managed to build.

Having a separate compile step before running NCrunch is one way to do this. An alternative would be to rig something up to capture the output from the NCrunch engine and examine this for build errors, terminating the process if any are detected. This could also be expanded to include test failures if you wanted to truncate the run on other conditions.
GreenMoose
#3 Posted : Tuesday, September 12, 2017 7:57:39 AM(UTC)
Rank: Advanced Member

Groups: Registered
Joined: 6/17/2012(UTC)
Posts: 326

Thanks: 55 times
Was thanked: 36 time(s) in 35 post(s)
Remco;11195 wrote:
An alternative would be to rig something up to capture the output from the NCrunch engine and examine this for build errors, terminating the process if any are detected.


I had this in mind as well bug figured the NCrunch workspace will be left uncleaned, does NCrunch do something smart with workspace/cachefolder leftovers so it cleans them eventually even if I simply kill the process now and then?
Remco
#4 Posted : Tuesday, September 12, 2017 9:54:09 AM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 4,974

Thanks: 664 times
Was thanked: 781 time(s) in 743 post(s)
GreenMoose;11196 wrote:

I had this in mind as well bug figured the NCrunch workspace will be left uncleaned, does NCrunch do something smart with workspace/cachefolder leftovers so it cleans them eventually even if I simply kill the process now and then?


If the process gets killed, the workspaces will be left behind, but they'll be automatically cleaned up by the next run. On initialisation, the engine always checks for orphaned workspaces and will automatically remove them.
1 user thanked Remco for this useful post.
GreenMoose on 9/12/2017(UTC)
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

YAF | YAF © 2003-2011, Yet Another Forum.NET
This page was generated in 0.029 seconds.