I've just started using the latest stable release (0.8.01) and I think there is a problem with the NUnit1 task.  It appears to be ignoring the haltonerror and haltonfailure attributes.  I looked at the code in NUnitTask.cs and I think I've found the problem.  The way it is currently coded it throws a BuildException regardless of the value of _haltOnFailure or _haltOnError.
 
The offending code is in NUnitTask.ExecuteTask()
<snip>
            if (_failuresPresent) {
                throw new BuildException("Unit test failed, see build log.", Location);
            }
            if (_errorsPresent) {
                throw new BuildException("Unit test had errors, see build log.", Location);
            }
</snip>
It should be changed to:
<snip>
            if (_failuresPresent && _haltOnFailure) {
                throw new BuildException("Unit test failed, see build log.", Location);
            }
            if (_errorsPresent && _haltOnError) {
                throw new BuildException("Unit test had errors, see build log.", Location);
            }
</snip>
 
Thanks,
 
Andy


Add photos to your e-mail with MSN 8. Get 2 months FREE*. ------------------------------------------------------- This SF.net email is sponsored by:Crypto Challenge is now open! Get cracking and register here for some mind boggling fun and the chance of winning an Apple iPod: http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0031en _______________________________________________ Nant-developers mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/nant-developers

Reply via email to