I have a build file setup where one main body, calls several other
targets acting like functions.  It was setup this way because the
sequence of the events was critical, and the job was specified it had to
run in a single pass.

So my main target looks like this

        <target name="all" depends="" description="runs full test
suite">
                <!-- Run average test -->
                        <call target="cleandatabase"/>
                        <property name="testtype" value="average"/>
                        <call target="jmetertest-average"/>
                        <!-- Call process-traces to parse logdir output
and tag with testtype -->
                        <call target="process-traces"/>

                <!-- Run peak test -->
                        <call target="cleandatabase"/>
                        <property name="testtype" value="peak"/>
                        <call target="jmetertest-peak"/>
                        <!-- Call process-traces to parse logdir output
and tag with testtype -->
                        <call target="process-traces"/>

                <!-- Create trending graphs as both runs are now in
accumulated.data.dir  -->
                        <call target="create-trend-graphs"/>
        </target>

Note the call target to 'process-traces' is called twice and at the end,
'create-trend-graphs' is called.  My question comes from the
dependencies set on those targets.  'process-traces' is defined as

        <target name="process-traces"
depends="check-trends-dir,build-processing-tool,get-svn-revision"
description="Processing of trace from test run">

This runs fine.. but when 'process-traces' is ran the second time for
the peak part of the test, the dependant targets are all ran again.  The
fact they were ran the first time 'process-traces' was called, seems to
be forgotten.

I have the same problem with create-trend-graphs, which has a dependency
set for process-traces (for manual runs outside of the larger test
target).  Even tho process-traces was called twice, when the last <call
target="create-trend-graphs"/> was ran, 'process-traces' would be run
again.

Does dependency tracking not persist across an entire run of nant?  Does
using call target change its behavior?

I've solved the problem for now simply by removing dependancies where
they were causing problems if they ran twice, and ignoring those that
are harmless, but it makes the individual targets less robust.


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
NAnt-users mailing list
NAnt-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nant-users

Reply via email to