<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="" applecontenteditable="true">Hi Arvind,<div class=""><br class=""></div><div class="">You can use "llvm/utils/prepare-code-coverage-artifact.py" to generate coverage reports. Here's how:</div><div class=""><br class=""></div><div class="">1) Build llvm with coverage reporting enabled.</div><div class="">See: <a href="https://clang.llvm.org/docs/SourceBasedCodeCoverage.html#collecting-coverage-reports-for-the-llvm-project" class="">https://clang.llvm.org/docs/SourceBasedCodeCoverage.html#collecting-coverage-reports-for-the-llvm-project</a></div><div class="">2) Collect profiles by running tests.</div><div class="">3) Use prepare-code-coverage-artifact.py in "--only-merge" mode to merge your profiles together.</div><div class="">4) Use prepare-code-coverage-artifact.py again to emit an html report, passing in "--use-existing-profdata path/to/merged/profile".</div><div class="">If you need coverage reporting for multiple binaries, pass in the paths to the binaries you're interested in, along with the "--unified-report" option.</div><div class="">If you only want coverage for a particular set of files or directories, you can specify this with the "--restrict" option.</div><div class=""><br class=""></div><div class="">best,</div><div class="">vedant</div><div class=""><br class=""><div><blockquote type="cite" class=""><div class="">On May 31, 2017, at 9:23 AM, Arvind Sudarsanam via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org" class="">llvm-dev@lists.llvm.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><br class="">Hi,<br class=""><div lang="EN-US" link="blue" vlink="purple" class=""><div class=""><p class="MsoNormal"><u class=""></u></p><p class="MsoNormal"><u class=""></u> This request is related to a previous thread titled ‘A new code coverage bot’ (<a href="http://lists.llvm.org/pipermail/llvm-dev/2016-September/105094.html" target="_blank" class="">http://lists.llvm.org/<wbr class="">pipermail/llvm-dev/2016-<wbr class="">September/105094.html</a>).</p><p class="MsoNormal"><u class=""></u></p><p class="MsoNormal"><span style="font-size: 10pt; font-family: 'Courier New';" class="">“The purpose of the bot is to make high-quality coverage reports available to<u class=""></u><u class=""></u></span></p><p class="MsoNormal"><span style="font-size: 10pt; font-family: 'Courier New';" class="">llvm developers, and to provide additional testing for clang's code coverage<u class=""></u><u class=""></u></span></p><p class="MsoNormal"><span style="font-size: 10pt; font-family: 'Courier New';" class="">implementation”<u class=""></u><u class=""></u></span></p><p class="MsoNormal">I am wondering if there is a framework in place to get the code coverage information locally.<u class=""></u><u class=""></u></p><p class="MsoNormal">I have to get code coverage information of a llvm development branch which resides on my local machine. I also need to get the coverage numbers by running my own set of test suites.</p><p class="MsoNormal">Thanks and Best Regards<u class=""></u><u class=""></u></p><p class="MsoNormal">Arvind<u class=""></u><u class=""></u></p>
</div>
</div>

<br class="">
_______________________________________________<br class="">LLVM Developers mailing list<br class=""><a href="mailto:llvm-dev@lists.llvm.org" class="">llvm-dev@lists.llvm.org</a><br class="">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev<br class=""></div></blockquote></div><br class=""></div></body></html>