summaryrefslogtreecommitdiffstats
path: root/llvm/test/tools/llvm-cov
diff options
context:
space:
mode:
authorYing Yi <maggieyi666@gmail.com>2016-09-06 21:41:38 +0000
committerYing Yi <maggieyi666@gmail.com>2016-09-06 21:41:38 +0000
commit24e91bd05fec332b73a991fa1f59160ea1c1e18e (patch)
tree8e65166010889596601e08e24a5592560daaa0d3 /llvm/test/tools/llvm-cov
parent8a0e3f828a6712cf5098bb53ca082b5f87c7ea75 (diff)
downloadbcm5719-llvm-24e91bd05fec332b73a991fa1f59160ea1c1e18e.tar.gz
bcm5719-llvm-24e91bd05fec332b73a991fa1f59160ea1c1e18e.zip
[llvm-cov] Add the project summary to the text coverage report for each source file.
This patch is a spin-off from https://reviews.llvm.org/D23922. It extends the text view to preserve the same feature as the html view. Differential Revision: https://reviews.llvm.org/D24241 llvm-svn: 280756
Diffstat (limited to 'llvm/test/tools/llvm-cov')
-rw-r--r--llvm/test/tools/llvm-cov/native_separators.c5
-rw-r--r--llvm/test/tools/llvm-cov/showTemplateInstantiations.cpp6
2 files changed, 8 insertions, 3 deletions
diff --git a/llvm/test/tools/llvm-cov/native_separators.c b/llvm/test/tools/llvm-cov/native_separators.c
index 2133feb0b5c..e7659d7c145 100644
--- a/llvm/test/tools/llvm-cov/native_separators.c
+++ b/llvm/test/tools/llvm-cov/native_separators.c
@@ -20,6 +20,11 @@
int main() {}
+// RUN: llvm-cov show %S/Inputs/native_separators.covmapping -instr-profile=%t.profdata -filename-equivalence %s -o %t.dir
+// RUN: FileCheck -check-prefixes=TEXT -input-file=%t.dir/coverage/tmp/native_separators.c.txt %s
+// TEXT: {{^}}Source: \tmp\native_separators.c:{{$}}
+// TEXT: {{^}}Binary: {{.*}}tools\llvm-cov\Inputs\native_separators.covmapping:{{$}}
+
// Re-purpose this file to test that "Go to first unexecuted line" feature.
// RUN: llvm-cov show %S/Inputs/native_separators.covmapping -instr-profile %t.profdata -filename-equivalence -format html -o %t.dir %s
diff --git a/llvm/test/tools/llvm-cov/showTemplateInstantiations.cpp b/llvm/test/tools/llvm-cov/showTemplateInstantiations.cpp
index 5a656db9809..db9576d8b56 100644
--- a/llvm/test/tools/llvm-cov/showTemplateInstantiations.cpp
+++ b/llvm/test/tools/llvm-cov/showTemplateInstantiations.cpp
@@ -12,7 +12,7 @@ int func(T x) { // ALL-NEXT: [[@LINE]]| 2|int func(T x) {
int j = 1; // ALL-NEXT: [[@LINE]]| 0| int j = 1;
} // ALL-NEXT: [[@LINE]]| 2|}
- // SHARED: {{^ *(\| )?}}_Z4funcIbEiT_:
+ // SHARED: {{^ *(\| )?}}Function: _Z4funcIbEiT_:
// SHARED: [[@LINE-9]]| 1|int func(T x) {
// SHARED-NEXT: [[@LINE-9]]| 1| if(x)
// SHARED-NEXT: [[@LINE-9]]| 1| return 0;
@@ -21,8 +21,8 @@ int func(T x) { // ALL-NEXT: [[@LINE]]| 2|int func(T x) {
// SHARED-NEXT: [[@LINE-9]]| 0| int j = 1;
// SHARED-NEXT: [[@LINE-9]]| 1|}
- // ALL: {{^ *}}| _Z4funcIiEiT_:
- // FILTER-NOT: {{^ *(\| )?}} _Z4funcIiEiT_:
+ // ALL: {{^ *}}| Function: _Z4funcIiEiT_:
+ // FILTER-NOT: {{^ *(\| )?}}Function: _Z4funcIiEiT_:
// ALL: [[@LINE-19]]| 1|int func(T x) {
// ALL-NEXT: [[@LINE-19]]| 1| if(x)
// ALL-NEXT: [[@LINE-19]]| 0| return 0;
OpenPOWER on IntegriCloud