Browse Source

Show failing logs

pull/954/head
Erik Wilson 5 years ago
parent
commit
1cafdb8653
  1. 23
      scripts/sonobuoy-e2e-tests

23
scripts/sonobuoy-e2e-tests

@ -17,6 +17,28 @@ mkdir -p ${OUTPUT}
pids=() pids=()
output=() output=()
show-logs() {
for pid in "${pids[@]}"; do
logdir=$(pwd)/logs/${pid}
if [ ! -d $logdir ]; then
continue
fi
echo
echo "#- Begin: logs for sonobuoy run pid ${pid}"
for log in $(pwd)/logs/${pid}/*; do
if [ -f ${log} ]; then
echo
echo "#- Start: ${log}"
cat ${log}
echo "#- End: ${log}"
echo
fi
done
echo "#- Finish: logs for sonobuoy run pid ${pid}"
echo
done
}
cleanup() { cleanup() {
exit_status=$? exit_status=$?
set +e set +e
@ -29,6 +51,7 @@ cleanup() {
echo "passed" echo "passed"
else else
echo "failed" echo "failed"
show-logs
fi fi
exit ${exit_status} exit ${exit_status}
} }

Loading…
Cancel
Save