-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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 not working for Globalization* test projects #27454
Comments
cc @pjanotti. After fixing this with a temporary workaround and now placing the right runtime config files into the test directory, the coverage is still not generated correctly for System.Globalization* ones. Can you please take a look? |
@pjanotti please let me know if you have an idea why coverage isn't measured for these projects. |
@ViktorHofer if it is using coverlet it typically it is a matter of not instrumenting the right assemblies. The runtime config file should not affect runs with OpenCover. |
I initially thought this has to do with runtime config files. Sorry for the confusion, but that's happening just with the default settings in master.
|
@ViktorHofer at least for On the CI runs we add CoreLib for all tests but actually I would like to be more explicit about it, i.e.: each test project that the actual code resides in System.Private.CoreLib should be explicit about it. |
side note: we can't run coverlet against CoreLib (already tracked in a separate issue) |
By introducing a msbuild variable for that or somehow auto detecting it? What's the plan? |
My initial idea is for test projects to explicitly include a property to indicate that they are testing code in CoreLib. I don't want to automate that since most test code eventually touches CoreLib. |
Sounds good. Please open a PR for the fix :) |
Eventually :) - perhaps it happens sooner since it may be part of a workaround for the problems with the official coverage run, but I'm not sure yet. |
Last coverage run removing CoreLib indicates that we should do this rather soon: one test crashed (known issue with OpenCover) but it completed the pass. |
Forgot to close this one.... now with TestRuntime property this is not an issue anymore |
Issues:
UsingCoverageDedicatedRuntime
which is now calledUseCoverageDedicatedRuntime
.I'm going to submit a fix for this but the bigger issue is that we currently store all properties in the targets file instead of props files. We'll want to refactor that.
The text was updated successfully, but these errors were encountered: