-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Support msbuild params in dotnet test #46562
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support msbuild params in dotnet test #46562
Conversation
I still need to add a couple of integration tests. |
…est' of https://github.com/dotnet/sdk into dev/mabdullah/support-msbuild-params-option-in-dotnet-test
@@ -57,6 +57,7 @@ | |||
<Compile Include="..\Microsoft.DotNet.Configurer.UnitTests\**\*.cs" LinkBase="Configurer" /> | |||
<Compile Include="..\Microsoft.DotNet.ShellShim.Tests\**\*.cs" LinkBase="ShellShim" /> | |||
<Compile Remove="..\dotnet-test.Tests\GivenDotnetTestBuildsAndRunsHelp.cs" /> | |||
<Compile Remove="..\dotnet-test.Tests\MSBuildHandlerTests.cs" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why were the MSBuildHandlerTests.cs tests removed? I'm cleaning up the dotnet.Tests project and related test folder structure.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#48310 let's see if that builds.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The file won't work as-is. I've made a lot of changes around the CLI and now around test projects. This is the PR for which I was referring: #48280
This pull request includes several changes to the
dotnet-test
command to refactor and simplify the codebase. The most important changes involve the introduction of a newPathOptions
record, modifications to theBuildOptions
record, and updates to various methods to use these new structures. Additionally, some redundant methods and imports have been removed.Refactoring and simplification:
PathOptions
record and updatedBuildOptions
to includePathOptions
instead of individual path properties. (src/Cli/dotnet/commands/dotnet-test/Options.cs
)RunMSBuild
method to usePathOptions
for path properties. (src/Cli/dotnet/commands/dotnet-test/MSBuildHandler.cs
)GetProjects
method to simplify build and restore logic by combining MSBuild arguments. (src/Cli/dotnet/commands/dotnet-test/MSBuildUtility.cs
) [1] [2]IsBinaryLoggerEnabled
,GetBuildParameters
, andGetCommands
. (src/Cli/dotnet/commands/dotnet-test/MSBuildUtility.cs
) [1] [2] [3]Command and option updates:
NoRestoreOption
andNoBuildOption
to use common options and forwarding functions. (src/Cli/dotnet/commands/dotnet-test/TestCommandParser.cs
,src/Cli/dotnet/commands/dotnet-test/TestingPlatformOptions.cs
) [1] [2]GetTestOptions
andGetBuildOptions
to utilize newPathOptions
and handle MSBuild arguments. (src/Cli/dotnet/commands/dotnet-test/TestingPlatformCommand.cs
) [1] [2]These changes aim to enhance code maintainability and readability by consolidating path-related options and removing unnecessary complexity.
Relates to #45927