From: Randy R. <reg...@pr...> - 2004-02-27 15:44:43
|
Our group approached this problem by adding capability to the nant task that allowed a nested nant call to set values for properties that were then available to the calling client. When tests fail for some project, we add the name of the project to the property, which then gets displayed at the end of the build, such as: "Tests failed in projects: x, y." or "Built projects: a, b, c." Randy -----Original Message----- From: nan...@li... [mailto:nan...@li...] On Behalf Of Martin Aliger Sent: Friday, February 27, 2004 9:20 AM To: Nicklas Norling; 'Gert Driesen'; nan...@li... Subject: Re: [nant-dev] 2 small changes to consider Hello > > > 1) Multiple files: Added a project level variable called > > > nant.project.failure, such that a you can allow a task or > > group of tasks > > > to complete regardless of failure using failonerror=false, and > > > then afterwards check the value of nant.project.failure to > > > determine if a failure occurred. Very useful for batch nunit > > > tests, and gathering a report of the tests before checking if a > > > failure occurred > > and throwing a > > > fail. > This points out a gap in nant as I see it. What Jeff has made a patch > for is actually a pretty large gap in functionality in nant. > Controlling the flow using failure detection and also log that neatly > for other tools to pick up (CCNet comes to mind) is challenging to say > the least. Agree. And one global property is not general solution. It is just the flag - it didnt say why it failed, how many tasks failed, etc. The same matter I tried to solve with inter-task communication I presented some time ago. So you could give task failonerror=false and then check resulting "output" from task what is done, what fails etc etc. <trycatch> task is another possibility. Maybe they could exists both and catch block could get "output" from failed task to examine why it fails. Regards, Martin ------------------------------------------------------- SF.Net is sponsored by: Speed Start Your Linux Apps Now. Build and deploy apps & Web services for Linux with a free DVD software kit from IBM. Click Now! http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click _______________________________________________ nant-developers mailing list nan...@li... https://lists.sourceforge.net/lists/listinfo/nant-developers |