OUT_DIR := target/coverage
OUT_FILE := $(OUT_DIR)/lcov.info
test:
@echo "Running tests..."
@cargo test --all-features
lcov:
@echo "Generating lcov.info..."
@mkdir -p $(OUT_DIR)
@cargo llvm-cov test --all-features --ignore-filename-regex "_test\.rs$$" --output-path $(OUT_FILE) --lcov
html:
@echo "Generating html coverage report..."
@mkdir -p $(OUT_DIR)
@cargo llvm-cov test --all-features --ignore-filename-regex "_test\.rs$$" --output-dir $(OUT_DIR) --open
branch:
@echo "Generate coverage with branch coverage..."
@mkdir -p $(OUT_DIR)
@cargo +nightly llvm-cov test --all-features --ignore-filename-regex "_test\.rs$$" --output-dir $(OUT_DIR) --open --branch
all:
@echo "Running all checks..."
@echo "Running cargo check---------------------------------------------"
@cargo check --all-features
@sleep 2
@echo "Running formatting---------------------------------------------"
@cargo fmt --all
@sleep 2
@echo "Running clippy---------------------------------------------"
@cargo clippy --all-features
@sleep 2
@echo "Running tests---------------------------------------------"
@cargo test --all-features