Ying Yi | 84dc971 | 2016-08-24 14:27:23 +0000 | [diff] [blame] | 1 | // RUN: llvm-profdata merge -o %t.profdata %S/Inputs/showProjectSummary.proftext |
| 2 | |
| 3 | int main(int argc, char ** argv) { |
| 4 | int x=0; |
| 5 | for (int i = 0; i < 20; ++i) |
| 6 | x *= 2; |
| 7 | if (x >= 100) |
| 8 | x = x / 2; |
| 9 | else |
| 10 | x = x * 2; |
| 11 | return x; |
| 12 | } |
| 13 | |
| 14 | // Test console output. |
Sean Eveson | 9edfeac | 2017-08-14 10:20:12 +0000 | [diff] [blame] | 15 | // RUN: llvm-cov show %S/Inputs/showProjectSummary.covmapping -instr-profile %t.profdata -path-equivalence=/tmp,%S %s | FileCheck -check-prefixes=TEXT,TEXT-FILE,TEXT-HEADER %S/Inputs/showProjectSummary.test |
Sean Eveson | ea9dcee | 2017-10-04 08:54:37 +0000 | [diff] [blame] | 16 | // RUN: llvm-cov show %S/Inputs/showProjectSummary.covmapping -instr-profile %t.profdata -path-equivalence=/tmp,%S -name=main %s | FileCheck -check-prefixes=TEXT,TEXT-FILE,TEXT-HEADER %S/Inputs/showProjectSummary.test |
Sean Eveson | 9edfeac | 2017-08-14 10:20:12 +0000 | [diff] [blame] | 17 | // RUN: llvm-cov show %S/Inputs/showProjectSummary.covmapping -instr-profile %t.profdata -project-title "Test Suite" -path-equivalence=/tmp,%S %s | FileCheck -check-prefixes=TEXT-TITLE,TEXT,TEXT-FILE,TEXT-HEADER %S/Inputs/showProjectSummary.test |
| 18 | // RUN: llvm-cov show %S/Inputs/showProjectSummary.covmapping -instr-profile %t.profdata -project-title "Test Suite" -name=main -path-equivalence=/tmp,%S %s | FileCheck -check-prefixes=TEXT-FUNCTION,TEXT-HEADER %S/Inputs/showProjectSummary.test |
| 19 | // RUN: llvm-cov show %S/Inputs/showProjectSummary.covmapping -instr-profile=%t.profdata -o %t.dir -path-equivalence=/tmp,%S %s |
Vedant Kumar | cf12521 | 2016-09-15 04:41:37 +0000 | [diff] [blame] | 20 | // RUN: FileCheck -check-prefixes=TEXT-FOOTER -input-file=%t.dir/index.txt %S/Inputs/showProjectSummary.test |
Ying Yi | 84dc971 | 2016-08-24 14:27:23 +0000 | [diff] [blame] | 21 | |
| 22 | // Test html output. |
Sean Eveson | 9edfeac | 2017-08-14 10:20:12 +0000 | [diff] [blame] | 23 | // RUN: llvm-cov show %S/Inputs/showProjectSummary.covmapping -format=html -o %t.dir -instr-profile %t.profdata -path-equivalence=/tmp,%S %s |
Vedant Kumar | cf12521 | 2016-09-15 04:41:37 +0000 | [diff] [blame] | 24 | // RUN: FileCheck -check-prefixes=HTML,HTML-FILE,HTML-HEADER -input-file %t.dir/coverage/tmp/showProjectSummary.cpp.html %S/Inputs/showProjectSummary.test |
Sean Eveson | 9edfeac | 2017-08-14 10:20:12 +0000 | [diff] [blame] | 25 | // RUN: llvm-cov show %S/Inputs/showProjectSummary.covmapping -format=html -o %t.dir -instr-profile %t.profdata -project-title "Test Suite" -path-equivalence=/tmp,%S %s |
Vedant Kumar | cf12521 | 2016-09-15 04:41:37 +0000 | [diff] [blame] | 26 | // RUN: FileCheck -check-prefixes=HTML-TITLE,HTML,HTML-FILE,HTML-HEADER -input-file %t.dir/coverage/tmp/showProjectSummary.cpp.html %S/Inputs/showProjectSummary.test |
| 27 | // RUN: FileCheck -check-prefixes=HTML-TITLE,HTML,HTML-FOOTER -input-file %t.dir/index.html %S/Inputs/showProjectSummary.test |
Sean Eveson | fa8ef35 | 2017-09-28 10:07:30 +0000 | [diff] [blame] | 28 | // RUN: llvm-cov show %S/Inputs/showProjectSummary.covmapping -format=html -o %t.filtered.dir -instr-profile %t.profdata -project-title "Test Suite" -path-equivalence=/tmp,%S -name=main %s |
| 29 | // RUN: FileCheck -check-prefixes=HTML-TITLE,HTML,HTML-FOOTER -input-file %t.filtered.dir/index.html %S/Inputs/showProjectSummary.test |