blob: cbf029eab641095df0560a7ad8147085ee76b67c [file] [log] [blame]
Ying Yi84dc9712016-08-24 14:27:23 +00001// RUN: llvm-profdata merge -o %t.profdata %S/Inputs/showProjectSummary.proftext
2
3int 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 Eveson9edfeac2017-08-14 10:20:12 +000015// 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 Evesonea9dcee2017-10-04 08:54:37 +000016// 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 Eveson9edfeac2017-08-14 10:20:12 +000017// 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 Kumarcf125212016-09-15 04:41:37 +000020// RUN: FileCheck -check-prefixes=TEXT-FOOTER -input-file=%t.dir/index.txt %S/Inputs/showProjectSummary.test
Ying Yi84dc9712016-08-24 14:27:23 +000021
22// Test html output.
Sean Eveson9edfeac2017-08-14 10:20:12 +000023// RUN: llvm-cov show %S/Inputs/showProjectSummary.covmapping -format=html -o %t.dir -instr-profile %t.profdata -path-equivalence=/tmp,%S %s
Vedant Kumarcf125212016-09-15 04:41:37 +000024// RUN: FileCheck -check-prefixes=HTML,HTML-FILE,HTML-HEADER -input-file %t.dir/coverage/tmp/showProjectSummary.cpp.html %S/Inputs/showProjectSummary.test
Sean Eveson9edfeac2017-08-14 10:20:12 +000025// 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 Kumarcf125212016-09-15 04:41:37 +000026// 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 Evesonfa8ef352017-09-28 10:07:30 +000028// 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