Skip to content

Commit db89852

Browse files
committed
script should exit with an error code if the crash is found
1 parent 56c41fe commit db89852

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

scripts/run-fuzzer.sh

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,10 +95,13 @@ if [[ -d "$CRASH_DIR" ]]; then
9595
CRASH_COUNT=$(find "$CRASH_DIR" -type f | wc -l | tr -d ' ')
9696
if [[ "$CRASH_COUNT" -gt 0 ]]; then
9797
echo "⚠️ Found $CRASH_COUNT crashes from this fuzzing run."
98+
exit 1
9899
else
99100
echo "✅ No crashes detected."
101+
exit 0
100102
fi
101103
else
102-
echo "⚠️ Crash directory not found: $CRASH_DIR"
103-
echo " (Fuzzer output structure may have changed)"
104+
echo "❌ Crash directory not found: $CRASH_DIR"
105+
echo " (Fuzzer output structure may have changed or fuzzing failed)"
106+
exit 2
104107
fi

0 commit comments

Comments
 (0)