blob: 9f4b7c125f65638f640d84fefbaad935d116c88b [file] [log] [blame]
Vedant Kumar2ca5eaa2016-06-29 16:23:34 +00001// To create the covmapping for this file, copy this file to /tmp/dots/,
Vedant Kumar4a54abe2016-06-29 16:22:12 +00002// cd into /tmp/dots, and pass "../dots/double_dots.c" to the compiler. Use
3// llvm-cov convert-for-testing to extract the covmapping.
4
5// RUN: llvm-profdata merge %S/Inputs/double_dots.proftext -o %t.profdata
6// RUN: llvm-cov show %S/Inputs/double_dots.covmapping -instr-profile=%t.profdata -o %t.dir
7// RUN: FileCheck -input-file=%t.dir/index.txt %s
Ying Yi76eb2192016-08-30 07:01:37 +00008// RUN: llvm-cov show -format=html %S/Inputs/double_dots.covmapping -instr-profile=%t.profdata -o %t.dir
9// RUN: FileCheck -input-file=%t.dir/index.html %s
Vedant Kumar4a54abe2016-06-29 16:22:12 +000010
11// CHECK-NOT: coverage{{.*}}dots{{.*}}..{{.*}}dots
12
13int main() {}
Vedant Kumard6d192c2016-06-29 21:55:46 +000014
15// Re-purpose this file to test that we use relative paths when creating
16// report indices:
17
18// RUN: FileCheck -check-prefix=REL-INDEX -input-file %t.dir/index.txt %s
19// REL-INDEX-NOT: %t.dir
Vedant Kumarb95dc462016-07-15 01:53:39 +000020
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-MESSAGE
Vedant Kumar71d515b2016-07-15 02:11:37 +000024// ERROR-MESSAGE: error: {{.*}}: Could not create index file!