Skip to content

Commit

Permalink
Add references to jacoco/clang coverage docs in each other
Browse files Browse the repository at this point in the history
Bug: 1340699
Change-Id: Ia74ceced02342bac564a9233fb0b8c065eb65b40
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3760793
Auto-Submit: Prakhar Asthana <pasthana@google.com>
Reviewed-by: Zhaoyang Li <zhaoyangli@chromium.org>
Reviewed-by: Benjamin Joyce <bjoyce@chromium.org>
Commit-Queue: Benjamin Joyce <bjoyce@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1025347}
  • Loading branch information
Prakhar authored and Chromium LUCI CQ committed Jul 18, 2022
1 parent a45125c commit f41864b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
4 changes: 3 additions & 1 deletion build/android/docs/coverage.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Android code coverage instructions

These are instructions for collecting code coverage data for android
instrumentation and JUnit tests.
instrumentation and JUnit tests. For Clang(C++) code coverage refer to [clang coverage].

[TOC]

Expand Down Expand Up @@ -81,3 +81,5 @@ class files and runtime **.exec** files. Then we need to process them using the
--sources-json-dir out/java_coverage/ \
--include-substr-filter obj/clank
```

[clang coverage]: https://chromium.googlesource.com/chromium/src/+/HEAD/docs/testing/code_coverage.md
14 changes: 6 additions & 8 deletions docs/testing/code_coverage.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,13 @@ Table of contents:
- [Contacts](#contacts)
- [FAQ](#faq)

Chromium uses source-based code coverage for clang-compiled languages such as
C++. This [documentation] explains how to use Clang’s source-based coverage
features in general.

In this document, we first introduce the code coverage infrastructure that
This document is divided into two parts.
- The first part introduces the code coverage infrastructure that
continuously generates code coverage information for the whole codebase and for
specific CLs in Gerrit. For the latter, refer to
[code\_coverage\_in\_gerrit.md](code_coverage_in_gerrit.md).
We then present a script that can be used to locally generate code coverage
reports with one command, and finally we provide a description of the
process of producing these reports.
- The second part talks about how to generate code coverage locally for Clang-compiled languages like C++. Refer to [android code coverage instructions] for instructions for java code.

## Coverage Infrastructure

Expand Down Expand Up @@ -121,7 +117,8 @@ by CQ bot. Or see this
[15-second video tutorial](https://www.youtube.com/watch?v=cxXlYcSgIPE).

## Local Coverage Script
The [coverage script] automates the process described below and provides a
This [documentation] explains how to use Clang’s source-based coverage
features in general. The [coverage script] automates the process described below and provides a
one-stop service to generate code coverage reports locally in just one command.

This script is currently supported on Android, Linux, Mac, iOS and ChromeOS
Expand Down Expand Up @@ -356,3 +353,4 @@ Yes!
[How do crashes affect code coverage?]: #how-do-crashes-affect-code-coverage
[known issues]: https://bugs.chromium.org/p/chromium/issues/list?q=component:Infra%3ETest%3ECodeCoverage
[tools link]: https://storage.googleapis.com/chromium-browser-clang-staging/
[android code coverage instructions]: https://chromium.googlesource.com/chromium/src/+/HEAD/build/android/docs/coverage.md

0 comments on commit f41864b

Please sign in to comment.