1 # RUN: llvm-cov report -path-equivalence=.,%S/Inputs/coverage_prefix_map \
2 # RUN: -instr-profile %S/Inputs/coverage_prefix_map/main.profdata \
3 # RUN: %S/Inputs/coverage_prefix_map/main.covmapping \
4 # RUN: %S/Inputs/coverage_prefix_map/bar.h \
5 # RUN: | FileCheck --check-prefix=REPORT --implicit-check-not=main.c %s
7 # RUN: llvm-cov export -format lcov -path-equivalence=.,%S/Inputs/coverage_prefix_map \
8 # RUN: -instr-profile %S/Inputs/coverage_prefix_map/main.profdata \
9 # RUN: %S/Inputs/coverage_prefix_map/main.covmapping \
10 # RUN: %S/Inputs/coverage_prefix_map/bar.h \
11 # RUN: | FileCheck --check-prefix=LCOV --implicit-check-not=main.c %s
13 # REPORT: {{^}}bar.h{{.*}}
14 # REPORT: {{^}}TOTAL{{.*}}100.00%
19 Instructions for regenerating the test:
20 # cd %S/Inputs/coverage_prefix_map
21 cp -r . /tmp/coverage_prefix_map
23 clang -fprofile-instr-generate -mllvm -enable-name-compression=false -fcoverage-mapping -fcoverage-prefix-map=$PWD=. main.cc -o main
24 LLVM_PROFILE_FILE="main.raw" ./main
25 llvm-profdata merge main.raw -o main.profdata
26 llvm-cov convert-for-testing ./main -o ./main.covmapping