使用LLVM-COV使用Clang-CL编译器的代码覆盖范围,生成报告,其中丢失了测试文件覆盖范围
我正在尝试在Visual Studio IDE中获得AC/C ++ LLVM-Clang项目的代码覆盖范围,该项目被编译为静态库,并且我使用GTEST编写了一个测试项目来测试包含不同源文件的静态库,我可以生成覆盖范围报告使用命令 llvm-cov.exe报告“ my-exe” -instr-profile =*。profdata ,但报告包含除我编写测试用例的文件外的所有文件。它只是忽略了覆盖范围中的这些文件。
我已经使用了标志-Frofile-instr-Generate,-fcoverage-映射和 - 覆盖过程中静态LIB代码期间的覆盖。它似乎也生成.gcno和.gcda文件。为什么忽略了书面案例的文件?
请注意,这些代码是在Visual Studio IDE中编译的。任何帮助都值得赞赏。
I am trying to get code coverage for a c/c++ llvm-clang project in visual studio IDE which is compiled as a static library and I have a test project written using Gtest to test the static library containing different source files, I can generate a coverage report using command llvm-cov.exe report "my-exe" -instr-profile=*.profdata but the report contains all the files except the files for which I have written the test cases. It simply ignores those files in the coverage.
I have used flags -fprofile-instr-generate, -fcoverage-mapping, and --coverage during the compilation of the static lib code. And it seems to generate .gcno and .gcda files as well. Why are the files for which the test cases written getting ignored?
Please note that the codes are compiled in Visual Studio IDE.Any help is appreciated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论