diff --git a/ci-automation/ci-config.env b/ci-automation/ci-config.env index f54c7d2cda8..287dc0b0660 100644 --- a/ci-automation/ci-config.env +++ b/ci-automation/ci-config.env @@ -19,11 +19,6 @@ GC_BUCKET="flatcar-linux" DEFAULT_HTTP_IMAGE_URL_TEMPLATE="@PROTO@://${BUILDCACHE_SERVER}/images/@ARCH@/@VERNUM@" -if ! command -v zstd > /dev/null; then - # we require zstd and it is included by default on flatcar - echo >&2 "zstd could not be found. unpacking container image may fail." -fi - CI_GIT_AUTHOR="flatcar-ci" CI_GIT_EMAIL="infra+ci@flatcar-linux.org" diff --git a/ci-automation/test.sh b/ci-automation/test.sh index c8db48edd01..8a1f60ced6f 100644 --- a/ci-automation/test.sh +++ b/ci-automation/test.sh @@ -157,6 +157,8 @@ function _test_run_impl() { local tests_escaped=() __escape_multiple tests_escaped "${@}" + # Remove the old results first + rm -f ${tests_dir}/*-run-1.* || true # Vendor tests may need to know if it is a first run or a rerun touch "${work_dir}/first_run" for retry in $(seq "${retries}"); do @@ -171,14 +173,18 @@ function _test_run_impl() { touch sdk_container/.env docker run --pull always --rm --name="${container_name}" --privileged --net host -v /dev:/dev \ -w /work -v "$PWD":/work "${MANTLE_REF}" \ - bash -c "git config --global --add safe.directory /work && \ - source sdk_container/.env && \ + bash -c "source sdk_container/.env && \ ci-automation/vendor-testing/${image_escaped}.sh ${common_test_args_escaped[*]} ${tapfile_escaped} ${tests_escaped[*]}" set -e rm -f "${work_dir}/first_run" + [[ -s "${tests_dir}/${tapfile}" ]] || { + echo "ERROR: something went wrong, result is empty: ${tests_dir}/${tapfile}" + break + } + # Note: git safe.directory is not set in this run as it does not use git - docker run --pull always --rm --name="${container_name}" --privileged --net host -v /dev:/dev \ + docker run --rm --name="${container_name}" --privileged --net host -v /dev:/dev \ -w /work -v "$PWD":/work "${MANTLE_REF}" \ ci-automation/test_update_reruns.sh \ "${arch}" "${vernum}" "${image}" "${retry}" \ diff --git a/run_local_tests.sh b/run_local_tests.sh index f1bff2cfe3d..30eeffb00e7 100755 --- a/run_local_tests.sh +++ b/run_local_tests.sh @@ -11,6 +11,21 @@ # The devcontainer tests will be skipped since these require a valid commit ref in # the upstream scripts repo. # +# Usage: +# ./run_local_tests.sh [ARCH] [PARALLEL] [TEST ...] +# +# ARCH : Machine architecture to test (default: amd64) +# PARALLEL : Number of parallel tests (default: 2) +# TEST ... : Optional list of kola tests/globs to run. If omitted, +# all suitable qemu_uefi tests (except devcontainer) are run +# and qemu_update tests are executed as well. +# +# +# Helper options: +# -h, --help : Show this help and exit. +# --list-tests : List all qemu/qemu_update tests that would be run by +# default (excluding devcontainer tests) and exit. +# # Requirements: # - Docker (for running the Mantle container). # @@ -63,6 +78,23 @@ EOF } #-- +function usage() { + cat <