-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Split 'dotnet test' classes in two directories (VSTest/MTP) #50639
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
Conversation
@@ -10,21 +10,18 @@ | |||
|
|||
namespace Microsoft.DotNet.Cli.Commands.Test; | |||
|
|||
internal partial class TestingPlatformCommand : Command, ICustomHelp | |||
internal partial class MicrosoftTestingPlatformTestCommand : Command, ICustomHelp, ICommandDocument |
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 additional interface is for #50638
PrepareEnvironment(parseResult, out TestOptions testOptions, out int degreeOfParallelism); | ||
int degreeOfParallelism = GetDegreeOfParallelism(parseResult); | ||
bool filterModeEnabled = parseResult.HasOption(MicrosoftTestingPlatformOptions.TestModulesFilterOption); | ||
var testOptions = new TestOptions(filterModeEnabled, IsHelp: isHelp); |
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.
is the isHelp
passed to the child processes?
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.
Yes, in TestApplication class where we start the child process, we check for IsHelp
and pass ---help
to test app. The only potential broken scenario today is when you try to bypass CLI knowledge of --help
and end up passing it to the test app. For example, dotnet test -p:TestingPlatformCommandLineArguments=--help
. In this case, CLI doesn't know that we are in help mode.
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
This makes it easier when working with test command to understand which classes are specific to VSTest, and which are specific to Microsoft.Testing.Platform.
Classes outside of these two directories are used by both. This can be refactored further as some of these "common" classes have parts that are VSTest and parts that are MTP, and can be split to more classes for clarity. But that's a separate refactor.
Also cleans up a bit of logic so that it's easier to follow.