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



Console tool: Abort on build failure?
#1 Posted : Wednesday, September 4, 2019 5:59:58 AM(UTC)
Rank: Advanced Member

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

Thanks: 131 times
Was thanked: 62 time(s) in 60 post(s)
[NCrunch Console Tool v3.20.0.6]
Even if NCrunch bumps into build error the test tasks for other projects continues (and finally returns a Build Failure).
Is there a way to prevent this, i.e. so the build on server fails quickly if it cannot build?
(I have a msbuild step before NCrunch only to fail fast for compile errors, but in this case it compiled fine since it is the path for NCrunch workspace that is too long)


[LocalBuildTask-22] ERROR (Build): Utils.AspNetCore.Common.ExampleWebApi.ApiClienGenTests: C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets (5106): Could not write lines to file "obj\Release\netcoreapp2.0\Utils.AspNetCore.Common.ExampleWebApi.ApiClienGenTests.csproj.FileListAbsolute.txt". Could not find a part of the path 'D:\TeamCity\buildAgent\work\d9e94c7a15ae240c\_Tmp\_NCrunch\WC\3448\8\APIs\Utils\AspNetCore\Common\test\Utils.AspNetCore.Common.ExampleWebApi.ApiClienGenTests\obj\Release\netcoreapp2.0\Utils.AspNetCore.Common.ExampleWebApi.ApiClienGenTests.csproj.FileListAbsolute.txt'.

#2 Posted : Wednesday, September 4, 2019 11:49:34 AM(UTC)
Rank: NCrunch Developer

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

Thanks: 794 times
Was thanked: 1043 time(s) in 993 post(s)
Under the current architecture, the only way I could think of force this kind of behaviour would be to introduce a project dependency from each of your test projects into the unconnected projects that are likely to fail. If the platforms are different, you might be able to work around this by using the Implicit project dependencies setting.

It could be considered abnormal behaviour for NCrunch to stop on the first failure it discovers. The structure of your solution is such that further relevant results could be obtained by continuing the build, so stopping early would seem like a specific requirement that should be declared in advance. By introducing the above project dependencies (physically or virtually through the config), you effectively define your own build sequence and dependency structure and force the build to stop by declaring the error as critical.
1 user thanked Remco for this useful post.
GreenMoose on 9/4/2019(UTC)
Users browsing this topic
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.025 seconds.