【问题标题】:gcovr - Is there a known issue with corrupting filenames in xml coverage Cobertura reports?gcovr - 在 xml 覆盖 Cobertura 报告中是否存在损坏文件名的已知问题?
【发布时间】:2012-09-24 23:44:17
【问题描述】:

我正在开发一个与 gcovr 覆盖率报告集成的 C++ 项目。我遇到了一个问题,即同一文件的 pacakge 条目被添加到 gcovr 报告中两次,这导致报告服务器出现错误。

但是,当查看 gcovr xml 输出时,第二次输出文件时,filename 属性实际上被双“//”损坏,而 name 属性以类似的方式在同一个地方被双精度损坏“..”。

下面是一个简单的示例,说明损坏条目的外观,并将名称适当地替换为 foo 和 bar:

<package branch-rate="0.0" complexity="0.0" line-rate="1.0" name="foo.foo.foo.foo..bar.bar">
    <classes>
        <class branch-rate="0.0" complexity="0.0" filename="foo/foo/foo/foo//bar/bar/foobar.h" line-rate="1.0" name="foobar_h">
            <lines>
                <line branch="false" hits="612" number="37"/>
            </lines>
        </class>
    </classes>
</package>

这似乎是 gcovr 中的一个合法错误。有没有人遇到过这个问题,如果有,知道修复或者修复是否在较新的版本中?

【问题讨论】:

    标签: c++ python code-coverage sonarqube


    【解决方案1】:

    原来这是 gcovr 中的一个错误。使用此修复程序升级到稳定版本可以解决此问题。

    【讨论】:

      猜你喜欢
      • 2017-01-03
      • 2011-06-08
      • 2010-11-14
      • 2012-08-28
      • 2010-10-22
      • 1970-01-01
      • 2022-11-04
      • 2014-12-15
      • 2013-09-26
      相关资源
      最近更新 更多