diff --git a/scripts/dev_cli.sh b/scripts/dev_cli.sh index 27d7aab09..2b162f84c 100755 --- a/scripts/dev_cli.sh +++ b/scripts/dev_cli.sh @@ -183,10 +183,9 @@ cmd_help() { echo " --volumes Hash separated volumes to be exported. Example --volumes /mnt:/mnt#/myvol:/myvol" echo " --hypervisor Underlying hypervisor. Options kvm, mshv" echo "" - echo " tests [--unit|--cargo|--all] [--libc musl|gnu] [-- [] [-- []]] " + echo " tests [] [--libc musl|gnu] [-- [] [-- []]] " echo " Run the Cloud Hypervisor tests." echo " --unit Run the unit tests." - echo " --cargo Run the cargo tests." echo " --integration Run the integration tests." echo " --integration-sgx Run the SGX integration tests." echo " --integration-vfio Run the VFIO integration tests." @@ -314,7 +313,6 @@ cmd_clean() { cmd_tests() { unit=false - cargo=false integration=false integration_sgx=false integration_vfio=false @@ -332,7 +330,6 @@ cmd_tests() { exit 1 } ;; "--unit") { unit=true; } ;; - "--cargo") { cargo=true; } ;; "--integration") { integration=true; } ;; "--integration-sgx") { integration_sgx=true; } ;; "--integration-vfio") { integration_vfio=true; } ;; @@ -398,16 +395,6 @@ cmd_tests() { ./scripts/run_unit_tests.sh "$@" || fix_dir_perms $? || exit $? fi - if [ "$cargo" = true ]; then - say "Running cargo tests..." - $DOCKER_RUNTIME run \ - --workdir "$CTR_CLH_ROOT_DIR" \ - --rm \ - --volume "$CLH_ROOT_DIR:$CTR_CLH_ROOT_DIR" $exported_volumes \ - "$CTR_IMAGE" \ - ./scripts/run_cargo_tests.sh "$@" || fix_dir_perms $? || exit $? - fi - if [ "$integration" = true ]; then say "Running integration tests for $target..." $DOCKER_RUNTIME run \ diff --git a/scripts/run_cargo_tests.sh b/scripts/run_cargo_tests.sh deleted file mode 100755 index b088002bf..000000000 --- a/scripts/run_cargo_tests.sh +++ /dev/null @@ -1,26 +0,0 @@ -#!/bin/bash -set -e -set -x - -source $HOME/.cargo/env -source $(dirname "$0")/test-util.sh - -process_common_args "$@" - -# Install cargo components -time rustup component add clippy -time rustup component add rustfmt -time which cargo-audit || cargo install cargo-audit - -# Run cargo builds and checks -time cargo clippy --all-targets --all-features -- -D warnings -time cargo rustc --bin cloud-hypervisor -- -D warnings -time cargo rustc -p vhost_user_net --bin vhost_user_net -- -D warnings -time cargo test -time cargo audit -time cargo clippy --all-targets --no-default-features --features "acpi,$hypervisor" -- -D warnings -time cargo rustc --bin cloud-hypervisor --no-default-features --features "acpi,$hypervisor" -- -D warnings -time cargo clippy --all-targets --no-default-features --features "$hypervisor" -- -D warnings -time cargo rustc --bin cloud-hypervisor --no-default-features --features "$hypervisor" -- -D warnings -time cargo fmt -- --check -time cargo build --all --release