async public static Task <DebuggeeConfiguration> Execute(TestConfiguration config, string debuggeeName, ITestOutputHelper output)
        {
            IDebuggeeCompiler compiler;

            switch (config.DebuggeeBuildProcess)
            {
            case "prebuilt":
                // Backwards compatibility for the diagnostics test repo
                compiler = new PrebuiltDebuggeeCompiler(config, debuggeeName);
                break;

            case "sdk.prebuilt":
                // The .NET Core SDK layout
                compiler = new SdkPrebuiltDebuggeeCompiler(config, debuggeeName);
                break;

            case "cli":
                // Builds the debuggee with the .NET Core CLI
                compiler = new CliDebuggeeCompiler(config, debuggeeName);
                break;

            default:
                throw new Exception("Invalid DebuggeeBuildProcess configuration value. Expected 'prebuilt', actual \'" + config.DebuggeeBuildProcess + "\'");
            }
            return(await compiler.Execute(output));
        }
Exemple #2
0
        async public static Task <DebuggeeConfiguration> Execute(TestConfiguration config, string debuggeeName, ITestOutputHelper output)
        {
            IDebuggeeCompiler compiler = null;

            if (config.DebuggeeBuildProcess == "prebuilt")
            {
                compiler = new PrebuiltDebuggeeCompiler(config, debuggeeName);
            }
            else if (config.DebuggeeBuildProcess == "cli")
            {
                compiler = new CliDebuggeeCompiler(config, debuggeeName);
            }
            else
            {
                throw new Exception("Invalid DebuggeeBuildProcess configuration value. Expected 'prebuilt', actual \'" + config.DebuggeeBuildProcess + "\'");
            }

            return(await compiler.Execute(output));
        }