Unverified Commit 02c094f3 authored by Erik Wilson's avatar Erik Wilson Committed by GitHub

Merge pull request #596 from erikwilson/e2e-watch-fix

Clean up sonobuoy e2e tests
parents 853708c8 c9383be7
......@@ -2,7 +2,7 @@ FROM golang:1.12.1-alpine3.9
RUN apk -U --no-cache add bash git docker curl jq coreutils
RUN go get -d github.com/heptio/sonobuoy && \
git -C /go/src/github.com/heptio/sonobuoy checkout -b current v0.14.2 && \
git -C /go/src/github.com/heptio/sonobuoy checkout -b current v0.14.3 && \
go install github.com/heptio/sonobuoy
RUN rm -rf /go/src /go/pkg
......
......@@ -148,8 +148,14 @@ sonobuoy retrieve ${OUTPUT}
results="./plugins/e2e/results/e2e.log"
[ -s ${results} ] || exit 1
tail -20 ${results}
exit_code=0
status=$(tail -5 ${results} | grep '^SUCCESS!.*| 0 Failed |' >/dev/null && echo passed || echo failed)
[ "${status}" = "failed" ] && exit_code=1
if [ -n "${E2E_LOG_OUTPUT}" ]; then
cp ${results} $(echo ${E2E_LOG_OUTPUT} | sed -e "s/-STATUS-/-${status}-/g")
fi
exit ${exit_code}
)
......@@ -3,6 +3,15 @@ set -e -x
cd $(dirname $0)/..
cleanup() {
exit_code=$?
set +e
echo "Waiting on the tests!"
wait
exit ${exit_code}
}
trap cleanup EXIT
if [ -z "$K3S_IMAGE" ]; then
source $(dirname $0)/version.sh
TAG=${TAG:-${VERSION}${SUFFIX}}
......@@ -23,19 +32,17 @@ run-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
cleanup() {
exit_status=$?
set +e
echo "Waiting on the tests!"
wait
exit ${exit_status}
}
trap cleanup EXIT
wait ${pids[@]}
exit_code=0
for pid in "${pids[@]}"; do
wait $pid || exit_code=$?
done
trap - EXIT
exit ${exit_code}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment