mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
tests: Standardise live-migration runner on MIGRATABLE_VERSION
The aarch64 integration script hardcoded `LAST_RELEASE_VERSION="v39.0"` for the live-upgrade binary download, while the live-migration runner already accepts a `MIGRATABLE_VERSION` env override with a `vxx.0` regex check. Standardise the aarch64 script on the same env-override block so both arches honour the same knob with the same validation. Default is unchanged (v39.0). Assisted-by: Claude:Opus-4.7 Signed-off-by: Rob Bradford <rbradford@meta.com>
This commit is contained in:
@@ -148,8 +148,7 @@ update_workloads() {
|
||||
popd || exit
|
||||
|
||||
# Download Cloud Hypervisor binary from its last stable release
|
||||
LAST_RELEASE_VERSION="v39.0"
|
||||
CH_RELEASE_URL="https://github.com/cloud-hypervisor/cloud-hypervisor/releases/download/$LAST_RELEASE_VERSION/cloud-hypervisor-static-aarch64"
|
||||
CH_RELEASE_URL="https://github.com/cloud-hypervisor/cloud-hypervisor/releases/download/${migratable_version}/cloud-hypervisor-static-aarch64"
|
||||
CH_RELEASE_NAME="cloud-hypervisor-static-aarch64"
|
||||
pushd "$WORKLOADS_DIR" || exit
|
||||
# Repeat a few times to workaround a random wget failure
|
||||
@@ -209,12 +208,23 @@ update_workloads() {
|
||||
|
||||
process_common_args "$@"
|
||||
|
||||
migratable_version=v39.0
|
||||
test_features=""
|
||||
|
||||
if [ "$hypervisor" = "mshv" ]; then
|
||||
test_features="--features mshv"
|
||||
fi
|
||||
|
||||
# if migratable version is set to override the default
|
||||
if [ -n "${MIGRATABLE_VERSION}" ]; then
|
||||
# validate the version if matched with vxx.0
|
||||
if ! [[ "${MIGRATABLE_VERSION}" =~ ^v[0-9]{2,}\.[0-9]$ ]]; then
|
||||
echo "MIGRATABLE_VERSION should be in format vxx.0, e.g. v47.0"
|
||||
exit 1
|
||||
fi
|
||||
migratable_version=${MIGRATABLE_VERSION}
|
||||
fi
|
||||
|
||||
# lock the workloads folder to avoid parallel updating by different containers
|
||||
(
|
||||
echo "try to lock $WORKLOADS_DIR folder and update"
|
||||
|
||||
Reference in New Issue
Block a user