mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2025-01-21 20:15:21 +00:00
script: cargo: Improve the cargo tests
We don't need to force the cargo-audit install, we can check if it's already available instead and install if it's not. Also, since we now have workspaces properly setup, we can call directly into cargo fmt and avoid calling into find magic incantation. Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
This commit is contained in:
parent
db6f894e5e
commit
76087f1235
@ -7,7 +7,7 @@ source $HOME/.cargo/env
|
||||
# Install cargo components
|
||||
time rustup component add clippy
|
||||
time rustup component add rustfmt
|
||||
time cargo install --force cargo-audit
|
||||
time which cargo-audit || cargo install cargo-audit
|
||||
|
||||
# Run cargo builds and checks
|
||||
time cargo clippy --all-targets --all-features -- -D warnings
|
||||
@ -24,5 +24,5 @@ time cargo rustc --bin vhost_user_net --no-default-features --features "pci" --
|
||||
time cargo clippy --all-targets --no-default-features --features "mmio" -- -D warnings
|
||||
time cargo rustc --bin cloud-hypervisor --no-default-features --features "mmio" -- -D warnings
|
||||
time cargo rustc --bin vhost_user_net --no-default-features --features "mmio" -- -D warnings
|
||||
time sh -c 'find . \( -name "*.rs" ! -wholename "*/out/*.rs" \) | xargs rustfmt --check'
|
||||
time cargo fmt
|
||||
time cargo build --release
|
||||
|
Loading…
x
Reference in New Issue
Block a user