diff --git a/ci-automation/test.sh b/ci-automation/test.sh index 0dd0fce80c..f5d14d05bb 100644 --- a/ci-automation/test.sh +++ b/ci-automation/test.sh @@ -154,6 +154,8 @@ function _test_run_impl() { local tap_merged_detailed="results-${image}-detailed.tap" local retry="" local success=false + local print_give_up=true + local failed_tests=() # A job on each worker prunes old mantle images (docker image prune) echo "docker rm -f '${container_name}'" >> ./ci-cleanup.sh @@ -188,32 +190,32 @@ function _test_run_impl() { "${tap_merged_summary}" \ "${tap_merged_detailed}" - local failed_tests - failed_tests="$(cat "${tests_dir}/${failfile}")" - if [ -z "$failed_tests" ] ; then + readarray -t failed_tests <"${tests_dir}/${failfile}" + if [ "${#failed_tests[@]}" -eq 0 ] ; then echo "########### All tests succeeded. ###########" success=true + print_give_up=false break fi if retest_cycle_broken; then echo "########### Test cycle requested to break ###########" - echo "Failed tests: $failed_tests" + echo "Failed tests:" + printf '%s\n' "${failed_tests[@]}" echo "-----------" - # not really a success, but don't print a message about - # exhaused reruns and giving up - success=true + print_give_up=false break fi echo "########### Some tests failed and will be re-run (${retry} / ${retries}). ###########" - echo "Failed tests: $failed_tests" + echo "Failed tests:" + printf '%s\n' "${failed_tests[@]}" echo "-----------" - set -- $failed_tests + set -- "${failed_tests[@]}" done - if ! $success; then + if ${print_give_up}; then echo "########### All re-runs exhausted ($retries). Giving up. ###########" fi diff --git a/ci-automation/vendor-testing/qemu_update.sh b/ci-automation/vendor-testing/qemu_update.sh index 2d8dea3a39..1ce875f684 100755 --- a/ci-automation/vendor-testing/qemu_update.sh +++ b/ci-automation/vendor-testing/qemu_update.sh @@ -13,7 +13,12 @@ set -euo pipefail source ci-automation/vendor_test.sh if [ "$*" != "" ] && [ "$*" != "*" ] && [ "$*" != "cl.update.payload" ]; then - echo "Only cl.update.payload is supported, got '$*'" + echo "1..1" > "${CIA_TAPFILE}" + echo "not ok - all qemu update tests" >> "${CIA_TAPFILE}" + echo " ---" >> "${CIA_TAPFILE}" + echo " ERROR: Only cl.update.payload is supported, got '$*'." | tee -a "${CIA_TAPFILE}" + echo " ..." >> "${CIA_TAPFILE}" + break_retest_cycle exit 1 fi