5 instantiations of Cause
SelectTests (5)
TestSelector.cs (5)
195
AddCause(testCauses, project, new
Cause
(CauseKind.Convention, file));
207
new
Cause
(CauseKind.PathRule, file, rule.Reason));
256
AddCause(testCauses, project, new
Cause
(CauseKind.Layer1Graph, project, Path: path));
281
new
Cause
(CauseKind.AffectedProject, matchedProject, rule.Reason));
402
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)
671
static JsonArray ItemsWithCauses(IReadOnlySet<string> items, IReadOnlyDictionary<string, IReadOnlyList<
Cause
>> causes)
679
foreach (
var
cause in list.OrderBy(c => CausePriority(c.Kind)))
851
var groups = new Dictionary<string, Dictionary<string,
Cause
>>(StringComparer.Ordinal);
859
foreach (
var
cause in causes)
864
members = new Dictionary<string,
Cause
>(StringComparer.Ordinal);
870
if (!members.TryGetValue(project, out
var
existing) || CausePriority(cause.Kind) < CausePriority(existing.Kind))
957
private static string MemberWithHops(KeyValuePair<string,
Cause
> member)
975
private static string CauseGroupKey(
Cause
cause) => cause.Kind switch
1041
private static string JobCausesText(IReadOnlyDictionary<string, IReadOnlyList<
Cause
>> causes, string key)
1221
IReadOnlyDictionary<string, IReadOnlyList<
Cause
>> causes)
1230
foreach (
var
cause in list.OrderBy(c => CausePriority(c.Kind)))
1283
private static string ShortCause(
Cause
cause) => cause.Kind switch
1300
private static string Layer1ShortCause(
Cause
cause)
1314
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 non-matrix 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);
163
var testCauses = new Dictionary<string, List<
Cause
>>(StringComparer.Ordinal);
164
var jobCauses = new Dictionary<string, List<
Cause
>>(StringComparer.Ordinal);
323
private static readonly IReadOnlyDictionary<string, IReadOnlyList<
Cause
>> s_emptyCauses =
324
new Dictionary<string, IReadOnlyList<
Cause
>>(StringComparer.Ordinal);
326
private static IReadOnlyDictionary<string, IReadOnlyList<
Cause
>> Freeze(Dictionary<string, List<
Cause
>> causes) =>
327
causes.ToDictionary(kv => kv.Key, kv => (IReadOnlyList<
Cause
>)kv.Value, StringComparer.Ordinal);
341
private static void AddCause(Dictionary<string, List<
Cause
>> causes, string key,
Cause
cause)
345
list = new List<
Cause
>();
376
Dictionary<string, List<
Cause
>> testCauses,
377
Dictionary<string, List<
Cause
>> jobCauses,
413
Dictionary<string, List<
Cause
>> testCauses,
414
Dictionary<string, List<
Cause
>> jobCauses,
417
Cause
cause)
437
Dictionary<string, List<
Cause
>> testCauses,
438
Dictionary<string, List<
Cause
>> jobCauses,
441
Cause
cause,