mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
tests: Use newgrp to run unit tests
Rather than set filesystem permissions on the /dev/kvm device instead use the kvm group added by installing qemu for running the unit tests. Signed-off-by: Rob Bradford <robert.bradford@intel.com>
This commit is contained in:
committed by
Sebastien Boeuf
parent
f5a6e3c1ca
commit
8b78e1221e
@@ -13,8 +13,11 @@ pushd target/debug
|
||||
ls | grep net_util | grep -v "\.d" | xargs -n 1 sudo setcap cap_net_admin,cap_net_raw+ep
|
||||
popd
|
||||
|
||||
for f in $(find . -name Cargo.toml -printf '%h\n' | sort -u); do
|
||||
pushd $f > /dev/null;
|
||||
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;
|
||||
cargo test || exit 1;
|
||||
popd > /dev/null;
|
||||
done
|
||||
EOF
|
||||
|
||||
Reference in New Issue
Block a user