Skip to content

Commit

Permalink
[rel/17.6] Exclude also known resource dlls (#4528)
Browse files Browse the repository at this point in the history
  • Loading branch information
Evangelink committed Jun 6, 2023
1 parent 4f929dd commit 911a038
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions src/vstest.console/TestPlatformHelpers/TestRequestManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1473,23 +1473,29 @@ private static List<string> GetSources(TestRunRequestPayload testRunRequestPaylo

internal static class KnownPlatformSourceFilter
{

// Running tests on AzureDevops, many projects use the default filter
// which includes all *test*.dll, this includes many of the TestPlatform dlls,
// which we cannot run, and don't want to attempt to run.
// The default filter also filters out !*TestAdapter*.dll but it is easy to forget
// so we skip the most used adapters here as well.
private static readonly HashSet<string> KnownPlatformSources = new(new string[]
{
"Microsoft.TestPlatform.AdapterUtilities.dll",
"Microsoft.TestPlatform.AdapterUtilities.resources.dll",
"Microsoft.TestPlatform.CommunicationUtilities.dll",
"Microsoft.TestPlatform.CommunicationUtilities.resources.dll",
"Microsoft.TestPlatform.CoreUtilities.dll",
"Microsoft.TestPlatform.CoreUtilities.resources.dll",
"Microsoft.TestPlatform.CrossPlatEngine.dll",
"Microsoft.TestPlatform.CrossPlatEngine.resources.dll",
"Microsoft.TestPlatform.PlatformAbstractions.dll",
"Microsoft.TestPlatform.Utilities.dll",
"Microsoft.TestPlatform.Utilities.resources.dll",
"Microsoft.VisualStudio.TestPlatform.Common.dll",
"Microsoft.VisualStudio.TestPlatform.Common.resources.dll",
"Microsoft.VisualStudio.TestPlatform.ObjectModel.dll",
"Microsoft.VisualStudio.TestPlatform.ObjectModel.resources.dll",
"testhost.dll",
"Microsoft.TestPlatform.AdapterUtilities.dll",

// NUnit
"NUnit3.TestAdapter.dll",
Expand All @@ -1499,11 +1505,15 @@ internal static class KnownPlatformSourceFilter
"xunit.runner.visualstudio.dotnetcore.testadapter.dll",

// MSTest
"Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.dll",
"Microsoft.VisualStudio.TestPlatform.TestFramework.dll",
"Microsoft.VisualStudio.TestPlatform.TestFramework.resources.dll",
// For MSTest up to v3
"Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.dll",
"Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.resources.dll",
"Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.dll",
"Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.Interface.dll",
"Microsoft.VisualStudio.TestPlatform.TestFramework.dll",
"Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.dll",
"Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.resources.dll",
}, StringComparer.OrdinalIgnoreCase);


Expand Down

0 comments on commit 911a038

Please sign in to comment.