2019-07-16 09:54:33 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
source $HOME/.cargo/env
|
|
|
|
|
2020-04-21 06:02:58 +00: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 07:57:20 +00:00
|
|
|
ls | grep net_util | grep -v "\.d" | xargs -n 1 sudo setcap cap_net_admin,cap_net_raw+ep
|
2019-07-16 09:54:33 +00:00
|
|
|
popd
|
|
|
|
|
2019-08-16 14:11:47 +00:00
|
|
|
sudo adduser $USER kvm
|
|
|
|
newgrp kvm << EOF || exit 1
|
2019-08-16 15:08:16 +00:00
|
|
|
export RUST_BACKTRACE=1
|
2020-04-21 06:02:58 +00:00
|
|
|
cargo test --target $BUILD_TARGET --workspace "$@" || exit 1;
|
2019-08-16 14:11:47 +00:00
|
|
|
EOF
|