diff --git a/Cargo.toml b/Cargo.toml index a08e9205f..a32903134 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -48,5 +48,20 @@ integration_tests = [] [workspace] members = [ + "arch", + "devices", + "vhost_rs", + "qcow", + "pci", + "vmm", + "vm-virtio", + "vm-device", "vhost_user_backend", + "vhost_user_fs", + "vfio", + "net_util", + "acpi_tables", + "arch_gen", + "net_gen", + "vm-allocator", ] diff --git a/scripts/run_unit_tests.sh b/scripts/run_unit_tests.sh index 13504d5f5..0873ad08d 100755 --- a/scripts/run_unit_tests.sh +++ b/scripts/run_unit_tests.sh @@ -2,23 +2,13 @@ source $HOME/.cargo/env -# More effective than just cargo test --all as it captures crates within crates -for f in $(find . -name Cargo.toml -printf '%h\n' | sort -u); do - pushd $f > /dev/null; - cargo test --no-run || exit 1; - popd > /dev/null; -done - +cargo test --workspace --no-run pushd target/debug ls | grep net_util | grep -v "\.d" | xargs -n 1 sudo setcap cap_net_admin,cap_net_raw+ep popd sudo adduser $USER kvm newgrp kvm << EOF || exit 1 -for f in \$(find . -name Cargo.toml -printf '%h\n' | sort -u); do - pushd \$f > /dev/null; export RUST_BACKTRACE=1 - cargo test || exit 1; - popd > /dev/null; -done + cargo test --workspace || exit 1; EOF