Thilo Fromm 3a416fbf32 ci-automation testing: address PR review comments
- add cleanup script to test.sh
- remove wrapper function from qemu test

Signed-off-by: Thilo Fromm <thilo@kinvolk.io>
2022-02-17 12:30:36 +01:00

39 lines
997 B
Bash
Executable File

#!/bin/bash
# Copyright (c) 2021 The Flatcar Maintainers.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
set -euo pipefail
# Test execution script for the qemu vendor image.
# This script is supposed to run in the SDK container.
work_dir="$1"; shift
arch="$1"; shift
vernum="$1"; shift
tapfile="$1"; shift
# $@ now contains tests / test patterns to run
source ci-automation/ci_automation_common.sh
mkdir -p "${work_dir}"
cd "${work_dir}"
echo "++++ QEMU test: downloading ${QEMU_IMAGE_NAME} for ${vernum} (${arch}) ++++"
copy_from_buildcache "images/${arch}/${vernum}/${QEMU_IMAGE_NAME}" .
set -o noglob
sudo kola run \
--board="${arch}-usr" \
--parallel="${QEMU_PARALLEL}" \
--platform=qemu \
--qemu-bios=/usr/share/qemu/bios-256k.bin \
--qemu-image="${QEMU_IMAGE_NAME}" \
--tapfile="${tapfile}" \
--torcx-manifest="${CONTAINER_TORCX_ROOT}/${arch}-usr/latest/torcx_manifest.json" \
$@
set +o noglob