Title: Message
I have the following target
 
    <target name="perform-expert-regression-tests" description="Regression test Expert functionality">
        <!-- Run the IL tests and compare -->
        <foreach item="String" in="IC,IL,PI" delim="," property="KB">
            <!-- Everything in xds results needs to be read write -->
            <property name="ovg.commandline" value='-rulebase "\\${expert.server}\${expert.server.output.share}\Prb\${KB}.nrb" -input "xds investigations" -output "xds results" -filter "*.xml" -norecurse -cfh DefcareCustomFunctions.NET.CustomFunctionHandler,DefcareCustomFunctions.NET -outcomeset "${KB}outcomes.xml"' />
            <exec   program="outcomevaluegenerator"
                    commandline="${ovg.commandline}"
                    workingdir="${build.root.dir}\SupportFiles\ExpertRegressionTesting\${KB}" failonerror="true"/>
 
            <exec   program="outcomecomparator"
                    commandline='"${build.root.dir}\SupportFiles\ExpertRegressionTesting\${KB}\Base results" "${build.root.dir}\SupportFiles\ExpertRegressionTesting\${KB}\xds results" -output "outcomes\main.xml" -norecurse'
                    workingdir="${build.root.dir}\SupportFiles\ExpertRegressionTesting\${KB}" failonerror="true"/>
        </foreach>
    </target>
 
Basically i would like to build the command line dynamically depending whether certain files exists.
 
As far as i am aware there is no way of doing string comparisons ? or string manipulation
 
eg
<if test="${KB}=''PI"> or <if fileexists="${build.root.dir}\SupportFiles\ExpertRegressionTesting\${KB}\${KB}outcomes.xml">
    <property name="ovg.commandline" value="${ovg.commandline} -outcomeset "${KB}outcomes.xml"" /> 
<if>
 
At the moment out test harness result generating programs are okay if the file doesn't exist and continue but for how long i can't be sure (I don't have control over them)
 
I'm pretty sure I could do this via cscript but would like to keep it simple and maintainable.
 
If anyone can lead me to the correct path would be most appreciated.
 
Also would be interested if anyone had any pointers on failure handling.
 
I inherited some nant scripts builds about 4 projects but all are related to each other and share some components. 
 
What i want to do is if a certain part of one component in particular fails to build i don't want to fail the build, but i do want to know about it.  All scripts include the same nant error script on-error.build which emails the whole team when something really critical happens.  But what i would like to do is when a certain component fails is just email myself and back out the changes i have pending (auto-code gen and build incrementing). 
All files also include the same build-constants.build which define the error handling conditions and includes the target for error handling for onerror.
 
Is it possible to override the on-error property per build script.
 
Eg if i define a different on-error target in that particular file does it override the global on-error handler and in fact should it.
 
From my testing i don't think it does and i'm not sure of inheritance levels in nant so any clarification would be great.
 
Thanks
 
Daniel
 
 
_________________________________________
Daniel Harrison
Software Engineer
Softlaw Corporation
(02) 6270 3249
_________________________________________
 

Reply via email to