private void RunTreeSurgeonAndCheckOK() { //TODO: We are passing in 2005 as the version. Need to test for other versions as they generate different output var TreeSurgeonResult = new ProcessExecutor().Execute(new ProcessInfo(Path.Combine(wd.Name, "TreeSurgeonConsole.exe"), projectName + " 2005", wd.Parent.FullName)); if (TreeSurgeonResult.ExitCode != 0) { Console.WriteLine("TreeSurgeon Console failed"); Console.WriteLine("** Standard out from TreeSurgeon.exe: **"); Console.WriteLine(TreeSurgeonResult.StandardOutput); Console.WriteLine("** End of Standard out from TreeSurgeon.exe: **\n"); Console.WriteLine("Standard err:"); Console.WriteLine(TreeSurgeonResult.StandardError); Assert.Fail("TreeSurgeon console app failed"); } Assert.IsTrue(Directory.Exists(outputPath)); }
private string RunNantAndCheckPasses(string nantArgs) { var nantResult = new ProcessExecutor().Execute(new ProcessInfo("go.bat", nantArgs, outputPath)); var nantOutput = nantResult.StandardOutput; if (nantResult.ExitCode != 0) { Console.WriteLine("Go.bat failed"); Console.WriteLine("** Standard out from go.bat: **"); Console.WriteLine(nantOutput); Console.WriteLine("** End of Standard out from go.bat: **\n"); Console.WriteLine("Standard err:"); Console.WriteLine(nantResult.StandardError); Assert.Fail("Go.bat failed"); } Assert.IsTrue(nantOutput.IndexOf("BUILD SUCCEEDED") > -1); return nantOutput; }