Skip to content

LLVM coverage instrumentation #549

Closed
@xd009642

Description

@xd009642

So when llvm coverage instrumentation is stable on rust we can look at removing the ptrace based coverage completely and instead relying on llvm and rustc to help. This has a few advantages

  1. None of the weirdness of ptrace
  2. More accurate results
  3. First class support in the compiler - less chance of behaviour changing in nightly
  4. Linker issues, large target folders and slowness should be greatly mitigated
  5. Easier route to get branch/condition and other coverage metrics by coupling llvm_lines and source analysis

In this instance tarpaulin should make the whole experience still nicer because:

  1. Handles calling cargo and right flags
  2. Doc tests coverage without needing to remember the nightly flags
  3. results collation/report generation
  4. tagging unused generics that won't be instrumented

OSX TODOs:

  • doc_coverage::doc_test_coverage
  • doc_coverage::doc_test_env
  • doc_coverage::doc_test_panics
  • doc_coverage::doc_test_panics_workspace
  • failures::error_if_test_fails
  • follow_exes_down
  • handle_forks
  • issue_966_follow_exec
  • kill_used_in_test
  • match_expr_coverage
  • rustflags_handling
  • test_types::only_test_coverage

Windows TODOs

  • failures::error_if_test_fails
  • follow_exes_down
  • issue_966_follow_exec
  • match_expr_coverage
  • rustflags_handling
  • picking_up_shared_objects
  • doc_coverage::doc_test_panics
  • doc_coverage::doc_test_panics_workspace

Linux TODOs

  • doc_coverage::doc_test_panics
  • failures::error_if_test_fails
  • handle_forks
  • follow_exes_down
  • issue_966_follow_exec
  • match_expr_coverage
  • rustflags_handling
  • test_types::only_test_coverage

General TODO

  • Coverage behaviour with loops

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions