Files
cloud-hypervisor/scripts/run_integration_tests_cvm.sh
Muminul Islam df1809c1fa scripts: limit integration tests to cloud-hypervisor package
Pass `-p cloud-hypervisor` to all `cargo nextest run` invocations in
the integration test scripts so test discovery and execution are
scoped to the cloud-hypervisor package only, avoiding running tests
from other workspace crates.

This avoids flooding the output messages like below
`test result: ok. 0 passed; 0 failed; 0 ignored;
0 measured; 0 filtered out; finished in 0.00s
Running unittests src/lib.rs`

Signed-off-by: Muminul Islam <muislam@microsoft.com>
2026-05-07 17:44:38 +00:00

34 lines
938 B
Bash
Executable File

#!/usr/bin/env bash
# shellcheck disable=SC2048,SC2086,SC2154,SC1094
set -x
# shellcheck source=/dev/null
source "$HOME"/.cargo/env
source "$(dirname "${BASH_SOURCE[0]}")/test-util.sh"
WORKLOADS_DIR="$HOME/workloads"
mkdir -p "$WORKLOADS_DIR"
process_common_args "$@"
test_features="--features mshv,igvm,sev_snp"
build_features="mshv,igvm,sev_snp"
download_x86_guest_images
cp scripts/sha1sums-x86_64-common "$WORKLOADS_DIR"
pushd "$WORKLOADS_DIR" || exit
if ! sha1sum sha1sums-x86_64-common --check; then
echo "sha1sum validation of images failed, remove invalid images to fix the issue."
exit 1
fi
popd || exit
cargo build --features $build_features --all --release --target "$BUILD_TARGET"
export RUST_BACKTRACE=1
time cargo nextest run -p cloud-hypervisor $test_features --retries 3 --no-fail-fast --no-tests=pass --test-threads=$(($(nproc) / 4)) "common_cvm::$test_filter" -- ${test_binary_args[*]}
RES=$?
exit $RES