Hi, Gary.... Yes, I have used the "driver"/"worker" task pair in different contexts. E.g, I've split a task to simplify what otherwise might be a rather convoluted "If".
There are a couple of situations I want to avoid. The easier one is to be able to just look at the flow, and not "parse out" all the usual "processing messages". I've tried using "global" properties, e.g., to control verbose, but its not the cleanest way to go. The other situation is where I don't have a complete environment available, or I'm trying to assess task flow. Both of these conditions are presently true right now as I'm starting up a BizTalk Build/Deploy autoamtion project. Yes, I have found lots of sample code. Now I want to get an idea of how it all fits together, so I can begin to sort out what I can "adapt" (use/configure/change), and what I might have to add. I'm waiting and waiting for the support guys to get my VMWare Build/Deploy "development" environmetns up, and trying to do something profitable in the mean time. For now, I will probably do something like: <task name="MyTask" > ...task housekeeping... <if test="${build.traceonly}" > <echo message="Kilroy was here: ${target::get-current-target()}"/> <if/> <if test="not ${build.traceonly}" > <call target="MyTask.DoIt" /> <if/> <task/> <task name="MyTask.DoIt" > .... <task/> -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Gary Feldman Sent: Tuesday, March 28, 2006 9:46 PM To: nant-users@lists.sourceforge.net Subject: Re: [NAnt-users] Exiting a Task 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 ------------------------------------------------------- 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&kid0944&bid$1720&dat1642 _______________________________________________ NAnt-users mailing list NAnt-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nant-users