[PATCH] D20803: Displaying coverage information for all source files present in a directory

Vedant Kumar via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 16 10:34:26 PDT 2016


vsk added a comment.

Meta: Please wait one week before pinging patches, see http://llvm.org/docs/DeveloperPolicy.html#code-reviews.

Your code isn't being tested because -filename-equivalence sets CompareFilenamesOnly: collectSourceFiles pushes back the directory path and returns immediately when this happens.

Please don't check in a profdata file or any source files. Add a hidden `-dump-input-file-list` cl::opt to CodeCoverageTool::run and write a test like this:

  RUN: rm -rf %t
  RUN: mkdir -p %t/a/b/
  RUN: echo "" > %t/a/b/c.tmp
  RUN: echo "" > %t/a/d.tmp
  RUN: llvm-cov show %S/Inputs/directory-search.covmapping -instr-profile=/dev/null -dump-input-file-list | FileCheck %s
  CHECK-DAG: {{.*}}c.tmp
  CHECK-DAG: {{.*}}d.tmp

This tests the functionality you're adding, instead of testing e.g the coverage report format, which is unrelated.


http://reviews.llvm.org/D20803





More information about the llvm-commits mailing list