ang码覆盖无效输出 [英] Clang Code Coverage Invalid Output

查看:332
本文介绍了ang码覆盖无效输出的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

因此,我按照以下说明检查并构建了ang干线: http://clang.llvm .org / get_started.html 。我可以用--coverage建立我的二进制文件,并运行它来获得.gcno和.gcda文件,但是当我运行lcov我得到GENINFO:...达到意外的文件结束。

So I've checked out and built the clang trunk by following these instructions http://clang.llvm.org/get_started.html. I can build my binary with --coverage and run it to get the .gcno and .gcda files, but when I run lcov I get "GENINFO: ... reached unexpected end of file".

现在我被困住,来找寻帮助:)

Now I'm stuck and came to SO to look for help :)

Ubuntu 13.04和写c ++ 11,以防万一。

I'm working with Ubuntu 13.04 and writing c++11, just in case that makes a difference.

推荐答案

lcov在Ubuntu 13.04上。
这是在我的多个Ubuntu设置上工作的解决方案。

I had the same problem with clang with lcov on Ubuntu 13.04. Here is the solution which worked for me on more than one Ubuntu setup.


  1. 您会发现Ubuntu上有两个版本的gcov。 gcov-4.6.4& gcov-4.7.3。默认情况下,gcov链接设置为gcov-4.7.3。更改为gcov-4.6.4

  2. 此外,使用lcov版本1.10而不是通过apt-get install可用的

这将生成代码覆盖率报告。

This should generate the code coverage report.

编辑:Mine是从Ubuntu 12.04升级到13.04。如果你没有看到两个版本的gcov。

Mine was a upgrade from Ubuntu 12.04 to 13.04. Just in case you don't see two versions of gcov.

这篇关于ang码覆盖无效输出的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆