-
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
Create logger directory if it doesn't exist in dotnet test #47411
Create logger directory if it doesn't exist in dotnet test #47411
Conversation
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.
PR Overview
This PR ensures that the logger directory is created automatically before writing test logs.
- Checks if the directory extracted from _traceFilePath exists and creates it if missing.
- Enhances the robustness of the dotnet test logging functionality.
Reviewed Changes
File | Description |
---|---|
src/Cli/dotnet/commands/dotnet-test/Logger.cs | Added logic to create the directory for the logger if it does not exist |
Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.
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.
LGTM with two minor comments
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.
Consider also adding an integration test for this
Co-authored-by: Youssef Victor <youssefvictor00@gmail.com>
test/dotnet-test.Tests/GivenDotnetTestBuildsAndRunsTestsWithDifferentOptions.cs
Outdated
Show resolved
Hide resolved
…fferentOptions.cs Co-authored-by: Youssef Victor <youssefvictor00@gmail.com>
Relates to #45927
Fixes microsoft/testfx#5205