dragonball: Makefile: add coverage target

Add "coverage" target to compute code coverage for dragonball.

Fixes: #7284

Signed-off-by: xuejun-xj <jiyunxue@linux.alibaba.com>
This commit is contained in:
xuejun-xj 2023-07-05 16:56:18 +08:00
parent 52100bb3dd
commit aedc586e14

View File

@ -39,12 +39,15 @@ clean:
test: test:
ifdef SUPPORT_VIRTUALIZATION ifdef SUPPORT_VIRTUALIZATION
cargo test --all-features --target $(TRIPLE) -- --nocapture RUST_BACKTRACE=1 cargo test --all-features --target $(TRIPLE) -- --nocapture --test-threads=1
else else
@echo "INFO: skip testing dragonball, it need virtualization support." @echo "INFO: skip testing dragonball, it need virtualization support."
exit 0 exit 0
endif endif
coverage:
RUST_BACKTRACE=1 cargo llvm-cov --all-features --target $(TRIPLE) -- --nocapture --test-threads=1
endif # ifeq ($(ARCH), s390x) endif # ifeq ($(ARCH), s390x)
.DEFAULT_GOAL := default .DEFAULT_GOAL := default