2019-07-16 10:54:33 +01:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
source $HOME/.cargo/env
|
|
|
|
|
2020-04-21 08:02:58 +02:00
|
|
|
BUILD_TARGET=${BUILD_TARGET-x86_64-unknown-linux-gnu}
|
|
|
|
|
|
|
|
cargo test --target $BUILD_TARGET --workspace --no-run
|
|
|
|
pushd target/$BUILD_TARGET/debug
|
2019-07-19 08:57:20 +01:00
|
|
|
ls | grep net_util | grep -v "\.d" | xargs -n 1 sudo setcap cap_net_admin,cap_net_raw+ep
|
2019-07-16 10:54:33 +01:00
|
|
|
popd
|
|
|
|
|
2019-08-16 15:11:47 +01:00
|
|
|
sudo adduser $USER kvm
|
|
|
|
newgrp kvm << EOF || exit 1
|
2019-08-16 16:08:16 +01:00
|
|
|
export RUST_BACKTRACE=1
|
2020-04-21 08:02:58 +02:00
|
|
|
cargo test --target $BUILD_TARGET --workspace "$@" || exit 1;
|
2019-08-16 15:11:47 +01:00
|
|
|
EOF
|