diff --git a/MatterControlApplication.cs b/MatterControlApplication.cs index c75aaecda..67994822c 100644 --- a/MatterControlApplication.cs +++ b/MatterControlApplication.cs @@ -83,6 +83,10 @@ namespace MatterHackers.MatterControl commandLineArgs.CopyTo(testCommands, 2); } testDispatch.RunTests(testCommands); + if (testDispatch.HadErrors) + { + return; + } } //WriteTestGCodeFile(); diff --git a/Testing/TestingDispatch.cs b/Testing/TestingDispatch.cs index 7111d119a..8d026bd30 100644 --- a/Testing/TestingDispatch.cs +++ b/Testing/TestingDispatch.cs @@ -9,6 +9,9 @@ namespace MatterHackers.MatterControl.Testing { public class TestingDispatch { + bool hadErrors = false; + public bool HadErrors { get { return hadErrors; } } + string errorLogFileName = null; public TestingDispatch() { @@ -32,6 +35,7 @@ namespace MatterHackers.MatterControl.Testing void DumpException(Exception e) { + hadErrors = true; using (StreamWriter w = File.AppendText(errorLogFileName)) { w.WriteLine(e.Message);