Hello, nant-developers,
 
I am in doubt.
I have a target:

  <target name="tests">
    <echo message="Running nunit2 task" />
    <!-- //TODO: find a way to run all tests with global fail -->
    <nunit2 haltonfailure="${ nunit2.haltonfailure}" failonerror="${nunit2.failonerror}">
      <formatter type="Xml" usefile="true" extension=".xml" outputdir="${this.branchPath}${this.testsDir }Results" />
      <formatter type="Plain" usefile="false" />
      <test haltonfailure="${test.haltonfailure}">
        <assemblies refid="test.assemblies " />
      </test>
    </nunit2>
  </target>

There are 3 assemblies in the test.assemlies refid.
The 1st is green, other two are red.

I want to run all the test assemblies in the refid without halt on first fail
 and have the target failed if at least one test assembly is red.
I have tried all possible combinations of documented attributes.
(see http://nant.sourceforge.net/release/latest/help/tasks/nunit2.html )
The result I need naturally would be the 2nd combination line.

-----------------------------------------------------------------------------------------------------------------------------------------------------│
${test.haltfailure}│ ${ nunit2.haltonfailure}│${nunit2.failonerror}││halts on first fail│target result                                                │
-------------------+------------------------+---------------------++-------------------+-------------------------------------------------------------│
false              │ false                  │ false               ││ false             │SUCCEEDED                                                    │
false              │ false                  │ true                ││ false (naturally) │SUCCEEDED (!!! naturally expected FAILED with 2 error(s) !!!)│
false              │ true                   │ false               ││ true              │SUCCEEDED - 1 non-fatal error(s), 0 warning(s)               │
false              │ true                   │ true                ││ true              │FAILED                                                       │
-------------------+------------------------+---------------------++-------------------+-------------------------------------------------------------│
true               │ false                  │ false               ││ true              │SUCCEEDED - 1 non-fatal error(s), 0 warning(s)               │
true               │ false                  │ true                ││ true              │FAILED                                                       │
true               │ true                   │ false               ││ true              │SUCCEEDED - 1 non-fatal error(s), 0 warning(s)               │
true               │ true                   │ true                ││ true              │FAILED                                                       │
-------------------L------------------------L---------------------LL-------------------L-------------------------------------------------------------│

How can I achieve the goal?
Is this an issue or a bug or am I a stupid?
Is there a documented way a hack or workaround?

I have tried this on the following versions:
---------------------------------------------
NAnt 0.85 (Build 0.85.1932.0; rc3; 4/16/2005)
NAnt 0.85 (Build 0.85.2478.0; release; 10/14/2006)
---------------------------------------------

-------------
Best regards,

Alexey 0 Moudrick
=================

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
nant-developers mailing list
nant-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nant-developers

Reply via email to