From c95b82d9757062d677af3bf4854872e58402b601 Mon Sep 17 00:00:00 2001 From: Rob Bradford Date: Thu, 24 Nov 2022 14:42:07 +0000 Subject: [PATCH] scripts: Build dual kvm/mshv binary (like release.yaml) for integration testing This means we are testing the same binary as we use in our releases. Fixes: #4915 Signed-off-by: Rob Bradford --- scripts/run_integration_tests_live_migration.sh | 2 +- scripts/run_integration_tests_rate_limiter.sh | 2 +- scripts/run_integration_tests_sgx.sh | 2 +- scripts/run_integration_tests_vfio.sh | 2 +- scripts/run_integration_tests_windows_x86_64.sh | 2 +- scripts/run_integration_tests_x86_64.sh | 2 +- scripts/run_metrics.sh | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/scripts/run_integration_tests_live_migration.sh b/scripts/run_integration_tests_live_migration.sh index a0eb5e9c8..864d08339 100755 --- a/scripts/run_integration_tests_live_migration.sh +++ b/scripts/run_integration_tests_live_migration.sh @@ -86,7 +86,7 @@ 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 --target $BUILD_TARGET +cargo build --no-default-features --features "kvm,mshv" --all --release --target $BUILD_TARGET # Test ovs-dpdk relies on hugepages echo 6144 | sudo tee /proc/sys/vm/nr_hugepages diff --git a/scripts/run_integration_tests_rate_limiter.sh b/scripts/run_integration_tests_rate_limiter.sh index c20103587..2ab3baa42 100755 --- a/scripts/run_integration_tests_rate_limiter.sh +++ b/scripts/run_integration_tests_rate_limiter.sh @@ -77,7 +77,7 @@ 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 --target $BUILD_TARGET +cargo build --no-default-features --features "kvm,mshv" --all --release --target $BUILD_TARGET export RUST_BACKTRACE=1 time cargo test $test_features "rate_limiter::$test_filter" -- --test-threads=1 ${test_binary_args[*]} diff --git a/scripts/run_integration_tests_sgx.sh b/scripts/run_integration_tests_sgx.sh index f1318e304..cdf724120 100755 --- a/scripts/run_integration_tests_sgx.sh +++ b/scripts/run_integration_tests_sgx.sh @@ -46,7 +46,7 @@ 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 --no-default-features --features "kvm,mshv" --all --release --target $BUILD_TARGET export RUST_BACKTRACE=1 diff --git a/scripts/run_integration_tests_vfio.sh b/scripts/run_integration_tests_vfio.sh index 05da2d537..b02bd6e78 100755 --- a/scripts/run_integration_tests_vfio.sh +++ b/scripts/run_integration_tests_vfio.sh @@ -41,7 +41,7 @@ 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 --no-default-features --features "kvm,mshv" --all --release --target $BUILD_TARGET # We always copy a fresh version of our binary for our L2 guest. cp target/$BUILD_TARGET/release/cloud-hypervisor $VFIO_DIR diff --git a/scripts/run_integration_tests_windows_x86_64.sh b/scripts/run_integration_tests_windows_x86_64.sh index 6974db96c..2285a4ff1 100755 --- a/scripts/run_integration_tests_windows_x86_64.sh +++ b/scripts/run_integration_tests_windows_x86_64.sh @@ -44,7 +44,7 @@ dmsetup mknodes dmsetup create windows-snapshot-base --table "0 $img_blk_size snapshot-origin /dev/mapper/windows-base" dmsetup mknodes -cargo build --all --release --target $BUILD_TARGET +cargo build --no-default-features --features "kvm,mshv" --all --release --target $BUILD_TARGET export RUST_BACKTRACE=1 diff --git a/scripts/run_integration_tests_x86_64.sh b/scripts/run_integration_tests_x86_64.sh index f1027a3dd..0f7765e11 100755 --- a/scripts/run_integration_tests_x86_64.sh +++ b/scripts/run_integration_tests_x86_64.sh @@ -174,7 +174,7 @@ cp $VMLINUX_IMAGE $VFIO_DIR || exit 1 BUILD_TARGET="$(uname -m)-unknown-linux-${CH_LIBC}" -cargo build --all --release --target $BUILD_TARGET +cargo build --no-default-features --features "kvm,mshv" --all --release --target $BUILD_TARGET # We always copy a fresh version of our binary for our L2 guest. cp target/$BUILD_TARGET/release/cloud-hypervisor $VFIO_DIR diff --git a/scripts/run_metrics.sh b/scripts/run_metrics.sh index ad7fdd2f6..ea4aa9904 100755 --- a/scripts/run_metrics.sh +++ b/scripts/run_metrics.sh @@ -92,7 +92,7 @@ if [[ "${BUILD_TARGET}" == "${TEST_ARCH}-unknown-linux-musl" ]]; then CFLAGS="-I /usr/include/${TEST_ARCH}-linux-musl/ -idirafter /usr/include/" fi -cargo build --all --release --target $BUILD_TARGET +cargo build --no-default-features --features "kvm,mshv" --all --release --target $BUILD_TARGET # setup hugepages echo 6144 | sudo tee /proc/sys/vm/nr_hugepages