Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / llvm / test / tools / llvm-cov / coverage_watermark.test
blob1c0408dd0078c9b0744fbda81987b784f7477376
1 RUN: not llvm-cov show --instr-profile=/dev/null -coverage-watermark=foo /dev/null 2>&1 | FileCheck --check-prefix=INVALID-ARG %s
2 INVALID-ARG: error: -coverage-watermark: invalid argument 'foo', must be in format 'high,low'
4 RUN: not llvm-cov show --instr-profile=/dev/null -coverage-watermark=a,2 /dev/null 2>&1 | FileCheck --check-prefix=INVALID-HIGH %s
5 INVALID-HIGH: error: -coverage-watermark: invalid number 'a', invalid value for 'high'
7 RUN: not llvm-cov show --instr-profile=/dev/null -coverage-watermark=10,b /dev/null 2>&1 | FileCheck --check-prefix=INVALID-LOW %s
8 INVALID-LOW: error: -coverage-watermark: invalid number 'b', invalid value for 'low'
10 RUN: not llvm-cov show --instr-profile=/dev/null -coverage-watermark=10,20 /dev/null 2>&1 | FileCheck --check-prefix=INVALID-ARRANGE %s
11 INVALID-ARRANGE: error: -coverage-watermark: invalid number range '10,20', must be both high and low should be between 0-100, and high > low
13 RUN: llvm-cov show %S/Inputs/templateInstantiations.covmapping -instr-profile %S/Inputs/templateInstantiations.profdata -format html -show-region-summary -show-instantiation-summary -o %t.html.dir -path-equivalence=/tmp,%S %S/showTemplateInstantiations.cpp
14 RUN: FileCheck -check-prefix=ORIGIN %s -input-file %t.html.dir/index.html
16 ORIGIN: <td class='column-entry-green'>
17 ORIGIN: 100.00% (3/3)
18 ORIGIN: <td class='column-entry-red'>
19 ORIGIN: 75.00% (9/12)
20 ORIGIN: <td class='column-entry-red'>
21 ORIGIN: 66.67% (4/6)
23 RUN: llvm-cov show %S/Inputs/templateInstantiations.covmapping -instr-profile %S/Inputs/templateInstantiations.profdata -format html -show-region-summary -show-instantiation-summary -o %t.html.dir -path-equivalence=/tmp,%S -coverage-watermark 80,60 %S/showTemplateInstantiations.cpp
24 RUN: FileCheck -check-prefix=DOWNGRADE1 %s -input-file %t.html.dir/index.html
26 DOWNGRADE1: <td class='column-entry-green'>
27 DOWNGRADE1: 100.00% (3/3)
28 DOWNGRADE1: <td class='column-entry-yellow'>
29 DOWNGRADE1: 75.00% (9/12)
30 DOWNGRADE1: <td class='column-entry-red'>
31 DOWNGRADE1: 66.67% (4/6)
33 RUN: llvm-cov show %S/Inputs/templateInstantiations.covmapping -instr-profile %S/Inputs/templateInstantiations.profdata -format html -show-region-summary -show-instantiation-summary -o %t.html.dir -path-equivalence=/tmp,%S -coverage-watermark 70,50 %S/showTemplateInstantiations.cpp
34 RUN: FileCheck -check-prefix=DOWNGRADE2 %s -input-file %t.html.dir/index.html
36 DOWNGRADE2: <td class='column-entry-green'>
37 DOWNGRADE2: 100.00% (3/3)
38 DOWNGRADE2: <td class='column-entry-green'>
39 DOWNGRADE2: 75.00% (9/12)
40 DOWNGRADE2: <td class='column-entry-yellow'>
41 DOWNGRADE2: 66.67% (4/6)