From: <ric...@us...> - 2011-07-25 12:51:22
|
Revision: 5994 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=5994&view=rev Author: ricbrown Date: 2011-07-25 12:51:16 +0000 (Mon, 25 Jul 2011) Log Message: ----------- Separated new failing & new not-failing from test comparison to allow easy failure if new failing tests are added (exception is commented out just now). Modified Paths: -------------- trunk/nhibernate/teamcity.build Modified: trunk/nhibernate/teamcity.build =================================================================== --- trunk/nhibernate/teamcity.build 2011-07-24 12:54:22 UTC (rev 5993) +++ trunk/nhibernate/teamcity.build 2011-07-25 12:51:16 UTC (rev 5994) @@ -232,21 +232,35 @@ if (beforeTestNames.Contains(result.Name)) afterExistingTests.Add(result); - IList<Result> newTests = new List<Result>(); + IList<Result> newFailingTests = new List<Result>(); + IList<Result> newNotFailingTests = new List<Result>(); foreach(Result result in after) if (!beforeTestNames.Contains(result.Name)) - newTests.Add(result); + if (result.Executed && !result.Success) + newFailingTests.Add(result); + else + newNotFailingTests.Add(result); report.AppendLine(); - report.AppendLine("*** Tests new since last recorded results ***"); - if (newTests.Count > 0) + report.AppendLine("*** Tests new (not failing) since last recorded results ***"); + if (newNotFailingTests.Count > 0) { - foreach(Result result in newTests) + foreach(Result result in newNotFailingTests) report.AppendLine(result.ToString()); } else report.AppendLine("None"); + report.AppendLine(); + report.AppendLine("*** Tests new (failed) since last recorded results ***"); + if (newFailingTests.Count > 0) + { + foreach(Result result in newFailingTests) + report.AppendLine(result.ToString()); + } + else + report.AppendLine("None"); + IList<Result> fixedTests = new List<Result>(); foreach(Result afterResult in afterExistingTests) foreach(Result beforeResult in before) @@ -316,6 +330,9 @@ string output = report.ToString(); File.WriteAllText(outputFile, output); + //if (newFailingTests.Count > 0) + // throw new Exception("New tests that fail have been added\n\n" + output); + if (brokenTests.Count > 0) throw new Exception("Previously passing tests have been broken\n\n" + output); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |