|
Martin,
That's
fine if your tasks are simplistic, and you can organise them in that way
(although personally, I don't like the dependency way of doing things anyway, as
I feel they make the scripts harder to read :) . However, many of my tasks have
sections of script, and exec tasks in them (not to mention nested loops :), so
are not so straightforward.
A good
example is an Nunit task. We may run an Nunit test on a single compiled assembly
(using the exec task), but that assembly contains potentially hundreds of tests.
Some of those tests are good, some fail, some only fail when external services
aren't available. In this case, the true/false way of looking at things isn't
perfect for me - I need to be able to analyse the results, so I guarantee that
task will pass by using the failonerror=false in the exec tast. That way, I can
look at all the results and form a summary which is useful (and gets emailed out
as part of a CCNET continuous integration). Using the dependencies method
doesn't provide that granularity (unless I'm missing something somewhere :). The
target that test runs from also works out what's been built, and what can be
tested before actually running the tests in sequence on all the built
assemblies. I suspect this is also the case in checking for warnings / option
explicit as mentioned in the earlier email.
Originally, I had all my tasks in a single dependency list (<target
name="Main" depends="Update,Build,Deploy,Test,Package"/> etc), but this just
wasn't maintainable once the scripts became more complex (IWe checkout, build,
deploy, test and package from Nant).
Hope
that makes sense?
|
Title: Message
