-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Enable code coverage for Linux/Mac #11920
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
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.
Pull Request Overview
This PR implements comprehensive code coverage collection for the MSBuild repository by configuring the test infrastructure to use VSTest runner with Microsoft.CodeCoverage data collector instead of the previous xUnit runner.
Key changes include:
- Switching from xUnit to VSTest runner with code coverage enabled
- Adding runsettings files to configure coverage collection for different platforms
- Creating PowerShell and Bash scripts to process and merge coverage reports
- Updating CI pipeline to collect, process, and publish coverage artifacts from all build jobs
- Adding test isolation improvements to prevent cross-test interference
Reviewed Changes
Copilot reviewed 21 out of 21 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
src/Directory.Build.targets |
Switches test runner from xUnit to VSTest with coverage settings and filters |
src/Directory.Build.props |
Enables VSTest runner for test projects |
CoverageWindowsFull.runsettings |
Configures code coverage collection for Windows with specific module filters |
Coverage.runsettings |
Configures basic code coverage collection for non-Windows platforms |
.vsts-dotnet-ci.yml |
Updates CI pipeline to collect, process and publish coverage reports |
eng/process-coverage.ps1 |
PowerShell script to merge coverage reports using dotnet-coverage tool |
eng/process-coverage.sh |
Bash script equivalent for Unix platforms |
eng/restore-dotnet-coverage.ps1 |
PowerShell script to install dotnet-coverage tool |
eng/restore-dotnet-coverage.sh |
Bash script equivalent for Unix platforms |
| Various test files | Adds test isolation and timeout improvements |
Comment out the code coverage task in multiple sections due to instability.
Skip a test case due to a floating failure that needs investigation.
|
for the record |
Fixes #1854
Context
Changes Made
Testing
Notes