open-consul/.circleci/scripts/rerun-fails-report.sh
Dhia Ayachi 9528a3bf1f
Rerun go-test and go-test-32bits tests up to 3 times before failing (#11059)
* Rerun go-test and go-test-32bits tests up to 3 times before failing

* do not run rerun fail report in oss

* set back rerun fail report but print to stdin instead of comment
2021-09-20 16:04:59 -04:00

21 lines
433 B
Bash
Executable file

#!/usr/bin/env bash
#
# Add a comment on the github PR if there were any rerun tests.
#
set -eu -o pipefail
report_filename="${1?report filename is required}"
if [ ! -s "$report_filename" ]; then
echo "gotestsum rerun report file is empty or missing"
exit 0
fi
function report {
echo ":repeat: gotestsum re-ran some tests in $CIRCLE_BUILD_URL"
echo
echo '```'
cat "$report_filename"
echo '```'
}
report