That allows to get the same data as produced by "llvm-cov report",
but in JSON format, which is better for further processing by end users.
Details
Details
Diff Detail
Diff Detail
- Build Status
Buildable 12990 Build 12990: arc lint + arc unit
Event Timeline
Comment Actions
Vedant, please take a look at this little change when you'll have a few minutes :) This change would simplify code coverage integration on OSS-Fuzz and Chromium side.
Comment Actions
Thanks Max! Lgtm with a basic test, e.g;
diff --git a/test/tools/llvm-cov/showLineExecutionCounts.cpp b/test/tools/llvm-cov/showLineExecutionCounts.cpp index c4b76824aac..f4b0424cee4 100644 --- a/test/tools/llvm-cov/showLineExecutionCounts.cpp +++ b/test/tools/llvm-cov/showLineExecutionCounts.cpp @@ -39,6 +39,9 @@ int main() { // TEXT: [[@LINE]]| 161|int main( // RUN: FileCheck -input-file %t.export.json %S/Inputs/lineExecutionCounts.json // RUN: cat %t.export.json | %python -c "import json, sys; json.loads(sys.stdin.read())" // +// RUN: llvm-cov export %S/Inputs/lineExecutionCounts.covmapping -instr-profile %t.profdata 2>/dev/null -summary-only > %t.export-summary.json +// RUN: not grep '"name":"main"' %t.export-summary.json +// // Test html output. // RUN: llvm-cov show %S/Inputs/lineExecutionCounts.covmapping -format html -o %t.html.dir -instr-profile %t.profdata -path-equivalence=/tmp,%S %s // RUN: llvm-cov show %S/Inputs/lineExecutionCounts.covmapping -format html -o %t.html.filtered.dir -instr-profile %t.profdata -path-equivalence=/tmp,%S -name=main %s
test/tools/llvm-cov/showLineExecutionCounts.cpp | ||
---|---|---|
74 ↗ | (On Diff #126459) | This test case was a mess... I've simplified it in r320439, sorry for the trouble. |
test/tools/llvm-cov/showLineExecutionCounts.cpp | ||
---|---|---|
74 ↗ | (On Diff #126459) | Cool, thanks Vedant! |