|
|
Thread Tools | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
Best way to end a build when you've decided a step should timeout?
I'm a new VBP user and I'm wondering what the best method is to define a timeout for an individual build step and then abort the build.
I'm having trouble with Nunit tests that fail but don't cause Nunit to finish executing and so the build just hangs there waiting for the Nunit process to finish. Joe |
#2
|
|||
|
|||
Hmm, the real fix would be to determine why the NUnit tests are hanging... But, in lieu of that optimal solution, here is a sample build that demonstrates a step timeout strategy. The sample uses Notepad.exe as the "NUnit test" so you'll need to do a little work to adapt it to NUnit...
Note: this sample demonstrates some advanced features of Visual Build Professional and uses WMI. These advanced VBP features include: scripting, Subroutines, Step script events (vbld_StepDone), use of the vbld_FSO script object, script in a conditional build rule, and more... Last edited by kevina; 12-07-2004 at 11:25 AM. |
#3
|
|||
|
|||
I agree that the Nunit test needs to be fixed. I've run into the problem several times and I can't tell if it is the test or the test environment. The tests that cause this usually deal with threads or multiple processes so they are hard to debug.
Since Nunit was hanging, I wasn't even able to easily get the build log and see what the problem was. What are the plans for an Nunit task in future versions? Thanks for the build file. It looks like it will do the trick. Last edited by joes; 12-07-2004 at 01:45 PM. |
|
|