5 instantiations of Cause
SelectTests (5)
TestSelector.cs (5)
203
AddCause(testCauses, project, new
Cause
(CauseKind.Convention, file));
215
new
Cause
(CauseKind.PathRule, file, rule.Reason));
264
AddCause(testCauses, project, new
Cause
(CauseKind.Layer1Graph, project, Path: path));
291
new
Cause
(CauseKind.AffectedProject, matchedProject, rule.Reason));
422
new
Cause
(CauseKind.DerivedFromTest, triggeringTest, derived.Reason));
51 references to Cause
Infrastructure.Tests (6)
TestTriggerMap\SelectTestsAcceptanceTests.cs (6)
498
var
cause = Assert.Single(r.TestCauses["InstallerTests"]);
508
var
cause = Assert.Single(r.TestCauses["Foo.Tests"]);
518
var
cause = Assert.Single(r.TestCauses["Layer1Only"]);
541
var
cause = Assert.Single(r.TestCauses["Layer1Only"]);
554
var
cause = Assert.Single(r.JobCauses["job:projjob"]);
567
var
cause = Assert.Single(r.JobCauses["job:cli-starter"]);
SelectTests (45)
Program.cs (14)
673
static JsonArray ItemsWithCauses(IReadOnlySet<string> items, IReadOnlyDictionary<string, IReadOnlyList<
Cause
>> causes)
681
foreach (
var
cause in list.OrderBy(c => CausePriority(c.Kind)))
830
var groups = new Dictionary<string, Dictionary<string,
Cause
>>(StringComparer.Ordinal);
838
foreach (
var
cause in causes)
843
members = new Dictionary<string,
Cause
>(StringComparer.Ordinal);
849
if (!members.TryGetValue(project, out
var
existing) || CausePriority(cause.Kind) < CausePriority(existing.Kind))
936
private static string MemberWithHops(KeyValuePair<string,
Cause
> member)
954
private static string CauseGroupKey(
Cause
cause) => cause.Kind switch
1020
private static string JobCausesText(IReadOnlyDictionary<string, IReadOnlyList<
Cause
>> causes, string key)
1200
IReadOnlyDictionary<string, IReadOnlyList<
Cause
>> causes)
1209
foreach (
var
cause in list.OrderBy(c => CausePriority(c.Kind)))
1267
private static string ShortCause(
Cause
cause) => cause.Kind switch
1284
private static string Layer1ShortCause(
Cause
cause)
1298
private static string VerboseCause(
Cause
cause)
TestSelector.cs (31)
29
/// <summary>A changed file matched a <c>conventions</c> capture pattern (<see cref="
Cause
.Trigger"/> is the file).</summary>
32
/// <summary>A changed file matched a <c>path_rules</c> glob (<see cref="
Cause
.Trigger"/> is the file; <see cref="
Cause
.Reason"/> is the rule's <c>reason</c>).</summary>
35
/// <summary>An affected production/non-test project matched an <c>affected_project_rules</c> glob (<see cref="
Cause
.Trigger"/> is the project name).</summary>
38
/// <summary>The Layer 1 MSBuild graph marked this test project affected by a changed source file (<see cref="
Cause
.Trigger"/> is the project name).</summary>
41
/// <summary>A selected test project pulled this in via <c>derived_targets</c> (<see cref="
Cause
.Trigger"/> is the triggering test project).</summary>
96
IReadOnlyDictionary<string, IReadOnlyList<
Cause
>> TestCauses,
97
IReadOnlyDictionary<string, IReadOnlyList<
Cause
>> JobCauses);
170
var testCauses = new Dictionary<string, List<
Cause
>>(StringComparer.Ordinal);
171
var jobCauses = new Dictionary<string, List<
Cause
>>(StringComparer.Ordinal);
172
var dotnetTestsCauses = new List<
Cause
>();
310
foreach (
var
dotnetTestsCause in dotnetTestsCauses)
341
private static readonly IReadOnlyDictionary<string, IReadOnlyList<
Cause
>> s_emptyCauses =
342
new Dictionary<string, IReadOnlyList<
Cause
>>(StringComparer.Ordinal);
344
private static IReadOnlyDictionary<string, IReadOnlyList<
Cause
>> Freeze(Dictionary<string, List<
Cause
>> causes) =>
345
causes.ToDictionary(kv => kv.Key, kv => (IReadOnlyList<
Cause
>)kv.Value, StringComparer.Ordinal);
359
private static void AddCause(Dictionary<string, List<
Cause
>> causes, string key,
Cause
cause)
363
list = new List<
Cause
>();
395
Dictionary<string, List<
Cause
>> testCauses,
396
Dictionary<string, List<
Cause
>> jobCauses,
397
List<
Cause
> dotnetTestsCauses,
434
Dictionary<string, List<
Cause
>> testCauses,
435
Dictionary<string, List<
Cause
>> jobCauses,
436
List<
Cause
> dotnetTestsCauses,
439
Cause
cause)
460
Dictionary<string, List<
Cause
>> testCauses,
461
Dictionary<string, List<
Cause
>> jobCauses,
462
List<
Cause
> dotnetTestsCauses,
465
Cause
cause,