Speaking of Aaron, I asked him, and he had the following to say about the 
general case.

There is no magic switch or anything like that.  The only thing I can think of 
would be to attach a custom logger (I've got a blog post on that) which listens 
for Error events and BuildFinished events - in the BuildFinished event handler 
it could check the current state of CompilationStatus and TestStatus along with 
whether it had encountered any other type of error during the build and then 
update the CompilationStatus property accordingly (CompilationStatus == Failed 
-> BuildStatus == Failed).

-Aaron

Regarding handling test failures, Grant points to the best way to do it right 
now.  For SP1, we have added a property that you can set in tfsbuild.proj that 
will cause the build to fail if the tests fail.  Watch Aaron's blog for 
description of it.

Buck


From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Steven Nagy
Sent: Thursday, May 08, 2008 1:15 AM
To: [email protected]
Subject: [OzTFS] RE: A few little questions

I thought that was YOU... :)
I also heard you are going to Redmond, congrats!

________________________________
From: [EMAIL PROTECTED] [EMAIL PROTECTED] On Behalf Of Grant Holliday [EMAIL 
PROTECTED]
Sent: Thursday, 8 May 2008 2:23 PM
To: [email protected]
Subject: [OzTFS] RE: A few little questions
Aaron is the Team Build guru - so if that's his best answer, I'd say that 
there's not :)



Regards,

Grant Holliday | Team System 
MVP<https://mvp.support.microsoft.com/profile/Grant.Holliday>
Email: [EMAIL PROTECTED]<mailto:[EMAIL PROTECTED]> | Blog: 
http://ozgrant.com<http://ozgrant.com/> | Mobile: +61 (0)402 414 446

________________________________
From: [EMAIL PROTECTED] [EMAIL PROTECTED] On Behalf Of Steven Nagy [EMAIL 
PROTECTED]
Sent: Thursday, 8 May 2008 2:03 PM
To: [email protected]
Subject: [OzTFS] RE: A few little questions
Hey Grant, thanks for the responses. I'm implementing #2 around your blog post 
now.

In regards to #1, yeah that's the stuff I already knew about (getting and 
setting build properties).
But was just wondering if there was a general switch somewhere that said 'treat 
every error as a fail' rather than errors in non-compile targets only causing 
'partially completed' results.

Cheers!
________________________________
From: [EMAIL PROTECTED] [EMAIL PROTECTED] On Behalf Of Grant Holliday [EMAIL 
PROTECTED]
Sent: Thursday, 8 May 2008 1:41 PM
To: [email protected]
Subject: [OzTFS] RE: A few little questions
And to answer #1, see Aaron Hallberg's blog

How to: Fail a build when tests fail:
http://blogs.msdn.com/aaronhallberg/archive/2007/11/05/how-to-fail-a-build-when-tests-fail.aspx



  <Target Name="AfterTest">



    <!-- Refresh the build properties. -->

    <GetBuildProperties TeamFoundationServerUrl="$(TeamFoundationServerUrl)"

                        BuildUri="$(BuildUri)"

                        Condition=" '$(IsDesktopBuild)' != 'true' ">

      <Output TaskParameter="TestSuccess" PropertyName="TestSuccess" />

    </GetBuildProperties>



    <!-- Set CompilationStatus to Failed if TestSuccess is false. -->

    <SetBuildProperties TeamFoundationServerUrl="$(TeamFoundationServerUrl)"

                        BuildUri="$(BuildUri)"

                        CompilationStatus="Failed"

                        Condition=" '$(IsDesktopBuild)' != 'true' and 
'$(TestSuccess)' != 'true' ">



  </Target>





Regards,

Grant Holliday | Team System 
MVP<https://mvp.support.microsoft.com/profile/Grant.Holliday>
Email: [EMAIL PROTECTED]<mailto:[EMAIL PROTECTED]> | Blog: 
http://ozgrant.com<http://ozgrant.com/> | Mobile: +61 (0)402 414 446

________________________________
From: [EMAIL PROTECTED] [EMAIL PROTECTED] On Behalf Of Steven Nagy [EMAIL 
PROTECTED]
Sent: Thursday, 8 May 2008 11:32 AM
To: [email protected]
Subject: [OzTFS] A few little questions
Heyas,

As usual, I am the biggest spammer of questions on this list. :)
Hope you guys don't mind too much.
Here's a couple of (hopefully) easy questions:

1) We don't want 'Partially Succeeded'. For us, this is a fail.
I have found some resources around getting build properties out and setting 
them, but before I implement it, just wondering if there is a quick easy switch 
somewhere? (maybe a secret var that I can just set to true or something)

2) Has anyone introduced Sandcastle into their builds? I need to find a way to 
tell my 'SolutionToBuild' entries to output a comments.xml doc (command line is 
CSC /doc:Comments.xml). How would this work in the ItemGroup? What about 
multiple items in the group that all specify the same comments.xml? Will the 
comments append, or overwrite as it builds each one? Or do I really need a 
seperate comments.xml per assembly, and then call sandcastle against each?

Cheers,
Steve

______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email
______________________________________________________________________
OzTFS.com - to unsubscribe from this list, send a message back to the list with 
'unsubscribe' as the subject. View the web archives at 
http://www.mail-archive.com/[email protected]/
Powered by mailenable.com, supported by www.readify.net

______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email
______________________________________________________________________
OzTFS.com - to unsubscribe from this list, send a message back to the list with 
'unsubscribe' as the subject. View the web archives at 
http://www.mail-archive.com/[email protected]/
Powered by mailenable.com, supported by www.readify.net

______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email
______________________________________________________________________
OzTFS.com - to unsubscribe from this list, send a message back to the list with 
'unsubscribe' as the subject. View the web archives at 
http://www.mail-archive.com/[email protected]/
Powered by mailenable.com, supported by www.readify.net

______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email
______________________________________________________________________
OzTFS.com - to unsubscribe from this list, send a message back to the list with 
'unsubscribe' as the subject. View the web archives at 
http://www.mail-archive.com/[email protected]/
Powered by mailenable.com, supported by www.readify.net

______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email
______________________________________________________________________
OzTFS.com - to unsubscribe from this list, send a message back to the list with 
'unsubscribe' as the subject. View the web archives at 
http://www.mail-archive.com/[email protected]/
Powered by mailenable.com, supported by www.readify.net



OzTFS.com - to unsubscribe from this list, send a message back to the list with 
'unsubscribe' as the subject. View the web archives at 
http://www.mail-archive.com/[email protected]/

Powered by mailenable.com, supported by www.readify.net

Reply via email to