-
Notifications
You must be signed in to change notification settings - Fork 12
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
Extraneous coverage results #33
Comments
@RussKie those regexes are checked against whole |
@RussKie on Windows you can use: |
Thank you, I'll give it a go. |
I tried that, thank you, but it didn't seem to work. <Include>
<ModulePath>.*System\.Cloud\.([^\\]*)\.dll$</ModulePath>
</Include> ...yet I'm still seeing additional assemblies in the report: https://dev.azure.com/dnceng-public/public/_build/results?buildId=300859&view=codecoverage-tab Am I doing something wrong or missing some configuration? |
@mariam-abdulla please investigate. |
@RussKie I'd like to know if you can repro this locally? |
The issue appears to only happen on Linux - e.g., here's the latest test build, and only Linux_Ubuntu.cobertura.xml contains extraneous entries (such as Microsoft.IO.RecyclableMemoryStream, Microsoft.TestUtilities, Humanizer). The Windows version doesn't contain anything nonmatching the pattern. You can reproduce this in WSL # setup
git clone https://github.com/Azure/dotnet-extensions-experimental.git test33
cd ./test33
<< modify eng/CodeCoverage.config >>
./build
# run code coverage
./build -testCoverage Change eng/CodeCoverage.config as follows: diff --git a/eng/CodeCoverage.config b/eng/CodeCoverage.config
index 1d16457..0466174 100644
--- a/eng/CodeCoverage.config
+++ b/eng/CodeCoverage.config
@@ -11,9 +11,6 @@
<ModulePath>.*tests\.dll</ModulePath>
<ModulePath>.*xunit.*</ModulePath>
<ModulePath>.*moq.*</ModulePath>
- <!-- TODO: remove when https://github.com/microsoft/codecoverage/issues/33 resolved -->
- <ModulePath>.*Microsoft\.IO\.[^\\]+\.dll$</ModulePath>
- <ModulePath>.*\.TestUtilities\.dll$</ModulePath>
</Exclude>
</ModulePaths>
I'm not sure what it is or how to get those. I can tweak our build and capture logs and traces. |
@RussKie, please use the following regex: That regex won't match the paths on both Win and Linux. |
Doh! I shouldn't have realised that myself.... /facepalm. Thank you! |
In the settings I have the following inclusions:
Yet, the coverage results contain entries for "Humanizer" (and "Microsoft.IO.*" which I had to explicitly suppress). Can you please help understand why these entries get added?
![image](https://private-user-images.githubusercontent.com/4403806/244272123-175cb5db-41f1-4be6-bfa6-c25185255aaf.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk4Njg5MjAsIm5iZiI6MTczOTg2ODYyMCwicGF0aCI6Ii80NDAzODA2LzI0NDI3MjEyMy0xNzVjYjVkYi00MWYxLTRiZTYtYmZhNi1jMjUxODUyNTVhYWYucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI1MDIxOCUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTAyMThUMDg1MDIwWiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9MDY2NTE3ZTQxNjA2OTg2MmUzMjE5MTJmMTc4NjFjODA1OGU4MmZhM2ZlZDNlOWU4Y2JjNTkyMTJmZTYzNDIxMCZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.m26i4cEmN5w-AAdwLhSSFvTmsm4dc7lJk94Z4K7Q2hE)
dotnet-coverage: 17.7.1
Command:
dotnet dotnet-coverage collect --settings ./eng/CodeCoverage.config --output ./artifacts/TestResults/Release//w.cobertura.xml "./build.cmd -ci -NativeToolsOnMachine -test -configuration Release "
Build: https://dev.azure.com/dnceng-public/public/_build/results?buildId=299361&view=artifacts&pathAsName=false&type=publishedArtifacts (see
CodeCoverageResults
)Settings: https://github.com/dotnet/extensions/blob/cc/eng/CodeCoverage.config
The text was updated successfully, but these errors were encountered: