Skip to content

Commit

Permalink
Logs failing fuzz inputs
Browse files Browse the repository at this point in the history
  • Loading branch information
vyzaldysanchez committed Feb 7, 2024
1 parent 8fb7094 commit f666158
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tools/bin/go_core_fuzz
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,8 @@ SCRIPT_PATH=`dirname "$0"`; SCRIPT_PATH=`eval "cd \"$SCRIPT_PATH\" && pwd"`
OUTPUT_FILE=${OUTPUT_FILE:-"./output.txt"}
USE_TEE="${USE_TEE:-true}"

echo "Failed tests and panics: ---------------------"
echo "Failed fuzz tests and panics: ---------------------"
echo ""
GO_LDFLAGS=$(bash tools/bin/ldflags)
use_tee() {
if [ "$USE_TEE" = "true" ]; then
tee "$@"
Expand All @@ -29,8 +28,9 @@ fi

echo "Exit code: $EXITCODE"
if [[ $EXITCODE != 0 ]]; then
echo "Encountered test failures."
echo "Encountered fuzz test failures. Logging all failing fuzz inputs:"
find . -type f|fgrep '/testdata/fuzz/'|while read f; do echo $f; cat $f; done
else
echo "All tests passed!"
echo "All fuzz tests passed!"
fi
exit $EXITCODE

0 comments on commit f666158

Please sign in to comment.