blob: adfd9f7f35305090bd6e40676ac384fc8a35f08f [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
8
9// CHECK-NOT: coverage{{.*}}dots{{.*}}..{{.*}}dots
10
11int main() {}
Vedant Kumard6d192c2016-06-29 21:55:46 +000012
13// Re-purpose this file to test that we use relative paths when creating
14// report indices:
15
16// RUN: FileCheck -check-prefix=REL-INDEX -input-file %t.dir/index.txt %s
17// REL-INDEX-NOT: %t.dir
Vedant Kumarb95dc462016-07-15 01:53:39 +000018
19// Check that we get the right error when writing to an invalid path:
20
21// 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
22// ERROR-MESSAGE: error: Not a directory: Could not create index file!