summaryrefslogtreecommitdiffstats
path: root/llvm/test/tools
diff options
context:
space:
mode:
authorVedant Kumar <vsk@apple.com>2016-09-08 00:56:43 +0000
committerVedant Kumar <vsk@apple.com>2016-09-08 00:56:43 +0000
commitfa754371831b1e75c7b39128b8d8cbfe6862ebd9 (patch)
treef82df1041c2bcb8c74628f49d9a89d6fa502164e /llvm/test/tools
parentf79af6f8c4baf5018ef36aa462ca6f142fb2ed28 (diff)
downloadbcm5719-llvm-fa754371831b1e75c7b39128b8d8cbfe6862ebd9.tar.gz
bcm5719-llvm-fa754371831b1e75c7b39128b8d8cbfe6862ebd9.zip
[llvm-cov] Drop the longest common filename prefix from summaries
Remove the longest common prefix from filenames when printing coverage summaries. This makes them easier to compare. llvm-svn: 280895
Diffstat (limited to 'llvm/test/tools')
-rw-r--r--llvm/test/tools/llvm-cov/Inputs/multiple-files.covmappingbin0 -> 380 bytes
-rw-r--r--llvm/test/tools/llvm-cov/Inputs/multiple-files.proftext19
-rw-r--r--llvm/test/tools/llvm-cov/multiple-files.test9
3 files changed, 28 insertions, 0 deletions
diff --git a/llvm/test/tools/llvm-cov/Inputs/multiple-files.covmapping b/llvm/test/tools/llvm-cov/Inputs/multiple-files.covmapping
new file mode 100644
index 00000000000..f8af44a7456
--- /dev/null
+++ b/llvm/test/tools/llvm-cov/Inputs/multiple-files.covmapping
Binary files differ
diff --git a/llvm/test/tools/llvm-cov/Inputs/multiple-files.proftext b/llvm/test/tools/llvm-cov/Inputs/multiple-files.proftext
new file mode 100644
index 00000000000..1be93b71b77
--- /dev/null
+++ b/llvm/test/tools/llvm-cov/Inputs/multiple-files.proftext
@@ -0,0 +1,19 @@
+f1
+0x0
+1
+1
+
+f2
+0x0
+1
+1
+
+f3
+0x0
+1
+1
+
+f4
+0x0
+1
+1
diff --git a/llvm/test/tools/llvm-cov/multiple-files.test b/llvm/test/tools/llvm-cov/multiple-files.test
new file mode 100644
index 00000000000..0b3fb855fed
--- /dev/null
+++ b/llvm/test/tools/llvm-cov/multiple-files.test
@@ -0,0 +1,9 @@
+// RUN: llvm-profdata merge %S/Inputs/multiple-files.proftext -o %t.profdata
+// RUN: llvm-cov report %S/Inputs/multiple-files.covmapping -instr-profile %t.profdata | FileCheck %s
+
+// CHECK: Filename
+// CHECK-NEXT: ---
+// CHECK-NEXT: {{^}}a{{[/\\]}}f2.c
+// CHECK-NEXT: {{^}}b{{[/\\]}}c{{[/\\]}}f4.c
+// CHECK-NEXT: {{^}}b{{[/\\]}}f3.c
+// CHECK-NEXT: {{^}}f1.c
OpenPOWER on IntegriCloud