xref: /aosp_15_r20/external/llvm/test/tools/llvm-cov/double_dots.c (revision 9880d6810fe72a1726cb53787c6711e909410d58)
1*9880d681SAndroid Build Coastguard Worker // To create the covmapping for this file, copy this file to /tmp/dots/,
2*9880d681SAndroid Build Coastguard Worker // cd into /tmp/dots, and pass "../dots/double_dots.c" to the compiler. Use
3*9880d681SAndroid Build Coastguard Worker // llvm-cov convert-for-testing to extract the covmapping.
4*9880d681SAndroid Build Coastguard Worker 
5*9880d681SAndroid Build Coastguard Worker // RUN: llvm-profdata merge %S/Inputs/double_dots.proftext -o %t.profdata
6*9880d681SAndroid Build Coastguard Worker // RUN: llvm-cov show %S/Inputs/double_dots.covmapping -instr-profile=%t.profdata -o %t.dir
7*9880d681SAndroid Build Coastguard Worker // RUN: FileCheck -input-file=%t.dir/index.txt %s
8*9880d681SAndroid Build Coastguard Worker 
9*9880d681SAndroid Build Coastguard Worker // CHECK-NOT: coverage{{.*}}dots{{.*}}..{{.*}}dots
10*9880d681SAndroid Build Coastguard Worker 
main()11*9880d681SAndroid Build Coastguard Worker int main() {}
12*9880d681SAndroid Build Coastguard Worker 
13*9880d681SAndroid Build Coastguard Worker // Re-purpose this file to test that we use relative paths when creating
14*9880d681SAndroid Build Coastguard Worker // report indices:
15*9880d681SAndroid Build Coastguard Worker 
16*9880d681SAndroid Build Coastguard Worker // RUN: FileCheck -check-prefix=REL-INDEX -input-file %t.dir/index.txt %s
17*9880d681SAndroid Build Coastguard Worker // REL-INDEX-NOT: %t.dir
18