summaryrefslogtreecommitdiffstats
path: root/llvm/test
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/test')
-rw-r--r--llvm/test/tools/llvm-cov/Inputs/hideUnexecutedSubviews.proftext2
-rw-r--r--llvm/test/tools/llvm-cov/hideUnexecutedSubviews.test26
-rw-r--r--llvm/test/tools/llvm-cov/report.cpp6
-rw-r--r--llvm/test/tools/llvm-cov/showLineExecutionCounts.cpp3
4 files changed, 28 insertions, 9 deletions
diff --git a/llvm/test/tools/llvm-cov/Inputs/hideUnexecutedSubviews.proftext b/llvm/test/tools/llvm-cov/Inputs/hideUnexecutedSubviews.proftext
index e31d562d716..8ef6eaeaf54 100644
--- a/llvm/test/tools/llvm-cov/Inputs/hideUnexecutedSubviews.proftext
+++ b/llvm/test/tools/llvm-cov/Inputs/hideUnexecutedSubviews.proftext
@@ -13,4 +13,4 @@ _Z4funcIiEiT_
main
0
1
-0
+1
diff --git a/llvm/test/tools/llvm-cov/hideUnexecutedSubviews.test b/llvm/test/tools/llvm-cov/hideUnexecutedSubviews.test
index 44a788401d8..646c6e5aec4 100644
--- a/llvm/test/tools/llvm-cov/hideUnexecutedSubviews.test
+++ b/llvm/test/tools/llvm-cov/hideUnexecutedSubviews.test
@@ -1,10 +1,26 @@
RUN: llvm-profdata merge %S/Inputs/hideUnexecutedSubviews.proftext -o %t.profdata
-RUN: llvm-cov show %S/Inputs/templateInstantiations.covmapping -instr-profile %t.profdata -filename-equivalence %S/showTemplateInstantiations.cpp | FileCheck %s
+RUN: llvm-cov show %S/Inputs/templateInstantiations.covmapping -instr-profile %t.profdata -filename-equivalence %S/showTemplateInstantiations.cpp | FileCheck -check-prefix=FILE %s
RUN: llvm-cov show %S/Inputs/templateInstantiations.covmapping -instr-profile %t.profdata -format html -o %t.html.dir -filename-equivalence %S/showTemplateInstantiations.cpp
-RUN: FileCheck %s -input-file %t.html.dir/coverage/tmp/showTemplateInstantiations.cpp.html
+RUN: FileCheck -check-prefix=FILE %s -input-file %t.html.dir/coverage/tmp/showTemplateInstantiations.cpp.html
-CHECK: Unexecuted instantiation: _Z4funcIbEiT_
-CHECK: Unexecuted instantiation: _Z4funcIiEiT_
-CHECK-NOT: Unexecuted instantiation
+FILE: Unexecuted instantiation: _Z4funcIbEiT_
+FILE: Unexecuted instantiation: _Z4funcIiEiT_
+FILE-NOT: Unexecuted instantiation
+
+RUN: FileCheck -check-prefix=INDEX %s -input-file %t.html.dir/index.html
+
+INDEX: <td class='column-entry-left'>Filename</td>
+INDEX: <td class='column-entry'>Function Coverage</td>
+INDEX: <td class='column-entry'>Instantiation Coverage</td>
+INDEX: <td class='column-entry'>Line Coverage</td>
+INDEX: <td class='column-entry'>Region Coverage</td>
+INDEX: <td class='column-entry-red'>
+INDEX: 50.00% (1/2)
+INDEX: <td class='column-entry-red'>
+INDEX: 33.33% (1/3)
+INDEX: <td class='column-entry-red'>
+INDEX: 41.67% (5/12)
+INDEX: <td class='column-entry-red'>
+INDEX: 20.00% (1/5)
diff --git a/llvm/test/tools/llvm-cov/report.cpp b/llvm/test/tools/llvm-cov/report.cpp
index e8563271dac..824442f99c4 100644
--- a/llvm/test/tools/llvm-cov/report.cpp
+++ b/llvm/test/tools/llvm-cov/report.cpp
@@ -1,11 +1,11 @@
// RUN: llvm-cov report %S/Inputs/report.covmapping -instr-profile %S/Inputs/report.profdata -filename-equivalence 2>&1 | FileCheck %s
// RUN: llvm-cov report %S/Inputs/report.covmapping -instr-profile %S/Inputs/report.profdata -filename-equivalence report.cpp 2>&1 | FileCheck -check-prefix=FILT-NEXT %s
-// CHECK: Filename Regions Missed Regions Cover Functions Missed Functions Executed Lines Missed Lines Cover
+// CHECK: Regions Missed Regions Cover Functions Missed Functions Executed Instantiations Missed Insts. Executed Lines Missed Lines Cover
// CHECK-NEXT: ---
-// CHECK-NEXT: report.cpp 5 2 60.00% 4 1 75.00% 13 4 69.23%
+// CHECK-NEXT: report.cpp 5 2 60.00% 4 1 75.00% 4 1 75.00% 13 4 69.23%
// CHECK-NEXT: ---
-// CHECK-NEXT: TOTAL 5 2 60.00% 4 1 75.00% 13 4 69.23%
+// CHECK-NEXT: TOTAL 5 2 60.00% 4 1 75.00% 4 1 75.00% 13 4 69.23%
// FILT: File 'report.cpp':
// FILT-NEXT: Name Regions Miss Cover Lines Miss Cover
diff --git a/llvm/test/tools/llvm-cov/showLineExecutionCounts.cpp b/llvm/test/tools/llvm-cov/showLineExecutionCounts.cpp
index fcaedcd0d39..501eb0db6ea 100644
--- a/llvm/test/tools/llvm-cov/showLineExecutionCounts.cpp
+++ b/llvm/test/tools/llvm-cov/showLineExecutionCounts.cpp
@@ -80,11 +80,14 @@ int main() { // TEXT: [[@LINE]]| 161|int main(
// HTML-INDEX-LABEL: <table>
// HTML-INDEX: <td class='column-entry-left'>Filename</td>
// HTML-INDEX: <td class='column-entry'>Function Coverage</td>
+// HTML-INDEX: <td class='column-entry'>Instantiation Coverage</td>
// HTML-INDEX: <td class='column-entry'>Line Coverage</td>
// HTML-INDEX: <td class='column-entry'>Region Coverage</td>
// HTML-INDEX: <a href='coverage{{.*}}showLineExecutionCounts.cpp.html'{{.*}}showLineExecutionCounts.cpp</a>
// HTML-INDEX: <td class='column-entry-green'>
// HTML-INDEX: 100.00% (1/1)
+// HTML-INDEX: <td class='column-entry-green'>
+// HTML-INDEX: 100.00% (1/1)
// HTML-INDEX: <td class='column-entry-yellow'>
// HTML-INDEX: 80.00% (16/20)
// HTML-INDEX: <td class='column-entry-red'>
OpenPOWER on IntegriCloud