static void Run(string[] args) { Console.CancelKeyPress += ConsoleCancelKeyPress; var options = new StressTestOptions(); options.Parse(args); if (options.Help) { options.ShowHelp(); return; } bool success = true; app = new StressTestApp(options); try { app.Start(); } catch { success = false; using (var p = Process.Start("/usr/sbin/screencapture", "screenshot-failure.png")) { Console.WriteLine("Taking screenshot at point of failure"); p.WaitForExit(); } throw; } finally { app.Stop(success); } }
static void Run(string[] args) { Console.CancelKeyPress += ConsoleCancelKeyPress; var options = new StressTestOptions(); options.Parse(args); if (options.Help) { options.ShowHelp(); return; } bool success = true; app = new StressTestApp(options); try { app.Start(); } catch { success = false; throw; } finally { app.Stop(success); } }
static void Run(string[] args) { Console.CancelKeyPress += ConsoleCancelKeyPress; var options = new StressTestOptions(); options.Parse(args); if (options.Help) { options.ShowHelp(); return; } app = new StressTestApp(options); app.Start(); app.Stop(); }
public static ITestScenario GetTestScenario() { string mainPath = StressTestApp.GetMonoDevelopMainPath(); string filesRootPath = Path.Combine(mainPath, "external/mono-addins"); var scenario = new TestScenario( Path.Combine(mainPath, "tests/StressTest/TestProject/TestProject.sln"), new [] { Path.Combine(filesRootPath, "Mono.Addins/Mono.Addins/Addin.cs"), Path.Combine(filesRootPath, "Mono.Addins/Mono.Addins.Localization/StringResourceLocalizer.cs"), Path.Combine(filesRootPath, "Mono.Addins/Mono.Addins.Description/AddinDescription.cs"), "Program.cs" } ); scenario.TextToEnter = new [] { "using S", "yst", "em;" }; return(scenario); }