[ARM] Cortex-M4 schedule additions
[llvm-complete.git] / test / tools / llvm-cov / dir-with-filtering.test
blobcf49459b530bf69e58b4b38cb2894c75b8582820
1 RUN: llvm-profdata merge %S/Inputs/dir-with-filtering.proftext -o %t.profdata
3 // Test TEXT both files
5 RUN: llvm-cov show %S/Inputs/dir-with-filtering.covmapping -o %t.text -instr-profile %t.profdata -path-equivalence=/tmp,%S/Inputs -name=main -name=f2
7 RUN: FileCheck -input-file=%t.text/index.txt %s -check-prefix=TEXT-INDEX
8 TEXT-INDEX: dir-with-filtering1.cpp 1 0 100.00% 1 0 100.00% 4 0 100.00%
9 TEXT-INDEX: dir-with-filtering2.cpp 1 1 0.00% 1 1 0.00% 3 3 0.00%
11 RUN: FileCheck -input-file=%t.text/coverage/tmp/dir-with-filtering1.cpp.txt %s -check-prefix=TEXT-FILE1
12 TEXT-FILE1: Coverage Report
13 TEXT-FILE1-NOT: _Z2f1v:
14 TEXT-FILE1: main:
15 TEXT-FILE1-NEXT: {{.*}}int main()
16 TEXT-FILE1-NOT: _Z2f1v:
18 RUN: FileCheck -input-file=%t.text/coverage/tmp/dir-with-filtering2.cpp.txt %s -check-prefix=TEXT-FILE2
19 TEXT-FILE2: Coverage Report
20 TEXT-FILE2-NOT: _Z2f3v:
21 TEXT-FILE2: _Z2f2v:
22 TEXT-FILE2-NEXT: {{.*}}int f2()
23 TEXT-FILE2-NOT: _Z2f3v:
25 // Test TEXT one file
27 RUN: llvm-cov show %S/Inputs/dir-with-filtering.covmapping -o %t.text_one_file -instr-profile %t.profdata -path-equivalence=/tmp,%S/Inputs -name=main -name=f2 %S/Inputs/dir-with-filtering1.cpp
29 RUN: FileCheck -input-file=%t.text_one_file/index.txt %s -check-prefix=TEXT-INDEX-ONE-FILE
30 TEXT-INDEX-ONE-FILE: dir-with-filtering1.cpp 1 0 100.00% 1 0 100.00% 4 0 100.00%
31 TEXT-INDEX-ONE-FILE-NOT: dir-with-filtering2.cpp
33 RUN: FileCheck -input-file=%t.text_one_file/coverage/tmp/dir-with-filtering1.cpp.txt %s -check-prefix=TEXT-FILE1
35 // Test TEXT index file with all functions in one file filtered out
37 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
38 RUN: FileCheck -input-file=%t.text_one_func/index.txt %s -check-prefix=TEXT-INDEX-ONE-FUNC
40 TEXT-INDEX-ONE-FUNC-NOT: Files which contain no functions
41 TEXT-INDEX-ONE-FUNC-NOT: dir-with-filtering2.cpp
43 // Test HTML both files
45 RUN: llvm-profdata merge %S/Inputs/dir-with-filtering.proftext -o %t.profdata
46 RUN: llvm-cov show %S/Inputs/dir-with-filtering.covmapping -format html -o %t.html -instr-profile %t.profdata -path-equivalence=/tmp,%S/Inputs -name=main -name=f2
48 RUN: FileCheck -input-file=%t.html/index.html %s -check-prefix=HTML-INDEX
49 HTML-INDEX: <h2>Coverage Report</h2>
50 HTML-INDEX: dir-with-filtering1.cpp{{.*}}100.00% (1/1){{.*}}100.00% (4/4){{.*}}100.00% (1/1)
51 HTML-INDEX: dir-with-filtering2.cpp{{.*}}0.00% (0/1){{.*}}0.00% (0/3){{.*}}0.00% (0/1)
53 RUN: FileCheck -input-file=%t.html/coverage/tmp/dir-with-filtering1.cpp.html %s -check-prefix=HTML-FILE1
54 HTML-FILE1-NOT: <pre>f1</pre>
55 HTML-FILE1: <pre>main</pre>
56 HTML-FILE1-NOT: <pre>f1</pre>
57 HTML-FILE1: int main()
58 HTML-FILE1-NOT: <pre>f1</pre>
60 RUN: FileCheck -input-file=%t.html/coverage/tmp/dir-with-filtering2.cpp.html %s -check-prefix=HTML-FILE2
61 HTML-FILE2-NOT: <pre>f3</pre>
62 HTML-FILE2: <pre>_Z2f2v</pre>
63 HTML-FILE2-NOT: <pre>f3</pre>
64 HTML-FILE2: int f2()
65 HTML-FILE2-NOT: <pre>f3</pre>
67 // Test HTML one file
69 RUN: llvm-profdata merge %S/Inputs/dir-with-filtering.proftext -o %t.profdata
70 RUN: llvm-cov show %S/Inputs/dir-with-filtering.covmapping -format html -o %t.html_one_file -instr-profile %t.profdata -path-equivalence=/tmp,%S/Inputs -name=main -name=f2 %S/Inputs/dir-with-filtering1.cpp
72 RUN: FileCheck -input-file=%t.html_one_file/index.html %s -check-prefix=HTML-INDEX-ONE-FILE
73 HTML-INDEX-ONE-FILE: <h2>Coverage Report</h2>
74 HTML-INDEX-ONE-FILE: dir-with-filtering1.cpp{{.*}}100.00% (1/1){{.*}}100.00% (4/4){{.*}}100.00% (1/1)
75 HTML-INDEX-ONE-FILE-NOT: dir-with-filtering2.cpp
77 RUN: FileCheck -input-file=%t.html_one_file/coverage/tmp/dir-with-filtering1.cpp.html %s -check-prefix=HTML-FILE1
79 // Test HTML index file with all functions in one file filtered out
81 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
82 RUN: FileCheck -input-file=%t.html_one_func/index.html %s -check-prefix=HTML-INDEX-ONE-FUNC
84 HTML-INDEX-ONE-FUNC-NOT: Files which contain no functions
85 HTML-INDEX-ONE-FUNC-NOT: dir-with-filtering2.cpp