async Task CleanProjectAsync(string project_file, string project_platform, string project_configuration, ILog log, ILog mainLog) { // Don't require the desktop resource here, this shouldn't be that resource sensitive using (var xbuild = new Process()) { xbuild.StartInfo.FileName = msbuildPath; var args = new List <string> (); args.Add("--"); args.Add("/verbosity:diagnostic"); if (project_platform != null) { args.Add($"/p:Platform={project_platform}"); } if (project_configuration != null) { args.Add($"/p:Configuration={project_configuration}"); } args.Add(project_file); args.Add("/t:Clean"); xbuild.StartInfo.Arguments = StringUtils.FormatArguments(args); EnviromentManager.SetEnvironmentVariables(xbuild); EventLogger.LogEvent(log, "Cleaning {0} ({1}) - {2}", TestName, Mode, project_file); var timeout = TimeSpan.FromMinutes(1); await ProcessManager.RunAsync(xbuild, log, timeout); log.WriteLine("Clean timed out after {0} seconds.", timeout.TotalSeconds); mainLog.WriteLine("Cleaned {0} ({1})", TestName, Mode); } }
// Use this for initialization void Start() { if (_instance == null) { _instance = this; } }
void Start() { if (Instance == null) { Instance = this; DontDestroyOnLoad(this); } else { Debug.Log("Error: Duplicated " + this + "in the scene"); } }
public async Task <(TestExecutingResult ExecutionResult, (string HumanMessage, string IssueLink)? KnownFailure)> ExecuteAsync(string projectPlatform, string projectConfiguration, string projectFile, IAcquiredResource resource, bool dryRun, ILog buildLog, ILog mainLog) { BuildLog = buildLog; (TestExecutingResult ExecutionResult, (string HumanMessage, string IssueLink)? KnownFailure)result = (TestExecutingResult.NotStarted, ((string HumanMessage, string IssueLink)?)null); var restoreResult = await RestoreNugetsAsync(buildLog, resource); if ((restoreResult & TestExecutingResult.Failed) == TestExecutingResult.Failed) { BuildLog.WriteLine($"Failed to restore nugets: {restoreResult}"); result.ExecutionResult = restoreResult; return(result); } using (var xbuild = new Process()) { xbuild.StartInfo.FileName = msbuildPath(); xbuild.StartInfo.Arguments = StringUtils.FormatArguments(GetToolArguments(projectPlatform, projectConfiguration, projectFile, buildLog)); xbuild.StartInfo.WorkingDirectory = Path.GetDirectoryName(projectFile); EnviromentManager.SetEnvironmentVariables(xbuild); xbuild.StartInfo.EnvironmentVariables ["MSBuildExtensionsPath"] = null; EventLogger.LogEvent(buildLog, "Building {0} ({1})", TestName, Mode); if (!dryRun) { var timeout = TimeSpan.FromMinutes(60); var processResult = await ProcessManager.RunAsync(xbuild, buildLog, timeout); if (processResult.TimedOut) { result.ExecutionResult = TestExecutingResult.TimedOut; buildLog.WriteLine("Build timed out after {0} seconds.", timeout.TotalSeconds); } else if (processResult.Succeeded) { result.ExecutionResult = TestExecutingResult.Succeeded; } else { result.ExecutionResult = TestExecutingResult.Failed; if (errorKnowledgeBase.IsKnownBuildIssue(buildLog, out result.KnownFailure)) { buildLog.WriteLine($"Build has a known failure: '{result.KnownFailure}'"); } } } mainLog.WriteLine("Built {0} ({1})", TestName, Mode); } return(result); }
public static void RunParsed(LaunchOptions options) { EnviromentManager.Init(); EnviromentManager.LaunchOptions = options; if (!options.Silent) { var app = new App(); app.InitializeComponent(); app.Run(); } }
public static void RunParsed() { //CrashReporter #if !DEBUG AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(UnhandledExceptionReport); #endif EnviromentManager.Init(); var app = new App(); app.InitializeComponent(); app.Run(); }
private void Startup() { EnviromentManager.DirectorySetup(); CoursesManager.ImportCourses(); for (int i = 0; i < 13; i++) { GameManager.UserScoreValues.Add(new Hole() { HoleNumber = i }); } //Mainwin_LoadSetup(); }
async Task <TestExecutingResult> RestoreNugetsAsync(string projectPath, ILog log, bool useXIBuild = false) { using (var resource = await ResourceManager.NugetResource.AcquireExclusiveAsync()) { // we do not want to use xibuild on solutions, we will have some failures with Mac Full var isSolution = projectPath.EndsWith(".sln", StringComparison.Ordinal); if (!File.Exists(projectPath)) { throw new FileNotFoundException("Could not find the solution whose nugets to restore.", projectPath); } using (var nuget = new Process()) { nuget.StartInfo.FileName = useXIBuild && !isSolution ? msbuildPath: "/Library/Frameworks/Mono.framework/Versions/Current/Commands/nuget"; var args = new List <string> (); args.Add((useXIBuild && !isSolution ? "/" : "") + "restore"); // diff param depending on the tool args.Add(projectPath); if (useXIBuild && !isSolution) { args.Add("/verbosity:detailed"); } else { args.Add("-verbosity"); args.Add("detailed"); } nuget.StartInfo.Arguments = StringUtils.FormatArguments(args); EnviromentManager.SetEnvironmentVariables(nuget); EventLogger.LogEvent(log, "Restoring nugets for {0} ({1}) on path {2}", TestName, Mode, projectPath); var timeout = TimeSpan.FromMinutes(15); var result = await ProcessManager.RunAsync(nuget, log, timeout); if (result.TimedOut) { log.WriteLine("Nuget restore timed out after {0} seconds.", timeout.TotalSeconds); return(TestExecutingResult.TimedOut); } else if (!result.Succeeded) { return(TestExecutingResult.Failed); } } EventLogger.LogEvent(log, "Restoring nugets completed for {0} ({1}) on path {2}", TestName, Mode, projectPath); return(TestExecutingResult.Succeeded); } }
// Use this for initialization void Start() { if (_instance == null) { _instance = this; } hideEnviromentsOnStart(currentEnviroment); if (fadePanelSamsung.transform.parent.transform.parent.gameObject.active) { fadePanelSamsung.SetActive(true); currentFadePanel = fadePanelSamsung; print("Samsung Panel"); } else { fadePanelGoogle.SetActive(true); currentFadePanel = fadePanelGoogle; print("Google Panel"); } StartCoroutine(doFadeOutPanel(currentEnviroment)); }
void Awake() { instance = this; }
public void activateEnviroment() { enviromentManager = EnviromentManager.getInstance(); enviromentManager.changeCurrentEnviroment(enviroment); }