summaryrefslogtreecommitdiffstats
path: root/llvm/test
diff options
context:
space:
mode:
authorEli Friedman <efriedma@codeaurora.org>2017-09-11 22:56:20 +0000
committerEli Friedman <efriedma@codeaurora.org>2017-09-11 22:56:20 +0000
commit50479f60c40106de3fc5a54b572ccc806f79958a (patch)
tree3ace56b1798d2fa4123c3741e9e0f9f783e0d996 /llvm/test
parentb9b60253281e5ddd90c7be033099e6d78e94c30e (diff)
downloadbcm5719-llvm-50479f60c40106de3fc5a54b572ccc806f79958a.tar.gz
bcm5719-llvm-50479f60c40106de3fc5a54b572ccc806f79958a.zip
[llvm-cov] Allow hiding instantiation/region coverage from summary tables
Region coverage is difficult to explain without going deep into how coverage is implemented. Instantiation coverage is easier to explain, but probably not useful in most cases (templates don't exist in C, and most C++ code contains relatively few templates). This patch adds the options "-show-region-summary" and "-show-instantiation-summary" to allow hiding those columns. "-show-instantiation-summary" is turned off by default. llvm-svn: 312969
Diffstat (limited to 'llvm/test')
-rw-r--r--llvm/test/tools/llvm-cov/hideUnexecutedSubviews.test4
-rw-r--r--llvm/test/tools/llvm-cov/report.cpp2
-rw-r--r--llvm/test/tools/llvm-cov/showLineExecutionCounts.cpp3
3 files changed, 3 insertions, 6 deletions
diff --git a/llvm/test/tools/llvm-cov/hideUnexecutedSubviews.test b/llvm/test/tools/llvm-cov/hideUnexecutedSubviews.test
index f97c0ff176a..20f0a43fc02 100644
--- a/llvm/test/tools/llvm-cov/hideUnexecutedSubviews.test
+++ b/llvm/test/tools/llvm-cov/hideUnexecutedSubviews.test
@@ -1,8 +1,8 @@
RUN: llvm-profdata merge %S/Inputs/hideUnexecutedSubviews.proftext -o %t.profdata
-RUN: llvm-cov show %S/Inputs/templateInstantiations.covmapping -instr-profile %t.profdata -path-equivalence=/tmp,%S %S/showTemplateInstantiations.cpp | FileCheck -check-prefix=FILE %s
+RUN: llvm-cov show %S/Inputs/templateInstantiations.covmapping -instr-profile %t.profdata -show-region-summary -show-instantiation-summary -path-equivalence=/tmp,%S %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 -path-equivalence=/tmp,%S %S/showTemplateInstantiations.cpp
+RUN: llvm-cov show %S/Inputs/templateInstantiations.covmapping -instr-profile %t.profdata -format html -show-region-summary -show-instantiation-summary -o %t.html.dir -path-equivalence=/tmp,%S %S/showTemplateInstantiations.cpp
RUN: FileCheck -check-prefix=FILE %s -input-file %t.html.dir/coverage/tmp/showTemplateInstantiations.cpp.html
FILE: Unexecuted instantiation: _Z4funcIbEiT_
diff --git a/llvm/test/tools/llvm-cov/report.cpp b/llvm/test/tools/llvm-cov/report.cpp
index 92f8158db58..af2ef98d687 100644
--- a/llvm/test/tools/llvm-cov/report.cpp
+++ b/llvm/test/tools/llvm-cov/report.cpp
@@ -1,4 +1,4 @@
-// RUN: llvm-cov report %S/Inputs/report.covmapping -instr-profile %S/Inputs/report.profdata -path-equivalence=,%S 2>&1 | FileCheck %s
+// RUN: llvm-cov report %S/Inputs/report.covmapping -instr-profile %S/Inputs/report.profdata -path-equivalence=,%S 2>&1 -show-region-summary -show-instantiation-summary | FileCheck %s
// RUN: llvm-cov report -show-functions %S/Inputs/report.covmapping -instr-profile %S/Inputs/report.profdata -path-equivalence=,%S %s 2>&1 | FileCheck -check-prefix=FILT %s
// RUN: llvm-cov report -show-functions %S/Inputs/report.covmapping -instr-profile %S/Inputs/report.profdata -path-equivalence=,%S %s does-not-exist.cpp 2>&1 | FileCheck -check-prefix=FILT %s
diff --git a/llvm/test/tools/llvm-cov/showLineExecutionCounts.cpp b/llvm/test/tools/llvm-cov/showLineExecutionCounts.cpp
index ab0987ee756..39d31d20dd1 100644
--- a/llvm/test/tools/llvm-cov/showLineExecutionCounts.cpp
+++ b/llvm/test/tools/llvm-cov/showLineExecutionCounts.cpp
@@ -80,14 +80,11 @@ 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