Skip to content

Commit 5c99c90

Browse files
ryzhakmattsse
andauthored
build: add test-coverage script (#10894)
Co-authored-by: Matthias Seitz <[email protected]>
1 parent 376bae5 commit 5c99c90

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

Makefile

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,15 @@ docker-build-prepare: ## Prepare the Docker build environment.
7777

7878
##@ Test
7979

80+
## Run unit/doc tests and generate html coverage report in `target/llvm-cov/html` folder.
81+
## Notice that `llvm-cov` supports doc tests only in nightly builds because the `--doc` flag
82+
## is unstable (https://github.com/taiki-e/cargo-llvm-cov/issues/2).
83+
.PHONY: test-coverage
84+
test-coverage:
85+
cargo +nightly llvm-cov --no-report nextest -E 'kind(test) & !test(/\b(issue|ext_integration)/)' && \
86+
cargo +nightly llvm-cov --no-report --doc && \
87+
cargo +nightly llvm-cov report --doctests --open
88+
8089
.PHONY: test-unit
8190
test-unit: ## Run unit tests.
8291
cargo nextest run -E 'kind(test) & !test(/\b(issue|ext_integration)/)'

0 commit comments

Comments
 (0)