File tree Expand file tree Collapse file tree 1 file changed +5
-35
lines changed Expand file tree Collapse file tree 1 file changed +5
-35
lines changed Original file line number Diff line number Diff line change 1
1
# Coverage tooling
2
2
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.
36
4
37
5
## How to Run
38
6
39
7
To generate a coverage report, run the following command:
40
8
41
9
``` 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 )
43
11
```
44
12
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.
46
16
47
17
Open the generated ` index.html ` file in the output directory to review test coverage.
You can’t perform that action at this time.
0 commit comments