Skip to content

Missing source-based coverage for a source file which is supposed to be covered #79456

Closed
@marco-c

Description

@marco-c

As I mentioned in rust-lang/compiler-team#278 (comment), I've implemented support for source-based code coverage in grcov, and started using it to collect coverage for grcov itself.

There is a file that is definitely covered, but doesn't appear to be in the report. It is in the report when using gcov-based coverage.

STR:

  1. Clone https://github.com/mozilla/grcov;
  2. Run LLVM_PROFILE_FILE="grcov-%p-%m.profraw" cargo test;
  3. Run grcov `find . \( -name "grcov-*.profraw" \) -print\` --binary-path ./target/debug/grcov -s . -t html --branch --ignore-not-existing --ignore "/*" -o coverage to generate a HTML report (or you can also generate a textual one using the llvm tools);
  4. See that src/llvm_tools.rs appears to be totally uncovered, while it should be covered.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-code-coverageArea: Source-based code coverage (-Cinstrument-coverage)C-bugCategory: This is a bug.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions