Added Code Coverage to build#997
Conversation
|
|
||
| # Fail on any line that doesn't show %100 coverage and isn't on the exclusion list or hpp/cpp | ||
| while read line; do | ||
| if [[ $line != *"100.00%"* ]] && |
There was a problem hiding this comment.
We need all these exclusions since we're including too many files in the test report.
@pmj do you know how we could switch the code coverage report to just be on KauthHandler.cpp && VirtualizationRoots.cpp.
Alternatively we could parse the json and remove the files we don't care about in that report. @mjcheetham know a fancy json parser for MacOS as a backup?
There was a problem hiding this comment.
You could use jq which is very small, lightweight and installable by Homebrew.. it's like "sed/awk for JSON"
There was a problem hiding this comment.
Thanks Matt! I had to turn off json since the build output didn't support the output from tool. Once this is supported I think the aim should be to move json full stop and jq looks like a great tool for that.
There was a problem hiding this comment.
Alternatively we could parse the json
@jeschu1 for my own understanding, which of the above commands is producing the json?
There was a problem hiding this comment.
@wilbaker the "--json" option does it
#xcrun xccov view "$COVERAGE_FILE" --json
cfb3694 to
ee795c8
Compare
b848ac1 to
705acaf
Compare
nickgra
left a comment
There was a problem hiding this comment.
LGTM too!
Offline I proposed an solution to filter away any test bundles that we don't want to measure Code Coverage for, but we can handle that as a separate PR (since we already have to revisit this for the pretty output)
|
/azp run GitHub VFSForGit Mac Functional Tests |
|
No pipelines are associated with this pull request. |
We include code coverage reports in the build. You can see this in the logs.
We will fail on Kext functions not on the exclusion list and is not at 100%.
We hope to move to the json format and a prettier output in the future, once we have full ansci support on the build logs.