scripts: Make --hypervisor=mshv only affect features used by tests

This uncouples it from the features used for building the binary under
test allowing it to use the default build features.

This change also removes the feature control from the test scripts where
it was never used (e.g. run_integration_tests_sgx.sh)

This allows the combined binary to be used for all testing but allows
the disabling of tests known not to work under mshv.

Fixes: #4915

Signed-off-by: Rob Bradford <robert.bradford@intel.com>
This commit is contained in:
Rob Bradford
2022-11-24 13:06:53 +00:00
parent e3a5102f85
commit d83fc7f663
9 changed files with 32 additions and 49 deletions

View File

@@ -6,8 +6,6 @@ source $(dirname "$0")/test-util.sh
source $(dirname "$0")/common-aarch64.sh
process_common_args "$@"
# For now these values are default for kvm
features=""
# aarch64 not supported for MSHV
if [[ "$hypervisor" = "mshv" ]]; then
@@ -46,11 +44,11 @@ dmsetup mknodes
export RUST_BACKTRACE=1
cargo build --all --release $features --target $BUILD_TARGET
cargo build --all --release --target $BUILD_TARGET
# Only run with 1 thread to avoid tests interfering with one another because
# Windows has a static IP configured
time cargo test $features "windows::$test_filter" --target $BUILD_TARGET -- ${test_binary_args[*]}
time cargo test "windows::$test_filter" --target $BUILD_TARGET -- ${test_binary_args[*]}
RES=$?
dmsetup remove_all -f