diff options
author | Alan McGovern <alan@xamarin.com> | 2013-08-02 19:16:27 +0400 |
---|---|---|
committer | Alan McGovern <alan@xamarin.com> | 2013-08-02 19:18:18 +0400 |
commit | 8f7509b6ba768aa449aa892ca1efef842a87119e (patch) | |
tree | 820d1b2b063dd7c5b8fc9773eeddd42921dc1759 | |
parent | 0c1a73bb565016e2f181a021b7b0a8e6aa708954 (diff) |
The error code of GuiUnit is the number of tests that fail
This should make it easier to detect failures when run from the
commandline
-rw-r--r-- | src/framework/GuiUnit/TestRunner.cs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/framework/GuiUnit/TestRunner.cs b/src/framework/GuiUnit/TestRunner.cs index 8fb9bcb..d82a7ce 100644 --- a/src/framework/GuiUnit/TestRunner.cs +++ b/src/framework/GuiUnit/TestRunner.cs @@ -38,6 +38,7 @@ namespace GuiUnit public class TestRunner : ITestListener { internal static MethodInfo LoadFileMethod; + static int ExitCode = 0; static bool initialized = false; static IMainLoopIntegration mainLoop; @@ -66,7 +67,7 @@ namespace GuiUnit public static int Main (string[] args) { new TestRunner ().Execute (args); - return 0; + return ExitCode; } private CommandLineOptions commandLineOptions; @@ -324,6 +325,7 @@ namespace GuiUnit private void RunTests(ITestFilter filter) { ITestResult result = runner.Run(this, filter); + ExitCode = result.FailCount; new ResultReporter(result, writer).ReportResults(); if (commandLineOptions.ResultFile != null) { |