Kinook Software Forum

Go Back   Kinook Software Forum > Visual Build Professional > [VBP] Third Party Tools
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 08-26-2008, 07:43 AM
hmoeller hmoeller is online now
Registered User
 
Join Date: 08-15-2008
Posts: 1
Bug in NUnit task

I added an NUnit task to my build project, pointed it to an NUnit project file and selected "net-2.0" as the target framework. In this case, the build project doesn't report a failure on failing unit tests anymore.

The reason is simple. As long as you don't specify a framework, the command line generated looks like this:

Code:
"C:\Program Files\NUnit-Net-2.0 2.2.10\bin\NUnit-console.exe" /nologo nunit.project
Everything works fine here. But as soon as you specify a target framework, the command line is generated in a different way:

Code:
C:\WINDOWS\system32\cmd.exe /C clr net-2.0 nunit-console /nologo nunit.project
Unfotunately, the error code returned by nunit-console is not propagated by clr or doesn't make it through cmd.exe. The exit code in this case is always 0, leading to a passed build step.
Reply With Quote
  #2  
Old 08-26-2008, 08:41 AM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,034
It's actually a bug in NUnit, not VBP. The clr.bat file (needed when specifying a framework version) installed with NUnit does not return the exit code of the test result, but rather the exit code of later commands in the batch file. Extract the attached clr.bat to your NUnit bin path for proper success/failure detection of NUnit tests.
Attached Files
File Type: zip clr.zip (1.2 KB, 1859 views)
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



All times are GMT -5. The time now is 09:32 AM.


Copyright © 1999-2023 Kinook Software, Inc.