scripts: skip checksum for custom-provided workloads

Skip sha1sum verification for firmware files that were
provided via CH_CUSTOM_FIRMWARE or CH_CUSTOM_OVMF environment
variables.  Custom files will not match the expected checksums,
so we filter them out of the sha1sums list before running
sha1sum --check.

Updated scripts:
- run_integration_tests_x86_64.sh
- run_integration_tests_aarch64.sh

Assisted-by: GitHub Copilot:Claude-Opus-4.6

Signed-off-by: Muminul Islam <muislam@microsoft.com>
This commit is contained in:
Muminul Islam
2026-04-23 15:02:03 -07:00
committed by Rob Bradford
parent 38bc97dd4d
commit 00bee62653
2 changed files with 26 additions and 6 deletions

View File

@@ -141,9 +141,17 @@ update_workloads() {
pushd "$WORKLOADS_DIR" || exit
if ! sha1sum sha1sums-aarch64-common --check; then
echo "sha1sum validation of images failed, remove invalid images to fix the issue."
exit 1
# Skip checksum verification for custom-provided workloads
if [ -n "$CH_CUSTOM_OVMF" ]; then
if ! grep -v "CLOUDHV_EFI.fd" sha1sums-aarch64-common | sha1sum --check; then
echo "sha1sum validation of images failed, remove invalid images to fix the issue."
exit 1
fi
else
if ! sha1sum sha1sums-aarch64-common --check; then
echo "sha1sum validation of images failed, remove invalid images to fix the issue."
exit 1
fi
fi
popd || exit

View File

@@ -116,9 +116,21 @@ if [ ! -f "$ALPINE_INITRAMFS_IMAGE" ]; then
fi
pushd "$WORKLOADS_DIR" || exit
if ! sha1sum sha1sums-x86_64 sha1sums-x86_64-common --check; then
echo "sha1sum validation of images failed, remove invalid images to fix the issue."
exit 1
# Skip checksum verification for custom-provided workloads
sha1_exclude=""
[ -n "$CH_CUSTOM_FIRMWARE" ] && sha1_exclude="${sha1_exclude}|hypervisor-fw"
[ -n "$CH_CUSTOM_OVMF" ] && sha1_exclude="${sha1_exclude}|CLOUDHV\\.fd"
sha1_exclude="${sha1_exclude#|}"
if [ -n "$sha1_exclude" ]; then
if ! cat sha1sums-x86_64 sha1sums-x86_64-common | grep -Ev "$sha1_exclude" | sha1sum --check; then
echo "sha1sum validation of images failed, remove invalid images to fix the issue."
exit 1
fi
else
if ! sha1sum sha1sums-x86_64 sha1sums-x86_64-common --check; then
echo "sha1sum validation of images failed, remove invalid images to fix the issue."
exit 1
fi
fi
popd || exit