Skip to content

Commit

Permalink
Simplify test dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
Evangelink committed Dec 18, 2024
1 parent 3a00320 commit a334b65
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 14 deletions.
5 changes: 3 additions & 2 deletions test/Directory.Build.targets
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,11 @@
<ProjectReference Include="$(RepoRoot)src\Platform\Microsoft.Testing.Extensions.HangDump\Microsoft.Testing.Extensions.HangDump.csproj" />
<ProjectReference Include="$(RepoRoot)src\Platform\Microsoft.Testing.Extensions.TrxReport\Microsoft.Testing.Extensions.TrxReport.csproj" />
<PackageReference Include="Microsoft.Testing.Extensions.CodeCoverage" GeneratePathProperty="True" />
<PackageReference Include="MSTest.Analyzers" />
</ItemGroup>

<ItemGroup Condition=" '$(UseVSTestRunner)' == 'false' AND '$(UseMSTestFromSource)' != 'true' ">
<PackageReference Include="MSTest.Analyzers" />
<PackageReference Include="MSTest.TestFramework" />
<PackageReference Update="MSTest.TestFramework" Condition=" '$(UseMSTestFromSource)' == 'true' " ExcludeAssets="runtime;compile" />
<PackageReference Include="MSTest.TestAdapter" />
</ItemGroup>

Expand Down
6 changes: 1 addition & 5 deletions test/Performance/MSTest.Performance.Runner/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,12 @@
using System.Runtime.InteropServices;

using Microsoft.Testing.TestInfrastructure;
using Microsoft.VisualStudio.TestTools.UnitTesting;

using MSTest.Performance.Runner.Steps;

using DotnetMuxer = MSTest.Performance.Runner.Steps.DotnetMuxer;
using ExecutionScope = MSTest.Performance.Runner.Steps.ExecutionScope;

// TODO: this should not be required
[assembly: Parallelize(Scope = Microsoft.VisualStudio.TestTools.UnitTesting.ExecutionScope.MethodLevel, Workers = 0)]

namespace MSTest.Performance.Runner;

internal class EntryPoint
Expand All @@ -27,7 +23,7 @@ public static Task<int> Main(string[] args)
Console.WriteLine("Microsoft (R) MSTest Performance Profiler Command Line Tool");

var rootCommand = new RootCommand("MSTest Performance Profiler Command Line Tool");
var pipelineNameFilter = new Option<string>(name: "--pipelineNameFilter", description: "Globbing filter for the pipeline name to execute.", getDefaultValue: () => string.Empty);
var pipelineNameFilter = new Option<string>(name: "--pipelineNameFilter", description: "Globing filter for the pipeline name to execute.", getDefaultValue: () => string.Empty);
var executeTests = new Command("execute", "Execute the performance scenarios.")
{
pipelineNameFilter,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,19 @@
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Analyzer.Testing" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.CodeFix.Testing" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.CodeRefactoring.Testing" />

<!-- Deps of MSTest.TestAdapter -->
<PackageReference Include="Microsoft.TestPlatform.AdapterUtilities" />

<!-- CVE-2024-0057 / Transitive deps of code analysis testing packages -->
<PackageReference Include="NuGet.Packaging" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="$(RepoRoot)src\Analyzers\MSTest.Analyzers\MSTest.Analyzers.csproj" />
<ProjectReference Include="$(RepoRoot)src\Analyzers\MSTest.Analyzers.CodeFixes\MSTest.Analyzers.CodeFixes.csproj" />
<ProjectReference Include="$(RepoRoot)src\TestFramework\TestFramework\TestFramework.csproj" />
<ProjectReference Include="$(RepoRoot)src\TestFramework\TestFramework.Extensions\TestFramework.Extensions.csproj" />
<ProjectReference Include="$(RepoRoot)src\Adapter\MSTest.TestAdapter\MSTest.TestAdapter.csproj" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@

using System.Runtime.InteropServices;

// TODO: this should not be required
[assembly: Parallelize(Scope = ExecutionScope.MethodLevel, Workers = 0)]

namespace Microsoft.Testing.TestInfrastructure;

public static class Constants
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="MSTest.Analyzers" />
<PackageReference Include="MSTest.TestFramework" />
<PackageReference Include="Polly" />
<PackageReference Include="Polly.Contrib.WaitAndRetry" />
</ItemGroup>
Expand All @@ -18,7 +16,6 @@
</ItemGroup>

<ItemGroup>
<Using Include="Microsoft.VisualStudio.TestTools.UnitTesting" />
<Using Include="Polyfills" />
</ItemGroup>

Expand Down

0 comments on commit a334b65

Please sign in to comment.