cloud-hypervisor/scripts/run_unit_tests.sh
Philipp Schuster 91fe48d5f7 scripts: more compatible shebangs
Signed-off-by: Philipp Schuster <philipp.schuster@cyberus-technology.de>
2023-12-16 09:35:32 +00:00

19 lines
472 B
Bash
Executable File

#!/usr/bin/env bash
source $HOME/.cargo/env
source $(dirname "$0")/test-util.sh
process_common_args "$@"
cargo_args=("")
if [[ $hypervisor = "mshv" ]]; then
cargo_args+=("--features $hypervisor")
elif [[ $(uname -m) = "x86_64" ]]; then
cargo_args+=("--features tdx")
fi
export RUST_BACKTRACE=1
cargo test --lib --bins --target $BUILD_TARGET --workspace ${cargo_args[@]} || exit 1
cargo test --doc --target $BUILD_TARGET --workspace ${cargo_args[@]} || exit 1