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