mirror of
https://github.com/QuixiAI/nvdriver.git
synced 2026-12-06 06:28:39 +00:00
21 lines
558 B
Bash
21 lines
558 B
Bash
#!/bin/bash
|
|
set -euo pipefail
|
|
repo=$(cd "$(dirname "$0")/.." && pwd)
|
|
work=$(mktemp -d)
|
|
trap 'rm -rf "$work"' EXIT
|
|
cat > "$work/Cargo.toml" <<EOF
|
|
[package]
|
|
name="nv-firmware-owner-test"
|
|
version="0.1.0"
|
|
edition="2024"
|
|
[dependencies]
|
|
nv-rs-core={path="$repo/src/nvidia"}
|
|
[[test]]
|
|
name="owner"
|
|
path="$repo/tests/firmware-unpack/owner.rs"
|
|
EOF
|
|
export PATH="${CARGO_HOME:-$HOME/.cargo}/bin:$HOME/.cargo/bin:$PATH"
|
|
CARGO=${CARGO:-cargo}
|
|
"$CARGO" test --manifest-path "$work/Cargo.toml"
|
|
"$CARGO" clippy --manifest-path "$work/Cargo.toml" --all-targets -- -D warnings
|