예제 #1
0
        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);
            }
        }
예제 #2
0
        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);
            }
        }
예제 #3
0
파일: Program.cs 프로젝트: wjohnke/CSS18
        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();
        }
예제 #4
0
        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);
        }