Rod Ayers wrote:

I have tried those alternatives.  What I had in mind, but didn't elaborate, is running the script 
"as if it was really going to do some work", but only get messages saying "Kilroy 
was here....".  An approach for automation development/testing.  That's why I would want to do 
something like:

<if test=${log.test.only}>  ("true")
<echo message="Kilroy was here:  ${target::get-current-target()}"/>
<how_do_i_get_out_of_here/>
</if>

It's a way to check flow with out running stuff that isn't completed, or that 
you do not want actually build/deploying.
It sounds like you want something analogous to the -n option of make. I know there have been times when I wanted that. Perhaps that's something that can be put on the list for post 0.85.

You might be able to fake it by dividing your targets into two types: those that manage control flow, and those that do work. Then you can either put flags on the latter to prevent them from doing anything, or put them into an include file, and have a parallel include file for just tracing. Another possibility would be to use xslt to create a derived build file with all the action tasks disabled, keeping just the <echo> and control structures. None of these ideas are particularly satisfactory, since they involve a fair bit of tedious work and intrude upon the clarity of the build script, but they might get you by for a while.

Personally, I just test by using a scratch area. I don't do anything with NAnt beyond its own build tree (e.g., I don't currently use NAnt to tag builds, checkin files, or make any other changes that would affect other developers). So the only harm in letting things run fully is the extra time it takes to test. I handle that by keeping targets small, and testing in small chunks. I don't know if the Ant community has developed any better approaches, but I think that a really good system for testing NAnt build scripts is some time away.

Gary



-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
NAnt-users mailing list
NAnt-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nant-users

Reply via email to