Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,18 @@
# See the License for the specific language governing permissions and
# limitations under the License.

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

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

setup-test-python:
uv sync --group dev

test_rust:
install-llvm-cov:
@cargo llvm-cov --version >/dev/null 2>&1 || (echo "[INFO] Installing cargo-llvm-cov..." && cargo install cargo-llvm-cov)

test_rust: install-llvm-cov
ifeq ($(HAS_NVIDIA),yes)
cd qdp && cargo llvm-cov test --workspace --exclude qdp-python --html --output-dir target/llvm-cov/html
cd qdp && cargo llvm-cov report --summary-only
Expand Down