-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Add integration tests for dotnet test #46045
Add integration tests for dotnet test #46045
Conversation
…egration-tests-for-dotnet-test-run-functionality
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.
Approving as-is as it's getting to hard to reiew properly without having the associated feature at hand. Let's make sure this is merged asap and let's ensure tests are added with feature work.
Co-authored-by: Amaury Levé <[email protected]>
…-functionality' of https://github.com/dotnet/sdk into dev/mabdullah/add-integration-tests-for-dotnet-test-run-functionality
} | ||
else | ||
{ | ||
bool allowBinLog = IsBinaryLoggerEnabled(_args, out string binLogFileName); | ||
isBuiltOrRestored = BuildOrRestoreProject(solutionOrProjectFilePath, projectCollection, [CliConstants.RestoreCommand], allowBinLog, binLogFileName); |
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.
We still need to find a way to write a single binlog file when restoring and building for the test project case.
Because it's not working as the solution case (passing both restore and build command when building).
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.
it should work for single project, just like with sln. And for multiple projects you should be able to filter and build a metaproject with just those projects or something.
@JanKrivanek what is the easiest and most efficient way for us to build and restore a subset of projects from a solution?
e.g. all projects that contain *UnitTests.csproj in the name.
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.
FYI @baronfel - yet another request for building set of projects in one shot.
I'm worried that we currently do not have better way for this other then 1 by 1 or creating a custom metaproj
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.
Agreed @JanKrivanek - it does seem like we have a gap here.
For this specific problem, maybe create a custom slnf and use it to load the set of projects? It's a hack :-/
…et-test-run-functionality
…-functionality' of https://github.com/dotnet/sdk into dev/mabdullah/add-integration-tests-for-dotnet-test-run-functionality
…et-test-run-functionality
…et-test-run-functionality
…-functionality' of https://github.com/dotnet/sdk into dev/mabdullah/add-integration-tests-for-dotnet-test-run-functionality
…et-test-run-functionality
…-functionality' of https://github.com/dotnet/sdk into dev/mabdullah/add-integration-tests-for-dotnet-test-run-functionality
This pull request includes several changes to the
dotnet-test
command and its associated utilities. The most important changes include the addition of new constants inCliConstants
, modifications to theMSBuildHandler
class to incorporate a newTerminalTestReporter
, and the introduction of new methods for handling file paths.Enhancements to
dotnet-test
command:src/Cli/dotnet/commands/dotnet-test/CliConstants.cs
: Added new constantsBuildCommand
,Configuration
, andRuntimeIdentifier
.Updates to
MSBuildHandler
:src/Cli/dotnet/commands/dotnet-test/MSBuildHandler.cs
: IntroducedTerminalTestReporter
for output handling and updated methods to use this reporter instead ofVSTestTrace
. [1] [2] [3] [4] [5]Path utility improvements:
src/Cli/Microsoft.DotNet.Cli.Utils/PathUtility.cs
: AddedFixFilePath
andGetDirectorySeparatorChar
methods to handle file path normalization.Miscellaneous changes:
eng/Versions.props
: Added a comment to clarify the usage ofMicrosoftTestingPlatformVersion
.src/Cli/dotnet/commands/dotnet-test/MSBuildHandler.cs
: Refactored methods to improve readability and maintainability, includingRunBuild
,ValidateBuildPathOptions
, andExtractModulesFromProject
.