mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
ci: Simplify test scripts
Since all unit and integration tests are run inside containers because they are called from dev_cli.sh, they always run as root. That's why both unit and integration scripts can be simplified as they don't need to apply specific capabilities and run cargo tests in a dedicated 'kvm' group. Fixes #1683 Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
This commit is contained in:
@@ -7,13 +7,5 @@ cargo_args=("$@")
|
||||
[ $(uname -m) = "aarch64" ] && cargo_args+=("--no-default-features")
|
||||
[ $(uname -m) = "aarch64" ] && cargo_args+=("--features mmio,kvm")
|
||||
|
||||
cargo test --target $BUILD_TARGET --workspace --no-run ${cargo_args[@]}
|
||||
pushd target/$BUILD_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 --target $BUILD_TARGET --workspace ${cargo_args[@]} || exit 1;
|
||||
EOF
|
||||
export RUST_BACKTRACE=1
|
||||
cargo test --target $BUILD_TARGET --workspace ${cargo_args[@]} || exit 1;
|
||||
|
||||
Reference in New Issue
Block a user