scripts: Add an option to accept hypervisor argument

Signed-off-by: Muminul Islam <muislam@microsoft.com>
This commit is contained in:
Muminul Islam
2020-11-17 16:37:27 -08:00
committed by Samuel Ortiz
parent 2cc312b65c
commit 27b5f8d7e3
8 changed files with 102 additions and 19 deletions

View File

@@ -2,6 +2,12 @@
set -x
source $HOME/.cargo/env
source $(dirname "$0")/test-util.sh
process_common_args "$@"
# For now these values are deafult for kvm
features_build=""
features_test="--features integration_tests"
BUILD_TARGET="$(uname -m)-unknown-linux-${CH_LIBC}"
CFLAGS=""
@@ -11,12 +17,12 @@ TARGET_CC="musl-gcc"
CFLAGS="-I /usr/include/x86_64-linux-musl/ -idirafter /usr/include/"
fi
cargo build --all --release --target $BUILD_TARGET
cargo build --all --release $features_build --target $BUILD_TARGET
strip target/$BUILD_TARGET/release/cloud-hypervisor
export RUST_BACKTRACE=1
time cargo test --features "integration_tests" "tests::sgx::$@"
time cargo test $features_test "tests::sgx::"
RES=$?
exit $RES