83 references to BuildResultUtilities
Microsoft.Build.Engine.UnitTests (83)
BackEnd\BuildRequestEngine_Tests.cs (4)
163result.AddResultsForTarget(target, new TargetResult(new TaskItem[1] { new TaskItem("include", _entry.RequestConfiguration.ProjectFullPath) }, completeSuccess ? BuildResultUtilities.GetSuccessResult() : BuildResultUtilities.GetStopWithErrorResult())); 426result.AddResultsForTarget("requiredTarget1", BuildResultUtilities.GetEmptySucceedingTargetResult()); 491result.AddResultsForTarget("requiredTarget1", BuildResultUtilities.GetEmptySucceedingTargetResult());
BackEnd\BuildRequestEntry_Tests.cs (11)
66requiredResult.AddResultsForTarget("bar", BuildResultUtilities.GetEmptySucceedingTargetResult()); 82result.AddResultsForTarget("foo", BuildResultUtilities.GetEmptySucceedingTargetResult()); 106requiredResult.AddResultsForTarget("bar", BuildResultUtilities.GetEmptySucceedingTargetResult()); 131requiredResult1.AddResultsForTarget("bar", BuildResultUtilities.GetEmptySucceedingTargetResult()); 136requiredResult2.AddResultsForTarget("xor", BuildResultUtilities.GetEmptySucceedingTargetResult()); 166requiredResult1.AddResultsForTarget("bar", BuildResultUtilities.GetEmptySucceedingTargetResult()); 171requiredResult2.AddResultsForTarget("xor", BuildResultUtilities.GetEmptySucceedingTargetResult()); 204requiredResult.AddResultsForTarget("foo", BuildResultUtilities.GetEmptySucceedingTargetResult()); 228requiredResult.AddResultsForTarget("foo", BuildResultUtilities.GetEmptySucceedingTargetResult()); 247requiredResult.AddResultsForTarget("foo", BuildResultUtilities.GetEmptySucceedingTargetResult()); 272requiredResult.AddResultsForTarget("bar", BuildResultUtilities.GetEmptySucceedingTargetResult());
BackEnd\BuildResult_Tests.cs (22)
40result1.ResultsByTarget?.Add("FOO", BuildResultUtilities.GetEmptySucceedingTargetResult()); 45result1.ResultsByTarget?.Add("BAR", BuildResultUtilities.GetEmptySucceedingTargetResult()); 98result.AddResultsForTarget("foo", BuildResultUtilities.GetEmptySucceedingTargetResult()); 104result.AddResultsForTarget("baz", new TargetResult(Array.Empty<TaskItem>(), BuildResultUtilities.GetStopWithErrorResult(new Exception()))); 109result2.AddResultsForTarget("foo", BuildResultUtilities.GetEmptySucceedingTargetResult()); 110result2.AddResultsForTarget("bar", BuildResultUtilities.GetEmptyFailingTargetResult()); 127result.AddResultsForTarget("foo", BuildResultUtilities.GetEmptySucceedingTargetResult()); 128result.AddResultsForTarget("bar", BuildResultUtilities.GetEmptyFailingTargetResult()); 152result.AddResultsForTarget("foo", BuildResultUtilities.GetEmptySucceedingTargetResult()); 164result.AddResultsForTarget(null!, BuildResultUtilities.GetEmptySucceedingTargetResult()); 186result.AddResultsForTarget(null!, BuildResultUtilities.GetEmptySucceedingTargetResult()); 194result.AddResultsForTarget("foo", BuildResultUtilities.GetEmptySucceedingTargetResult()); 197result.AddResultsForTarget("bar", BuildResultUtilities.GetEmptyFailingTargetResult()); 207result4.AddResultsForTarget("xor", BuildResultUtilities.GetEmptySucceedingTargetResult()); 221result.AddResultsForTarget("foo", BuildResultUtilities.GetEmptySucceedingTargetResult()); 234result.AddResultsForTarget("foo", BuildResultUtilities.GetEmptySucceedingTargetResult()); 238result2.AddResultsForTarget("bar", BuildResultUtilities.GetEmptySucceedingTargetResult()); 248result.AddResultsForTarget("foo", BuildResultUtilities.GetEmptySucceedingTargetResult()); 262result.AddResultsForTarget("foo", BuildResultUtilities.GetEmptySucceedingTargetResult()); 281result.AddResultsForTarget("bar", BuildResultUtilities.GetEmptySucceedingTargetResult()); 323result.AddResultsForTarget("alpha", new TargetResult(new TaskItem[] { fooTaskItem }, BuildResultUtilities.GetSuccessResult())); 324result.AddResultsForTarget("omega", new TargetResult(Array.Empty<TaskItem>(), BuildResultUtilities.GetStopWithErrorResult(new ArgumentException("The argument was invalid"))));
BackEnd\CacheAggregator_Tests.cs (1)
14using static Microsoft.Build.Unittest.BuildResultUtilities;
BackEnd\RequestBuilder_Tests.cs (2)
368result.AddResultsForTarget(target.name, BuildResultUtilities.GetEmptyFailingTargetResult()); 393result.AddResultsForTarget(target.name, BuildResultUtilities.GetEmptyFailingTargetResult());
BackEnd\ResultsCache_Tests.cs (20)
37result.AddResultsForTarget("testTarget", BuildResultUtilities.GetEmptyFailingTargetResult()); 51result.AddResultsForTarget("testTarget", BuildResultUtilities.GetEmptyFailingTargetResult()); 56result.AddResultsForTarget("otherTarget", BuildResultUtilities.GetEmptySucceedingTargetResult()); 71result.AddResultsForTarget("result1target1", BuildResultUtilities.GetEmptyFailingTargetResult()); 76result.AddResultsForTarget("result1target2", BuildResultUtilities.GetEmptySucceedingTargetResult()); 80result2.AddResultsForTarget("result2target1", BuildResultUtilities.GetEmptyFailingTargetResult()); 108result.AddResultsForTarget("testTarget", BuildResultUtilities.GetEmptyFailingTargetResult()); 112result2.AddResultsForTarget("testTarget2", BuildResultUtilities.GetEmptySucceedingTargetResult()); 127result.AddResultsForTarget("testTarget", BuildResultUtilities.GetEmptyFailingTargetResult()); 146result.AddResultsForTarget("testTarget", BuildResultUtilities.GetEmptyFailingTargetResult()); 158result.AddResultsForTarget("testTarget", BuildResultUtilities.GetEmptyFailingTargetResult()); 162result2.AddResultsForTarget("testTarget2", BuildResultUtilities.GetEmptySucceedingTargetResult()); 182result.AddResultsForTarget("testTarget", BuildResultUtilities.GetEmptyFailingTargetResult()); 183result.AddResultsForTarget("testTarget2", BuildResultUtilities.GetEmptySucceedingTargetResult()); 234resultForRequestWithNoBuildDataFlags.AddResultsForTarget(targetName, BuildResultUtilities.GetEmptySucceedingTargetResult()); 303resultForRequestWithSubsetFlag1.AddResultsForTarget(targetName, BuildResultUtilities.GetEmptySucceedingTargetResult()); 350result.AddResultsForTarget("testTarget", BuildResultUtilities.GetEmptyFailingTargetResult()); 368br1.AddResultsForTarget("target1", BuildResultUtilities.GetEmptySucceedingTargetResult()); 376br2.AddResultsForTarget("target2", BuildResultUtilities.GetEmptyFailingTargetResult()); 415br2.AddResultsForTarget("target2", BuildResultUtilities.GetEmptyFailingTargetResult());
BackEnd\Scheduler_Tests.cs (12)
126BuildResult result = CacheBuildResult(request, "foo", BuildResultUtilities.GetSuccessResult()); 150BuildResult result = CacheBuildResult(request, "foo", BuildResultUtilities.GetStopWithErrorResult()); 180BuildResult childResult = CacheBuildResult(childRequest, "foo", BuildResultUtilities.GetSuccessResult()); 224BuildResult result2 = CacheBuildResult(request2, "bar", BuildResultUtilities.GetSuccessResult()); 244BuildResult result1 = CacheBuildResult(request1, "foo", BuildResultUtilities.GetSuccessResult()); 247BuildResult result2 = CacheBuildResult(request2, "bar", BuildResultUtilities.GetSuccessResult()); 607CacheBuildResult(br1, "A", BuildResultUtilities.GetSuccessResult(), overrideResultsCache); 612_scheduler.RecordResultToCurrentCacheIfConfigNotInOverrideCache(CreateBuildResult(br2, "B", BuildResultUtilities.GetSuccessResult())); 624BuildResult result1 = CacheBuildResult(request1, "foo", BuildResultUtilities.GetStopWithErrorResult()); 644BuildResult result2 = CacheBuildResult(request2, "bar", BuildResultUtilities.GetStopWithErrorResult()); 663BuildResult result2 = CacheBuildResult(request2, "bar", BuildResultUtilities.GetStopWithErrorResult()); 685BuildResult result = CreateBuildResult(request, "foo", BuildResultUtilities.GetSuccessResult());
BackEnd\TargetResult_Tests.cs (7)
28TargetResult result = new TargetResult(Array.Empty<TaskItem>(), BuildResultUtilities.GetStopWithErrorResult()); 41TargetResult result = new TargetResult(new TaskItem[] { item }, BuildResultUtilities.GetStopWithErrorResult()); 55TargetResult result = new TargetResult(null, BuildResultUtilities.GetStopWithErrorResult()); 65TargetResult result = new TargetResult(new TaskItem[] { item }, BuildResultUtilities.GetStopWithErrorResult(new ArgumentException())); 79TargetResult result = new TargetResult(new TaskItem[] { item }, BuildResultUtilities.GetStopWithErrorResult()); 97BuildResultUtilities.GetStopWithErrorResult(), 118TargetResult result = new TargetResult(new TaskItem[] { item }, BuildResultUtilities.GetStopWithErrorResult(new BuildAbortedException()));
BackEnd\TaskHost_Tests.cs (1)
83buildResult.AddResultsForTarget("Build", new TargetResult(new TaskItem[] { new TaskItem("IamSuper", configuration.ProjectFullPath) }, BuildResultUtilities.GetSkippedResult()));
BuildResultUtilities.cs (3)
17return new TargetResult(Array.Empty<TaskItem>(), BuildResultUtilities.GetStopWithErrorResult()); 22return new TargetResult(Array.Empty<TaskItem>(), BuildResultUtilities.GetSuccessResult()); 27return new TargetResult(new TaskItem[1] { new TaskItem("i", "v") }, BuildResultUtilities.GetSuccessResult());