ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Steve Loughran" <>
Subject Re: the 'resultproperty' property of the 'exec' task
Date Thu, 07 Nov 2002 17:39:38 GMT
1. Consider writing an <nunit> wrapper task; I'm sure other people would use

2. set failonerror=true and <exec> fails if the result is non zero.

----- Original Message -----
From: "Dan Corneanu" <>
To: "Ant Users List" <>
Sent: Thursday, November 07, 2002 2:01 AM
Subject: 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">

           <outputproperty name="method" value="html"/>

   <!-- Fail if the tests failed -->
    <!--    ??????????????  -->

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,

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message