Skip to content

Commit 19b814d

Browse files
committed
coverage: update docs with baseline information
1 parent ee94648 commit 19b814d

File tree

1 file changed

+5
-35
lines changed

1 file changed

+5
-35
lines changed

tools/coverage/README.md

Lines changed: 5 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,17 @@
11
# Coverage tooling
22

3-
This project uses `llvm-cov` to generate coverage reports.
4-
5-
## 1. Key Features
6-
7-
1. **Local or Docker Setup:**
8-
You can generate coverage reports by either installing `llvm-cov` locally or using the project's Docker environment.
9-
10-
2. **Partial Coverage Reporting:**
11-
Currently, the reports are generated **without a baseline**, meaning only files touched during test execution are included.
12-
13-
**TODO:** Implement baseline generation to include all project files in the coverage report, even those not covered by tests.
14-
15-
## 2. Setup
16-
17-
To set up the required tools, follow these steps:
18-
19-
### 2.1. Without Docker
20-
21-
1. Update packages:
22-
23-
```bash
24-
sudo apt update
25-
```
26-
27-
2. Install LLVM Install the default version of LLVM:
28-
29-
```bash
30-
sudo apt install llvm
31-
```
32-
33-
### 2.2. Within Docker
34-
35-
For Docker setup, refer to the [README.md](../../README.md)
3+
This project uses `lcov` to generate coverage reports.
364

375
## How to Run
386

397
To generate a coverage report, run the following command:
408

419
```bash
42-
bazel run //tools:llvm_cov -- -t <test> -o <output_dir>
10+
bazel run //tools/coverage:lcov -- -t <test_target> -b <baseline_target> -o <output_dir> -c $(bazel info bazel-bin) -d $(bazel info bazel-testlogs)
4311
```
4412

45-
Replace <test> with the name of the test target and <output_dir> with the desired output directory for the report.
13+
- `<test_target>` is the name of the test target.
14+
- `<baseline_target>` corresponds to the target used to create the coverage baseline.
15+
- `<output_dir>` with the desired output directory for the report.
4616

4717
Open the generated `index.html` file in the output directory to review test coverage.

0 commit comments

Comments
 (0)