public static string CreateDummyRepo(string basePath, string repoName) { var path = Path.Combine(Locations.GitSupportScriptsLocation, "git_create_dummy_repo.rb"); var process = new OSExecuatableTask("ruby", path + " \"" + basePath + "\" " + repoName, "Git create dummy repo",(s, s1, arg3) => new ProcessWrapper(s,s1,arg3 )); process.Perform(new SourceDrop(Directory.GetCurrentDirectory())); return Path.Combine(basePath, repoName); }
protected override void Given() { processWrapper = Substitute.For<IProcessWrapper>(); processWrapper.ProcessTreeCPUUsageId.Returns(""); task = new OSExecuatableTask("fle", "flo", "name", (s, s1, arg3) => processWrapper, periodLengthMs: 1000, quotaNrPeriods: 10); }
protected override void Given() { processWrapper = Substitute.For<IProcessWrapper>(); processWrapper.ProcessTreeCPUUsageId.Returns(info => {throw new InvalidOperationException("process is gone");}); task = new OSExecuatableTask("fle", "flo", "name", (s, s1, arg3) => processWrapper, periodLengthMs: 1000, quotaNrPeriods: 3); }
protected override void Given() { task = new OSExecuatableTask("ruby", "-e 'exit 0'", "task_name", (p1, p2, p3) => new ProcessWrapper(p1, p2, p3)); taskStarted = 0; task.OnTaskStarted += pid => { taskStarted++; this.pid = pid; }; }
public static void CommitChangeFiles(string repo, string fileset, string commitMessage = "wind of change") { var scriptPath = Path.Combine(Locations.GitSupportScriptsLocation, "git_commit_files.rb"); var process = new OSExecuatableTask("ruby", scriptPath + " \"" + repo + "\" \"" + fileset + "/.\" \"" + commitMessage+"\"", "Commit all changes to git", (s, s1, arg3) => new ProcessWrapper(s, s1, arg3)); process.Perform(new SourceDrop(Directory.GetCurrentDirectory())); }