cloud-hypervisor/scripts/run_unit_tests.sh
Rob Bradford 134bcd84e6 tests: Use the workspace to unit test all the crates
Make all the crates members of the workspace so that "cargo test
--workspace" will find them all and test them with the features enabled
that we use.

Signed-off-by: Rob Bradford <robert.bradford@intel.com>
2020-01-03 10:20:53 +01:00

15 lines
302 B
Bash
Executable File

#!/bin/bash
source $HOME/.cargo/env
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
export RUST_BACKTRACE=1
cargo test --workspace || exit 1;
EOF