25 lines · c
1// To create the covmapping for this file, copy this file to /tmp/dots/,2// cd into /tmp/dots, and pass "../dots/double_dots.c" to the compiler. Use3// llvm-cov convert-for-testing to extract the covmapping.4 5// RUN: llvm-profdata merge %S/Inputs/double_dots.proftext -o %t.profdata6// RUN: llvm-cov show %S/Inputs/double_dots.covmapping -instr-profile=%t.profdata -o %t.dir7// RUN: FileCheck -input-file=%t.dir/index.txt %s8// RUN: llvm-cov show -format=html %S/Inputs/double_dots.covmapping -instr-profile=%t.profdata -o %t.dir9// RUN: FileCheck -input-file=%t.dir/index.html %s10 11// CHECK-NOT: coverage{{.*}}dots{{.*}}..{{.*}}dots12 13int main() {}14 15// Re-purpose this file to test that we use relative paths when creating16// report indices:17 18// RUN: FileCheck -check-prefix=REL-INDEX -input-file %t.dir/index.txt %s19// REL-INDEX-NOT: %t.dir20 21// Check that we get the right error when writing to an invalid path:22 23// RUN: not llvm-cov show %S/Inputs/double_dots.covmapping -instr-profile=%t.profdata -o /dev/null 2>&1 | FileCheck %s -check-prefix=ERROR-MESSAGE24// ERROR-MESSAGE: error: {{.*}}: could not create index file!25