tests: Avoid repeatedly downloading files from GitHub

Running one or two tests in a tight loop can cause the download
functions to quickly hit GitHub's API rate limit. That causes the test
script to fail for no apparent reason.

Signed-off-by: Wei Liu <liuwe@microsoft.com>
This commit is contained in:
Wei Liu
2025-07-23 22:37:19 +00:00
committed by Bo Chen
parent 2d9fc3beb6
commit 5f2392c095
2 changed files with 8 additions and 2 deletions

View File

@@ -20,9 +20,13 @@ fi
cp scripts/sha1sums-x86_64 "$WORKLOADS_DIR"
download_hypervisor_fw
if [ ! -f "$WORKLOADS_DIR/hypervisor-fw" ]; then
download_hypervisor_fw
fi
download_ovmf
if [ ! -f "$WORKLOADS_DIR/CLOUDHV.fd" ]; then
download_ovmf
fi
FOCAL_OS_IMAGE_NAME="focal-server-cloudimg-amd64-custom-20210609-0.qcow2"
FOCAL_OS_IMAGE_URL="https://ch-images.azureedge.net/$FOCAL_OS_IMAGE_NAME"