mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2024-12-22 21:55:20 +00:00
219716c3f1
Now feature "mshv" can be built together with "kvm". There is no need to use "--no-default-features" any more. Fixes: #5647 Signed-off-by: Bo Chen <chen.bo@intel.com>
25 lines
734 B
Bash
Executable File
25 lines
734 B
Bash
Executable File
#!/bin/bash
|
|
|
|
source $HOME/.cargo/env
|
|
source $(dirname "$0")/test-util.sh
|
|
|
|
process_common_args "$@"
|
|
|
|
BUILD_TARGET=${BUILD_TARGET-x86_64-unknown-linux-gnu}
|
|
cargo_args=("")
|
|
|
|
if [[ $hypervisor = "mshv" ]]; then
|
|
cargo_args+=("--features $hypervisor")
|
|
elif [[ $(uname -m) = "x86_64" ]]; then
|
|
cargo_args+=("--features tdx")
|
|
fi
|
|
|
|
if [[ "${BUILD_TARGET}" == "aarch64-unknown-linux-musl" ]]; then
|
|
export TARGET_CC="musl-gcc"
|
|
export RUSTFLAGS="-C link-arg=-lgcc -C link_arg=-specs -C link_arg=/usr/lib/aarch64-linux-musl/musl-gcc.specs"
|
|
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
|