-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSource-based Code Coverage.html
42 lines (35 loc) · 1.19 KB
/
Source-based Code Coverage.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
<!DOCTYPE html>
<html>
<head>
<link rel="Stylesheet" type="text/css" href="style.css">
<title>Source-based Code Coverage</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body>
<ol>
<li>
Build llvm with coverage reporting enabled.
See: <a href="https://clang.llvm.org/docs/SourceBasedCodeCoverage.html#collecting-coverage-reports-for-the-llvm-project">https://clang.llvm.org/docs/SourceBasedCodeCoverage.html#collecting-coverage-reports-for-the-llvm-project</a>
<li>
Collect profiles by running tests. (llvm-lit llvm/test/MC/Hexagon)
<li>
Use prepare-code-coverage-artifact.py in "--only-merge" mode to merge
your profiles together.
<ul>
<li>
lvm/utils/prepare-code-coverage-artifact.py build/bin/llvm-profdata
build/bin/llvm-cov
build/profiles/
html_report/
build/lib/libLLVMHexagon*
--unified-report
--use-existing-profdata build/profiles/Coverage.profdata
--restrict llvm/lib/Target/Hexagon/
</ul>
<li>
Use prepare-code-coverage-artifact.py again to emit an html report,
passing in "--use-existing-profdata path/to/merged/profile".
</ol>
</body>
</html>