Skip to content

Commit b8bc958

Browse files
committed
make test_rust will automatically install cargo-llvm-cov if it's not found
1 parent 88eb7d1 commit b8bc958

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

Makefile

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,18 @@
1414
# See the License for the specific language governing permissions and
1515
# limitations under the License.
1616

17-
.PHONY: test_rust test_python tests pre-commit setup-test-python
17+
.PHONY: test_rust test_python tests pre-commit setup-test-python install-llvm-cov
1818

1919
# Detect NVIDIA GPU
2020
HAS_NVIDIA := $(shell command -v nvidia-smi >/dev/null 2>&1 && nvidia-smi -L >/dev/null 2>&1 && echo yes || echo no)
2121

2222
setup-test-python:
2323
uv sync --group dev
2424

25-
test_rust:
25+
install-llvm-cov:
26+
@cargo llvm-cov --version >/dev/null 2>&1 || (echo "[INFO] Installing cargo-llvm-cov..." && cargo install cargo-llvm-cov)
27+
28+
test_rust: install-llvm-cov
2629
ifeq ($(HAS_NVIDIA),yes)
2730
cd qdp && cargo llvm-cov test --workspace --exclude qdp-python --html --output-dir target/llvm-cov/html
2831
cd qdp && cargo llvm-cov report --summary-only

0 commit comments

Comments
 (0)