2023-12-15 21:33:46 +01:00
|
|
|
#!/usr/bin/env bash
|
2019-07-16 10:54:33 +01:00
|
|
|
|
|
|
|
source $HOME/.cargo/env
|
2022-03-28 12:09:02 +01:00
|
|
|
source $(dirname "$0")/test-util.sh
|
2020-11-17 16:37:27 -08:00
|
|
|
|
|
|
|
process_common_args "$@"
|
2019-07-16 10:54:33 +01:00
|
|
|
|
2020-11-17 16:37:27 -08:00
|
|
|
cargo_args=("")
|
2020-04-21 08:02:58 +02:00
|
|
|
|
2022-03-28 12:09:02 +01:00
|
|
|
if [[ $hypervisor = "mshv" ]]; then
|
2022-09-28 11:41:01 +05:30
|
|
|
cargo_args+=("--features $hypervisor")
|
2022-04-15 15:24:19 +02:00
|
|
|
elif [[ $(uname -m) = "x86_64" ]]; then
|
|
|
|
cargo_args+=("--features tdx")
|
2021-01-11 16:05:02 -08:00
|
|
|
fi
|
2022-03-02 20:05:35 +08:00
|
|
|
|
2020-10-07 11:01:58 +02:00
|
|
|
export RUST_BACKTRACE=1
|
2022-03-28 12:09:02 +01:00
|
|
|
cargo test --lib --bins --target $BUILD_TARGET --workspace ${cargo_args[@]} || exit 1
|
2023-04-05 01:01:51 +00:00
|
|
|
cargo test --doc --target $BUILD_TARGET --workspace ${cargo_args[@]} || exit 1
|