#!/bin/bash set -e -x cd $(dirname $0)/.. cleanup() { exit_code=$? set +e wait echo "Finished the tests!" exit ${exit_code} } trap cleanup EXIT if [ -z "$K3S_IMAGE" ]; then source $(dirname $0)/version.sh TAG=${TAG:-${VERSION}${SUFFIX}} REPO=${REPO:-rancher} IMAGE_NAME=${IMAGE_NAME:-k3s} export K3S_IMAGE=${REPO}/${IMAGE_NAME}:${TAG} fi OUTPUT=$(pwd)/dist/artifacts mkdir -p ${OUTPUT} pids=() output=() run-sonobuoy() { output+=(${log_output}) E2E_LOG_OUTPUT=${log_output} ./scripts/sonobuoy ${@} & pids+=($!) } log_output=${OUTPUT}/e2e-STATUS-${ARCH}-serial.log \ run-sonobuoy --e2e-focus='\[Serial\].*\[Conformance\]' log_output=${OUTPUT}/e2e-STATUS-${ARCH}-parallel.log \ run-sonobuoy --e2e-focus='\[Conformance\]' --e2e-skip='\[Serial\]' --e2e-parallel=y for pid in "${pids[@]}"; do wait $pid || exit $? done