ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From EXT / FOCAL MALAPRADE Roland <ext.focal.malapr...@sncf.fr>
Subject RE: the 'resultproperty' property of the 'exec' task
Date Thu, 07 Nov 2002 09:11:21 GMT
what about...

<condition property="error">
  <not>
    <equals arg1="${exit.prop}" arg2="0" />
  </not>
</condition>

<fail if="error" />

I think that <fail if="" /> only works on Ant 1.4 (1.5?) and above

Roland.

> -----Message d'origine-----
> De : Dan Corneanu [mailto:cdan@savatech.ro]
> Envoyé : jeudi 7 novembre 2002 11:01
> À : Ant Users List
> Objet : the 'resultproperty' property of the 'exec' task
> 
> 
> Hi there,
> 
> here is a simple question: How can I test for the value of 
> the 'resultpropety' of an 'exec' task after the task was executed?
> I have the following sequence in my ant script:
> 
>  <!-- ========================================================== -->
>  <!-- Run the NUnit tests using the nunit-console.exe tool       -->
>  <!-- ========================================================== -->
>  <target name="run.cs.tests" depends="init, compile.cs.tests">
> 
>   <exec executable="nunit-console.exe" failonerror="false" 
> vmlauncher="false" resultproperty="exit.prop">
>         <arg 
> line="/assembly:${cs.src.dir}\${solution.name}\${tests.project
> .name}\bin\Debug\${tests.project.name}.dll"/>
>   </exec>
> 
>    <xslt 
> in="${cs.src.dir}\${solution.name}\${tests.project.name}\bin\D
> ebug\TestResult.xml"
>            out="${build.test.report.dir}\TestResults.html"
>            style="dev/xsl/TestReport_html.xslt">
>            <outputproperty name="method" value="html"/>
>   </xslt>
> 
>    <!-- Fail if the tests failed -->
>     <!--    ??????????????  -->
>  </target>
> 
> So I want to be able to make the build fail only after the 
> results of the tests were rendered in HTML.
> Wouldn't be appropriate to have an ' errorproperty ' like we 
> have at the 'junit' task ?
> 
> Best regards, 
> Dan.
> 

--
To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>


Mime
View raw message