184dc971eSYing Yi // RUN: llvm-profdata merge -o %t.profdata %S/Inputs/showProjectSummary.proftext
284dc971eSYing Yi 
main(int argc,char ** argv)384dc971eSYing Yi int main(int argc, char ** argv) {
484dc971eSYing Yi   int x=0;
584dc971eSYing Yi   for (int i = 0; i < 20; ++i)
684dc971eSYing Yi     x *= 2;
784dc971eSYing Yi   if (x >= 100)
884dc971eSYing Yi     x = x / 2;
984dc971eSYing Yi   else
1084dc971eSYing Yi     x = x * 2;
1184dc971eSYing Yi   return x;
1284dc971eSYing Yi }
1384dc971eSYing Yi 
1484dc971eSYing Yi // Test console output.
15*e7ada98bSKeith Smiley // RUN: llvm-cov show %S/Inputs/showProjectSummary.covmapping -instr-profile %t.profdata -path-equivalence=/tmp,%S %s | FileCheck -check-prefixes=TEXT %S/Inputs/showProjectSummary.test
16*e7ada98bSKeith Smiley // RUN: llvm-cov show %S/Inputs/showProjectSummary.covmapping -instr-profile %t.profdata -path-equivalence=/tmp,%S -name=main %s | FileCheck -check-prefixes=TEXT %S/Inputs/showProjectSummary.test
17*e7ada98bSKeith Smiley // 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 %S/Inputs/showProjectSummary.test
18*e7ada98bSKeith Smiley // 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 %S/Inputs/showProjectSummary.test
199edfeac9SSean Eveson // RUN: llvm-cov show %S/Inputs/showProjectSummary.covmapping -instr-profile=%t.profdata -o %t.dir -path-equivalence=/tmp,%S %s
20cf125214SVedant Kumar // RUN: FileCheck -check-prefixes=TEXT-FOOTER -input-file=%t.dir/index.txt %S/Inputs/showProjectSummary.test
2184dc971eSYing Yi 
2284dc971eSYing Yi // Test html output.
239edfeac9SSean Eveson // RUN: llvm-cov show %S/Inputs/showProjectSummary.covmapping -format=html -o %t.dir -instr-profile %t.profdata -path-equivalence=/tmp,%S %s
24cf125214SVedant Kumar // RUN: FileCheck -check-prefixes=HTML,HTML-FILE,HTML-HEADER -input-file %t.dir/coverage/tmp/showProjectSummary.cpp.html %S/Inputs/showProjectSummary.test
259edfeac9SSean Eveson // 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
26cf125214SVedant Kumar // RUN: FileCheck -check-prefixes=HTML-TITLE,HTML,HTML-FILE,HTML-HEADER -input-file %t.dir/coverage/tmp/showProjectSummary.cpp.html %S/Inputs/showProjectSummary.test
27cf125214SVedant Kumar // RUN: FileCheck -check-prefixes=HTML-TITLE,HTML,HTML-FOOTER -input-file %t.dir/index.html %S/Inputs/showProjectSummary.test
28fa8ef35eSSean Eveson // 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
29fa8ef35eSSean Eveson // RUN: FileCheck -check-prefixes=HTML-TITLE,HTML,HTML-FOOTER -input-file %t.filtered.dir/index.html %S/Inputs/showProjectSummary.test
30