diff options
| author | Sean Eveson <eveson.sean@gmail.com> | 2017-10-03 11:05:28 +0000 |
|---|---|---|
| committer | Sean Eveson <eveson.sean@gmail.com> | 2017-10-03 11:05:28 +0000 |
| commit | d932b2d7631aea7a4788e49c8066759d7ac678e6 (patch) | |
| tree | 2e775a1e6cf0d8be94167cc263bb31949eb4a604 /llvm/test/tools/llvm-cov | |
| parent | 90cc1b53d0ca1e614ee4b01e5264d3751f8953e1 (diff) | |
| download | bcm5719-llvm-d932b2d7631aea7a4788e49c8066759d7ac678e6.tar.gz bcm5719-llvm-d932b2d7631aea7a4788e49c8066759d7ac678e6.zip | |
[llvm-cov] Hide files with no coverage from the index when filtering by name
Differential Revision: https://reviews.llvm.org/D38457
llvm-svn: 314782
Diffstat (limited to 'llvm/test/tools/llvm-cov')
| -rw-r--r-- | llvm/test/tools/llvm-cov/dir-with-filtering.test | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/llvm/test/tools/llvm-cov/dir-with-filtering.test b/llvm/test/tools/llvm-cov/dir-with-filtering.test index f3b68ddf763..92494232b9b 100644 --- a/llvm/test/tools/llvm-cov/dir-with-filtering.test +++ b/llvm/test/tools/llvm-cov/dir-with-filtering.test @@ -32,6 +32,14 @@ TEXT-INDEX-ONE-FILE-NOT: dir-with-filtering2.cpp RUN: FileCheck -input-file=%t.text_one_file/coverage/tmp/dir-with-filtering1.cpp.txt %s -check-prefix=TEXT-FILE1
+// Test TEXT index file with all functions in one file filtered out
+
+RUN: llvm-cov show %S/Inputs/dir-with-filtering.covmapping -o %t.text_one_func -instr-profile %t.profdata -path-equivalence=/tmp,%S/Inputs -name=main
+RUN: FileCheck -input-file=%t.text_one_func/index.txt %s -check-prefix=TEXT-INDEX-ONE-FUNC
+
+TEXT-INDEX-ONE-FUNC-NOT: Files which contain no functions
+TEXT-INDEX-ONE-FUNC-NOT: dir-with-filtering2.cpp
+
// Test HTML both files
RUN: llvm-profdata merge %S/Inputs/dir-with-filtering.proftext -o %t.profdata
@@ -67,3 +75,11 @@ HTML-INDEX-ONE-FILE: dir-with-filtering1.cpp{{.*}}100.00% (1/1){{.*}}100.00% (4/ HTML-INDEX-ONE-FILE-NOT: dir-with-filtering2.cpp
RUN: FileCheck -input-file=%t.html_one_file/coverage/tmp/dir-with-filtering1.cpp.html %s -check-prefix=HTML-FILE1
+
+// Test HTML index file with all functions in one file filtered out
+
+RUN: llvm-cov show %S/Inputs/dir-with-filtering.covmapping -format html -o %t.html_one_func -instr-profile %t.profdata -path-equivalence=/tmp,%S/Inputs -name=main
+RUN: FileCheck -input-file=%t.html_one_func/index.html %s -check-prefix=HTML-INDEX-ONE-FUNC
+
+HTML-INDEX-ONE-FUNC-NOT: Files which contain no functions
+HTML-INDEX-ONE-FUNC-NOT: dir-with-filtering2.cpp
|

