diff --git a/scripts/run_integration_tests_aarch64.sh b/scripts/run_integration_tests_aarch64.sh index 941b717b5..29d6de971 100755 --- a/scripts/run_integration_tests_aarch64.sh +++ b/scripts/run_integration_tests_aarch64.sh @@ -137,7 +137,9 @@ update_workloads() { fi # Download aarch64 ovmf - download_aarch64_ovmf + if [ ! -f "$WORKLOADS_DIR/CLOUDHV_EFI.fd" ]; then + download_aarch64_ovmf + fi pushd "$WORKLOADS_DIR" || exit diff --git a/scripts/run_integration_tests_vfio.sh b/scripts/run_integration_tests_vfio.sh index 3f1b26778..02f3434fe 100755 --- a/scripts/run_integration_tests_vfio.sh +++ b/scripts/run_integration_tests_vfio.sh @@ -16,7 +16,9 @@ process_common_args "$@" WORKLOADS_DIR="$HOME/workloads" -download_hypervisor_fw +if [ ! -f "$WORKLOADS_DIR/hypervisor-fw" ]; then + download_hypervisor_fw +fi CFLAGS="" if [[ "${BUILD_TARGET}" == "x86_64-unknown-linux-musl" ]]; then diff --git a/scripts/run_integration_tests_windows_aarch64.sh b/scripts/run_integration_tests_windows_aarch64.sh index 69537d776..1f94e088e 100755 --- a/scripts/run_integration_tests_windows_aarch64.sh +++ b/scripts/run_integration_tests_windows_aarch64.sh @@ -20,7 +20,9 @@ WIN_IMAGE_FILE="$WORKLOADS_DIR/$WIN_IMAGE_BASENAME" # Download aarch64 OVMF OVMF_FW="$WORKLOADS_DIR/CLOUDHV_EFI.fd" -download_aarch64_ovmf +if [ ! -f "$OVMF_FW" ]; then + download_aarch64_ovmf +fi # Check if the images are present if [[ ! -f ${WIN_IMAGE_FILE} || ! -f ${OVMF_FW} ]]; then diff --git a/scripts/run_integration_tests_windows_x86_64.sh b/scripts/run_integration_tests_windows_x86_64.sh index 6b358c5c2..29953bc24 100755 --- a/scripts/run_integration_tests_windows_x86_64.sh +++ b/scripts/run_integration_tests_windows_x86_64.sh @@ -16,9 +16,12 @@ fi WIN_IMAGE_FILE="/root/workloads/windows-server-2025-amd64-1.raw" WORKLOADS_DIR="/root/workloads" +OVMF_FW="$WORKLOADS_DIR/CLOUDHV.fd" # Download amd64 ovmf -download_amd64_ovmf +if [ ! -f "$OVMF_FW" ]; then + download_amd64_ovmf +fi CFLAGS="" if [[ "${BUILD_TARGET}" == "x86_64-unknown-linux-musl" ]]; then diff --git a/scripts/test-util.sh b/scripts/test-util.sh index 3ba2474a4..3b17ee4c9 100644 --- a/scripts/test-util.sh +++ b/scripts/test-util.sh @@ -187,6 +187,17 @@ download_linux() { } prepare_linux() { + if [ "$(uname -m)" = "aarch64" ]; then + KERNEL_FILE="$WORKLOADS_DIR/Image-arm64" + else + KERNEL_FILE="$WORKLOADS_DIR/vmlinux-x86_64" + BZIMAGE_FILE="$WORKLOADS_DIR/bzImage-x86_64" + fi + if [[ -f "$KERNEL_FILE" && -f "$BZIMAGE_FILE" ]]; then + echo "Kernel already present at $KERNEL_FILE, skipping" + return + fi + if [ "$build_kernel" = true ]; then echo "Building kernel from source" build_custom_linux