diff options
author | Marius Ungureanu <marius.ungureanu@xamarin.com> | 2021-02-26 14:08:37 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-26 14:08:37 +0300 |
commit | ccdbe48e25f3805705615a8b4f5af9ec4370f835 (patch) | |
tree | 17768e07e370247f176bbfd10a15b431e34715ab | |
parent | 40ed270ba75448ebadf3b995e73971cae4d47cba (diff) | |
parent | 0d905e12ee4336a428fe021805c3fb3b0f3c59e6 (diff) |
Merge pull request #21 from mono/dev/therzok/exitcode
Add some more markers where ExitCode should be set to non-zero
-rw-r--r-- | src/framework/GuiUnit/MonoMacMainLoopIntegration.cs | 1 | ||||
-rw-r--r-- | src/framework/GuiUnit/TestRunner.cs | 2 |
2 files changed, 3 insertions, 0 deletions
diff --git a/src/framework/GuiUnit/MonoMacMainLoopIntegration.cs b/src/framework/GuiUnit/MonoMacMainLoopIntegration.cs index 6774694..6ff8100 100644 --- a/src/framework/GuiUnit/MonoMacMainLoopIntegration.cs +++ b/src/framework/GuiUnit/MonoMacMainLoopIntegration.cs @@ -33,6 +33,7 @@ namespace GuiUnit var errPtr = dlerror (); var errStr = (errPtr == IntPtr.Zero)? "<unknown error>" : Marshal.PtrToStringAnsi (errPtr); Console.WriteLine ("WARNING: Cannot load {0}: {1}", dylibPath, errStr); + throw new InvalidOperationException("Unable to initialize Xamarin.Mac"); } var initMethod = Application.GetMethod ("Init", System.Reflection.BindingFlags.Public | System.Reflection.BindingFlags.Static); diff --git a/src/framework/GuiUnit/TestRunner.cs b/src/framework/GuiUnit/TestRunner.cs index 6f3f690..fb8d3a2 100644 --- a/src/framework/GuiUnit/TestRunner.cs +++ b/src/framework/GuiUnit/TestRunner.cs @@ -238,6 +238,7 @@ namespace GuiUnit catch (FileNotFoundException ex) { writer.WriteLine(ex.Message); + ExitCode = 1; } catch (Exception ex) { @@ -272,6 +273,7 @@ namespace GuiUnit BeforeShutdown (null, EventArgs.Empty); } catch (Exception ex) { Console.WriteLine ("Unexpected error during `BeforeShutdown`: {0}", ex); + ExitCode = 1; } finally { MainLoop.Shutdown (); } |