script: Modify unit tests to support mshv
Signed-off-by: Muminul Islam <muislam@microsoft.com>
This commit is contained in:
parent
a194dad98c
commit
9cdcbb5121
2 changed files with 5 additions and 3 deletions
|
|
@ -355,7 +355,7 @@ cmd_tests() {
|
|||
cflags="-I /usr/include/x86_64-linux-musl/ -idirafter /usr/include/"
|
||||
fi
|
||||
|
||||
if [[ "$unit" = true && $hypervisor = "kvm" ]] ; then
|
||||
if [[ "$unit" = true ]] ; then
|
||||
say "Running unit tests for $target..."
|
||||
$DOCKER_RUNTIME run \
|
||||
--workdir "$CTR_CLH_ROOT_DIR" \
|
||||
|
|
|
|||
|
|
@ -7,8 +7,10 @@ process_common_args "$@"
|
|||
|
||||
BUILD_TARGET=${BUILD_TARGET-x86_64-unknown-linux-gnu}
|
||||
cargo_args=("")
|
||||
[ $(uname -m) = "aarch64" ] && cargo_args+=("--no-default-features")
|
||||
[ $(uname -m) = "aarch64" ] && cargo_args+=("--features kvm")
|
||||
|
||||
if [[ $(uname -m) = "aarch64" || $hypervisor = "mshv" ]]; then
|
||||
cargo_args+=("--no-default-features")
|
||||
cargo_args+=("--features $hypervisor")
|
||||
fi
|
||||
export RUST_BACKTRACE=1
|
||||
cargo test --target $BUILD_TARGET --workspace ${cargo_args[@]} || exit 1;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue