Permalink
Browse files

Set ExitCode to 1 on any test failure.

  • Loading branch information...
1 parent 0a16a93 commit bb6620ff0e4695e21882c034a2bb33bcd02a2586 @jgoz jgoz committed Nov 10, 2012
Showing with 14 additions and 1 deletion.
  1. +14 −1 src/ZeroMQ.AcceptanceTests/Program.cs
@@ -1,5 +1,7 @@
namespace ZeroMQ.AcceptanceTests
{
+ using System;
+ using NUnit.Framework.Api;
using NUnitLite.Runner;
/// <summary>
@@ -9,7 +11,18 @@ public class Program
{
public static void Main(string[] args)
{
- new TextUI().Execute(args);
+ new ConsoleRunner().Execute(args);
+ }
+ }
+
+ internal class ConsoleRunner : TextUI, ITestListener
+ {
+ void ITestListener.TestFinished(ITestResult result)
+ {
+ if (result.FailCount > 0)
+ {
+ Environment.ExitCode = 1;
+ }
}
}
}

0 comments on commit bb6620f

Please sign in to comment.