ci-automation/vendor-testing/azure.sh: Small fixes

Fix some comments, quote some variables.
This commit is contained in:
Krzesimir Nowak 2022-06-02 18:40:03 +02:00
parent 115c18fccb
commit cec96aeec5

View File

@ -5,14 +5,13 @@
set -euo pipefail set -euo pipefail
# Test execution script for the azure vendor image.
# Test execution script for the qemu vendor image. # This script is supposed to run in the mantle container.
# This script is supposed to run in the SDK container.
# $@ now contains tests / test patterns to run
source ci-automation/vendor_test.sh source ci-automation/vendor_test.sh
# $@ now contains tests / test patterns to run
board="${CIA_ARCH}-usr" board="${CIA_ARCH}-usr"
basename="ci-${CIA_VERNUM//+/-}-${CIA_ARCH}" basename="ci-${CIA_VERNUM//+/-}-${CIA_ARCH}"
azure_instance_type="${AZURE_MACHINE_SIZE}" azure_instance_type="${AZURE_MACHINE_SIZE}"
@ -24,13 +23,11 @@ secret_to_file azure_profile_config_file "${AZURE_PROFILE}"
azure_auth_config_file='' azure_auth_config_file=''
secret_to_file azure_auth_config_file "${AZURE_AUTH_CREDENTIALS}" secret_to_file azure_auth_config_file "${AZURE_AUTH_CREDENTIALS}"
testscript="$(basename "$0")"
# Fetch the Azure image if not present # Fetch the Azure image if not present
if [ -f "${AZURE_IMAGE_NAME}" ] ; then if [ -f "${AZURE_IMAGE_NAME}" ] ; then
echo "++++ ${testscript}: Using existing ${work_dir}/${AZURE_IMAGE_NAME} for testing ${CIA_VERNUM} (${CIA_ARCH}) ++++" echo "++++ ${CIA_TESTSCRIPT}: Using existing ${work_dir}/${AZURE_IMAGE_NAME} for testing ${CIA_VERNUM} (${CIA_ARCH}) ++++"
else else
echo "++++ ${testscript}: downloading ${AZURE_IMAGE_NAME} for ${CIA_VERNUM} (${CIA_ARCH}) ++++" echo "++++ ${CIA_TESTSCRIPT}: downloading ${AZURE_IMAGE_NAME} for ${CIA_VERNUM} (${CIA_ARCH}) ++++"
copy_from_buildcache "images/${CIA_ARCH}/${CIA_VERNUM}/${AZURE_IMAGE_NAME}.bz2" . copy_from_buildcache "images/${CIA_ARCH}/${CIA_VERNUM}/${AZURE_IMAGE_NAME}.bz2" .
cp --sparse=always <(lbzcat "${AZURE_IMAGE_NAME}.bz2") "${AZURE_IMAGE_NAME}" cp --sparse=always <(lbzcat "${AZURE_IMAGE_NAME}.bz2") "${AZURE_IMAGE_NAME}"
rm "${AZURE_IMAGE_NAME}.bz2" rm "${AZURE_IMAGE_NAME}.bz2"
@ -62,10 +59,10 @@ run_kola_tests() {
--azure-location="${AZURE_LOCATION}" \ --azure-location="${AZURE_LOCATION}" \
--azure-profile="${azure_profile_config_file}" \ --azure-profile="${azure_profile_config_file}" \
--azure-auth="${azure_auth_config_file}" \ --azure-auth="${azure_auth_config_file}" \
--torcx-manifest=${CIA_TORCX_MANIFEST} \ --torcx-manifest="${CIA_TORCX_MANIFEST}" \
--tapfile="${instance_tapfile}" \ --tapfile="${instance_tapfile}" \
--azure-size=${instance_type} \ --azure-size="${instance_type}" \
--azure-hyper-v-generation=${hyperv_gen} \ --azure-hyper-v-generation="${hyperv_gen}" \
${AZURE_USE_GALLERY} \ ${AZURE_USE_GALLERY} \
${azure_vnet_subnet_name:+--azure-vnet-subnet-name=${azure_vnet_subnet_name}} \ ${azure_vnet_subnet_name:+--azure-vnet-subnet-name=${azure_vnet_subnet_name}} \
${AZURE_USE_PRIVATE_IPS:+--azure-use-private-ips=${AZURE_USE_PRIVATE_IPS}} \ ${AZURE_USE_PRIVATE_IPS:+--azure-use-private-ips=${AZURE_USE_PRIVATE_IPS}} \