mirror of
https://github.com/flatcar/scripts.git
synced 2026-01-27 19:31:36 +01:00
Add configuration options to test functions
* Add SKIP_COPY_TO_BINCACHE environment variable that will skip
uploading test results to bincache. This is useful if we want to
upload test results as artifacts on github.
* make QEMU_IMAGE_NAME configurable
Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
This commit is contained in:
parent
cd459af328
commit
f57591b417
@ -45,7 +45,7 @@ CONTAINER_IMAGE_ROOT="/home/sdk/build/images"
|
||||
|
||||
# -- QEMU --
|
||||
|
||||
QEMU_IMAGE_NAME="flatcar_production_image.bin"
|
||||
QEMU_IMAGE_NAME=${QEMU_IMAGE_NAME:-flatcar_production_image.bin}
|
||||
QEMU_PARALLEL="${PARALLEL_TESTS:-20}"
|
||||
|
||||
# BIOS path within the SDK
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
#!/bin/bash
|
||||
#!/bin/bash -x
|
||||
#
|
||||
# Copyright (c) 2021 The Flatcar Maintainers.
|
||||
# Use of this source code is governed by a BSD-style license that can be
|
||||
@ -120,6 +120,7 @@ function _test_run_impl() {
|
||||
fi
|
||||
|
||||
local retries="${MAX_RETRIES:-20}"
|
||||
local skip_copy_to_bincache=${SKIP_COPY_TO_BINCACHE:-0}
|
||||
|
||||
source ci-automation/tapfile_helper_lib.sh
|
||||
source ci-automation/ci_automation_common.sh
|
||||
@ -216,14 +217,19 @@ function _test_run_impl() {
|
||||
echo "########### All re-runs exhausted ($retries). Giving up. ###########"
|
||||
fi
|
||||
|
||||
# publish kola output, TAP files to build cache
|
||||
copy_to_buildcache "testing/${vernum}/${arch}/${image}" \
|
||||
"${tests_dir}/_kola_temp"
|
||||
copy_to_buildcache "testing/${vernum}/${arch}/${image}" \
|
||||
"${tests_dir}/"*.tap
|
||||
copy_to_buildcache "testing/${vernum}/${arch}/${image}" \
|
||||
"${tap_merged_summary}"
|
||||
copy_to_buildcache "testing/${vernum}/${arch}/${image}" \
|
||||
"${tap_merged_detailed}"
|
||||
if [ ${skip_copy_to_bincache} -eq 0 ]
|
||||
# publish kola output, TAP files to build cache
|
||||
copy_to_buildcache "testing/${vernum}/${arch}/${image}" \
|
||||
"${tests_dir}/_kola_temp"
|
||||
copy_to_buildcache "testing/${vernum}/${arch}/${image}" \
|
||||
"${tests_dir}/"*.tap
|
||||
copy_to_buildcache "testing/${vernum}/${arch}/${image}" \
|
||||
"${tap_merged_summary}"
|
||||
copy_to_buildcache "testing/${vernum}/${arch}/${image}" \
|
||||
"${tap_merged_detailed}"
|
||||
fi
|
||||
if ! $success; then
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
# --
|
||||
|
||||
@ -22,7 +22,7 @@ fi
|
||||
|
||||
# Fetch image and BIOS if not present
|
||||
if [ -f "${QEMU_IMAGE_NAME}" ] ; then
|
||||
echo "++++ ${CIA_TESTSCRIPT}: Using existing ./${QEMU_IMAGE_NAME} for testing ${CIA_VERNUM} (${CIA_ARCH}) ++++"
|
||||
echo "++++ ${CIA_TESTSCRIPT}: Using existing ${QEMU_IMAGE_NAME} for testing ${CIA_VERNUM} (${CIA_ARCH}) ++++"
|
||||
else
|
||||
echo "++++ ${CIA_TESTSCRIPT}: downloading ${QEMU_IMAGE_NAME} for ${CIA_VERNUM} (${CIA_ARCH}) ++++"
|
||||
rm -f "${QEMU_IMAGE_NAME}.bz2"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user