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

Notification

Icon
Error

Pausing ncrunch from External Build
rlawley
#1 Posted : Friday, July 2, 2021 7:28:59 AM(UTC)
Rank: Member

Groups: Registered
Joined: 4/7/2014(UTC)
Posts: 11
Location: United Kingdom

Thanks: 2 times
Was thanked: 4 time(s) in 4 post(s)
I'm aware that ncrunch pauses execution if the instance of VS it's running inside starts a build task, but I was wondering whether there was any way to force it to pause from an external build? I have a system which uses a number of related solutions, all of which build to a common location to be referenced from. I have a "build everything" script which builds one solution at a time. If any of the solutions are open in Visual Studio, ncrunch notices that the dependencies of the current solution are updated and kicks off another test run, which slows down the main build process.

I'm not sure exactly how anything like this would work - perhaps the presence of a file to indicate build in progress (obviously has potential issues for cancelled builds where any "lock" file doesn't get removed). Perhaps this is something which has already been thought of but I'm just not aware of how it's implemented?
Remco
#2 Posted : Saturday, July 3, 2021 12:58:08 AM(UTC)
Rank: NCrunch Developer

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

Thanks: 931 times
Was thanked: 1257 time(s) in 1170 post(s)
Hi, thanks for posting.

NCrunch monitors for VS builds via an in-process event. We don't have anything in NCrunch that can be used to create the kind of behaviour you are after ... but there may still be a way to get what you want, depending on what your script is doing.

Under normal circumstances, a build of the solution should not trigger NCrunch. This is because NCrunch is only supposed to listen to changes in the projects that would require them to be rebuilt. It may be that your script is making an avoidable file system change that NCrunch is responding to unnecessarily.

Try turning on your 'Log to output window' setting, and set your 'Log Verbosity' to 'Medium'. Keep your NCrunch VS output window open so you can watch the logs, and try running your background build script. NCrunch should report in the log which files it's reacting to. Knowing what is triggering NCrunch may give you opportunities to prevent the triggering entirely.
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.026 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download