-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Code coverage support #2116
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
Code coverage support #2116
Conversation
test/run-tests.proj
Outdated
@@ -10,7 +10,7 @@ | |||
<Message Importance="High" Text="Running tests ..." /> | |||
<MSBuild Targets="VSTest" | |||
Projects="@(Project)" | |||
Properties="VSTestNoBuild=true" /> | |||
Properties="VSTestNoBuild=true;Coverage=true;CopyLocalLockFileAssemblies=true" /> |
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.
CopyLocalLockFileAssemblies=true
Is this not a duplicate of the value in Directory.Build.targets set whenever Coverage
is true?
test/run-tests.proj
Outdated
@@ -10,7 +10,7 @@ | |||
<Message Importance="High" Text="Running tests ..." /> | |||
<MSBuild Targets="VSTest" | |||
Projects="@(Project)" | |||
Properties="VSTestNoBuild=true" /> | |||
Properties="VSTestNoBuild=true;Coverage=true;" /> |
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.
There should be a way to shut this off locally, if devs don't want it. #Resolved
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.
Correct, that option needs to be added to the run tool and removed here. #Resolved
test/Directory.Build.targets
Outdated
|
||
<PropertyGroup Condition="'$(Coverage)' == 'true' and '$(Configuration)'=='Release' and '$(OS)' == 'Windows_NT' and '$(TargetArchitecture)' == 'x64'"> | ||
<CollectCoverage>true</CollectCoverage> | ||
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies> |
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 is this necessary? Does the coverage tool require it? If so, can you link to information on it?
Codecov Report
@@ Coverage Diff @@
## master #2116 +/- ##
=========================================
Coverage ? 26.31%
=========================================
Files ? 7
Lines ? 1592
Branches ? 0
=========================================
Hits ? 419
Misses ? 1173
Partials ? 0
Continue to review full report at Codecov.
|
This is a WIP PR that adds code coverage support. This change contains code that generates code coverage files. In the next iteration I will add code to upload code coverage files to CodeCov once I know builds pass and a way to disable code coverage if needed.