2019-07-16 10:54:33 +01:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
source $HOME/.cargo/env
|
2020-11-17 16:37:27 -08:00
|
|
|
source $(dirname "$0")/test-util.sh
|
|
|
|
|
|
|
|
process_common_args "$@"
|
2019-07-16 10:54:33 +01:00
|
|
|
|
2020-04-21 08:02:58 +02:00
|
|
|
BUILD_TARGET=${BUILD_TARGET-x86_64-unknown-linux-gnu}
|
2020-11-17 16:37:27 -08:00
|
|
|
cargo_args=("")
|
2020-04-21 08:02:58 +02:00
|
|
|
|
2021-01-11 16:05:02 -08:00
|
|
|
if [[ $(uname -m) = "aarch64" || $hypervisor = "mshv" ]]; then
|
|
|
|
cargo_args+=("--no-default-features")
|
|
|
|
cargo_args+=("--features $hypervisor")
|
|
|
|
fi
|
2020-10-07 11:01:58 +02:00
|
|
|
export RUST_BACKTRACE=1
|
|
|
|
cargo test --target $BUILD_TARGET --workspace ${cargo_args[@]} || exit 1;
|