k3s/scripts/sonobuoy-e2e-tests

46 lines
889 B
Plaintext
Raw Normal View History

2019-04-29 20:54:51 +00:00
#!/bin/bash
set -e -x
cd $(dirname $0)/..
2019-07-01 15:29:57 +00:00
cleanup() {
exit_code=$?
set +e
wait
2019-07-02 17:07:26 +00:00
echo "Finished the tests!"
2019-07-01 15:29:57 +00:00
exit ${exit_code}
}
trap cleanup EXIT
2019-05-02 19:04:45 +00:00
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
2019-04-29 20:54:51 +00:00
OUTPUT=$(pwd)/dist/artifacts
mkdir -p ${OUTPUT}
pids=()
output=()
run-sonobuoy() {
output+=(${log_output})
E2E_LOG_OUTPUT=${log_output} ./scripts/sonobuoy ${@} &
pids+=($!)
}
2019-07-01 15:29:57 +00:00
2019-05-03 18:35:58 +00:00
log_output=${OUTPUT}/e2e-STATUS-${ARCH}-serial.log \
2019-04-29 20:54:51 +00:00
run-sonobuoy --e2e-focus='\[Serial\].*\[Conformance\]'
2019-05-03 18:35:58 +00:00
log_output=${OUTPUT}/e2e-STATUS-${ARCH}-parallel.log \
2019-04-29 20:54:51 +00:00
run-sonobuoy --e2e-focus='\[Conformance\]' --e2e-skip='\[Serial\]' --e2e-parallel=y
2019-07-01 15:29:57 +00:00
for pid in "${pids[@]}"; do
2019-07-02 17:07:26 +00:00
wait $pid || exit $?
2019-07-01 15:29:57 +00:00
done