5 instantiations of Cause
SelectTests (5)
TestSelector.cs (5)
196
AddCause(testCauses, project, new
Cause
(CauseKind.Convention, file));
208
new
Cause
(CauseKind.PathRule, file, rule.Reason));
258
AddCause(testCauses, project, new
Cause
(CauseKind.Layer1Graph, project, Path: path));
285
new
Cause
(CauseKind.AffectedProject, matchedProject, rule.Reason));
406
new
Cause
(CauseKind.DerivedFromTest, triggeringTest, derived.Reason));
46 references to Cause
Infrastructure.Tests (6)
TestTriggerMap\SelectTestsAcceptanceTests.cs (6)
473
var
cause = Assert.Single(r.TestCauses["InstallerTests"]);
483
var
cause = Assert.Single(r.TestCauses["Foo.Tests"]);
493
var
cause = Assert.Single(r.TestCauses["Layer1Only"]);
516
var
cause = Assert.Single(r.TestCauses["Layer1Only"]);
529
var
cause = Assert.Single(r.JobCauses["job:projjob"]);
542
var
cause = Assert.Single(r.JobCauses["job:cli-starter"]);
SelectTests (40)
Program.cs (14)
655
static JsonArray ItemsWithCauses(IReadOnlySet<string> items, IReadOnlyDictionary<string, IReadOnlyList<
Cause
>> causes)
663
foreach (
var
cause in list.OrderBy(c => CausePriority(c.Kind)))
795
var groups = new Dictionary<string, Dictionary<string,
Cause
>>(StringComparer.Ordinal);
803
foreach (
var
cause in causes)
808
members = new Dictionary<string,
Cause
>(StringComparer.Ordinal);
814
if (!members.TryGetValue(project, out
var
existing) || CausePriority(cause.Kind) < CausePriority(existing.Kind))
901
private static string MemberWithHops(KeyValuePair<string,
Cause
> member)
919
private static string CauseGroupKey(
Cause
cause) => cause.Kind switch
985
private static string JobCausesText(IReadOnlyDictionary<string, IReadOnlyList<
Cause
>> causes, string key)
1140
IReadOnlyDictionary<string, IReadOnlyList<
Cause
>> causes)
1149
foreach (
var
cause in list.OrderBy(c => CausePriority(c.Kind)))
1202
private static string ShortCause(
Cause
cause) => cause.Kind switch
1219
private static string Layer1ShortCause(
Cause
cause)
1233
private static string VerboseCause(
Cause
cause)
TestSelector.cs (26)
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 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);
164
var testCauses = new Dictionary<string, List<
Cause
>>(StringComparer.Ordinal);
165
var jobCauses = new Dictionary<string, List<
Cause
>>(StringComparer.Ordinal);
327
private static readonly IReadOnlyDictionary<string, IReadOnlyList<
Cause
>> s_emptyCauses =
328
new Dictionary<string, IReadOnlyList<
Cause
>>(StringComparer.Ordinal);
330
private static IReadOnlyDictionary<string, IReadOnlyList<
Cause
>> Freeze(Dictionary<string, List<
Cause
>> causes) =>
331
causes.ToDictionary(kv => kv.Key, kv => (IReadOnlyList<
Cause
>)kv.Value, StringComparer.Ordinal);
345
private static void AddCause(Dictionary<string, List<
Cause
>> causes, string key,
Cause
cause)
349
list = new List<
Cause
>();
380
Dictionary<string, List<
Cause
>> testCauses,
381
Dictionary<string, List<
Cause
>> jobCauses,
417
Dictionary<string, List<
Cause
>> testCauses,
418
Dictionary<string, List<
Cause
>> jobCauses,
421
Cause
cause)
441
Dictionary<string, List<
Cause
>> testCauses,
442
Dictionary<string, List<
Cause
>> jobCauses,
445
Cause
cause,