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

@ -12,10 +12,10 @@ mkdir -p "$WORKLOADS_DIR"
process_common_args "$@"
# For now these values are default for kvm
features=""
test_features=""
if [ "$hypervisor" = "mshv" ] ; then
features="--no-default-features --features mshv"
test_features="--no-default-features --features mshv"
fi
cp scripts/sha1sums-x86_64 $WORKLOADS_DIR
@ -77,10 +77,10 @@ if [[ "${BUILD_TARGET}" == "x86_64-unknown-linux-musl" ]]; then
CFLAGS="-I /usr/include/x86_64-linux-musl/ -idirafter /usr/include/"
fi
cargo build --all --release $features --target $BUILD_TARGET
cargo build --all --release --target $BUILD_TARGET
export RUST_BACKTRACE=1
time cargo test $features "rate_limiter::$test_filter" -- --test-threads=1 ${test_binary_args[*]}
time cargo test $test_features "rate_limiter::$test_filter" -- --test-threads=1 ${test_binary_args[*]}
RES=$?
exit $RES