ci: Pass target triple to the test scripts

We pass it to the integration and unit tests script through --libc.
Cargo tests are left unmodified.

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
This commit is contained in:
Samuel Ortiz
2020-04-21 08:02:58 +02:00
committed by Rob Bradford
parent 33b0e15804
commit ce794f7858
3 changed files with 28 additions and 16 deletions

View File

@@ -2,13 +2,15 @@
source $HOME/.cargo/env
cargo test --workspace --no-run
pushd target/debug
BUILD_TARGET=${BUILD_TARGET-x86_64-unknown-linux-gnu}
cargo test --target $BUILD_TARGET --workspace --no-run
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 --workspace "$@" || exit 1;
cargo test --target $BUILD_TARGET --workspace "$@" || exit 1;
EOF