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