Commit c14ffd3c authored by Erik Wilson's avatar Erik Wilson

Clean up sonobuoy e2e tests

parent 853708c8
......@@ -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