Skip to content

Commit 1ca6c15

Browse files
russell-islamliuw
authored andcommitted
tests: option to override default migratable version
This patch gives user an option to override the default migratable version to any later release. This option makes MSHV specific tests suitable for tests since MSHV is stable after some breaking changes. This patch is also necessary for MSHV CI. Signed-off-by: Muminul Islam <muislam@microsoft.com>
1 parent c38596d commit 1ca6c15

2 files changed

Lines changed: 12 additions & 2 deletions

File tree

scripts/dev_cli.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -538,6 +538,7 @@ cmd_tests() {
538538
--env TARGET_CC="$target_cc" \
539539
--env AUTH_DOWNLOAD_TOKEN="$AUTH_DOWNLOAD_TOKEN" \
540540
--env LLVM_PROFILE_FILE="$LLVM_PROFILE_FILE" \
541+
--env MIGRATABLE_VERSION="$MIGRATABLE_VERSION" \
541542
"$CTR_IMAGE" \
542543
./scripts/run_integration_tests_live_migration.sh "$@" || fix_dir_perms $? || exit $?
543544
fi

scripts/run_integration_tests_live_migration.sh

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,23 @@ mkdir -p "$WORKLOADS_DIR"
1111

1212
process_common_args "$@"
1313

14+
migratable_version=v39.0
1415
# For now these values are default for kvm
1516
test_features=""
1617

1718
if [ "$hypervisor" = "mshv" ]; then
1819
test_features="--features mshv"
1920
fi
2021

22+
# if migratable version is set to override the default
23+
if [ -n "${MIGRATABLE_VERSION}" ]; then
24+
# validate the version if matched with vxx.0
25+
if ! [[ "${MIGRATABLE_VERSION}" =~ ^v[0-9]{2,}\.[0-9]$ ]]; then
26+
echo "MIGRATABLE_VERSION should be in format vxx.0, e.g. v47.0"
27+
exit 1
28+
fi
29+
migratable_version=${MIGRATABLE_VERSION}
30+
fi
2131
cp scripts/sha1sums-x86_64 "$WORKLOADS_DIR"
2232

2333
FOCAL_OS_IMAGE_NAME="focal-server-cloudimg-amd64-custom-20210609-0.qcow2"
@@ -45,8 +55,7 @@ fi
4555
popd || exit
4656

4757
# Download Cloud Hypervisor binary from its last stable release
48-
LAST_RELEASE_VERSION="v39.0"
49-
CH_RELEASE_URL="https://github.com/cloud-hypervisor/cloud-hypervisor/releases/download/$LAST_RELEASE_VERSION/cloud-hypervisor-static"
58+
CH_RELEASE_URL="https://github.com/cloud-hypervisor/cloud-hypervisor/releases/download/${migratable_version}/cloud-hypervisor-static"
5059
CH_RELEASE_NAME="cloud-hypervisor-static"
5160
pushd "$WORKLOADS_DIR" || exit
5261
time wget --quiet $CH_RELEASE_URL -O "$CH_RELEASE_NAME" || exit 1

0 commit comments

Comments
 (0)