Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Corrupted cobertura file format #196

Closed
acerbetti opened this issue Apr 24, 2016 · 4 comments
Closed

Corrupted cobertura file format #196

acerbetti opened this issue Apr 24, 2016 · 4 comments

Comments

@acerbetti
Copy link

acerbetti commented Apr 24, 2016

Hi all,
I'm seeing this in the output file produced by slater 2.1 with Xcode7.3.
It was working fine with slather 2.0 and Xcode7.2

Any idea why some rows have hits=21700 and the number is 0?

Thanks for the help

<line number="40" branch="false" hits="110"/>
<line number="41" branch="false" hits="110"/>
<line number="42" branch="false" hits="108"/>
<line number="43" branch="false" hits="108"/>
<line number="0" branch="false" hits="21700.0"/>
<line number="0" branch="false" hits="21700.0"/>
<line number="0" branch="false" hits="21700.0"/>
<line number="0" branch="false" hits="21700.0"/>
<line number="0" branch="false" hits="21700.0"/>
<line number="49" branch="false" hits="0"/>
<line number="50" branch="false" hits="0"/>
<line number="0" branch="false" hits="21700.0"/>
<line number="0" branch="false" hits="21700.0"/>
<line number="0" branch="false" hits="21700.0"/>
<line number="54" branch="false" hits="0"/>
<line number="55" branch="false" hits="0"/>
<line number="56" branch="false" hits="0"/>
<line number="0" branch="false" hits="21700.0"/>
<line number="58" branch="false" hits="108"/>
<line number="59" branch="false" hits="108"/>
<line number="60" branch="false" hits="108"/>
<line number="61" branch="false" hits="110"/>
@ksuther
Copy link
Contributor

ksuther commented Apr 26, 2016

Can you run llvm-cov manually and see what the output for those line look like?

xcrun llvm-cov show -instr-profile /path/to/Coverage.profdata /path/to/binary

You can get the paths to the profdata and binary if you run slather with --verbose

@acerbetti
Copy link
Author

This commit c95f3d1 fixed my issue. Thanks

mihaiparv added a commit to mihaiparv/slather that referenced this issue May 4, 2016
- added pattern to match line numbers when llvm-cov output includes thousands as 25.3k and millions as 3.8M
neonichu added a commit that referenced this issue May 5, 2016
Fix for Corrupted cobertura file format #196
@alanzeino
Copy link

Seeing the same issue:

<class name="Foo" filename="path/to/Foo.swift" line-rate="1.0000000000000000" branch-rate="1.0000000000000000" complexity="0.0">
          <methods/>
          <lines>
            <line number="15" branch="false" hits="3"/>
            <line number="16" branch="false" hits="3"/>
            <line number="17" branch="false" hits="3"/>
            <line number="18" branch="false" hits="3"/>
            <line number="20" branch="false" hits="3"/>
            <line number="21" branch="false" hits="3"/>
            <line number="22" branch="false" hits="3"/>
            <line number="23" branch="false" hits="3"/>
            <line number="0" branch="false" hits="70600.0"/>
            <line number="0" branch="false" hits="70600.0"/>
            <line number="0" branch="false" hits="70600.0"/>
            <line number="0" branch="false" hits="70600.0"/>
            <line number="0" branch="false" hits="70600.0"/>
            <line number="0" branch="false" hits="70600.0"/>
            <line number="0" branch="false" hits="70600.0"/>
            <line number="0" branch="false" hits="70600.0"/>
          </lines>
        </class>

Any idea when we'll see a new version, @neonichu?

@neonichu
Copy link
Member

neonichu commented May 8, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants