Skip to content

Commit

Permalink
fuzz/run_fuzzer: Run single seed file when given as argument.
Browse files Browse the repository at this point in the history
  • Loading branch information
silentbicycle authored and katef committed Sep 11, 2023
1 parent c646868 commit 0789d61
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions fuzz/run_fuzzer
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ BUILD=../build
FUZZER=${BUILD}/fuzz/fuzzer
SEEDS=${BUILD}/fuzz/fuzzer_seeds

ARG=$1

SECONDS=${SECONDS:-60}
WORKERS=${WORKERS:-4}
SEEDS=${SEEDS:-seeds}
Expand All @@ -25,5 +27,9 @@ if [ ! -d "${SEEDS}" ]; then
mkdir -p "${SEEDS}"
fi

echo "\n==== ${FUZZER}"
${FUZZER} -jobs=${WORKERS} -workers=${WORKERS} -max_total_time=${SECONDS} ${SEEDS}
if [ -z "${ARG}" ]; then
echo "\n==== ${FUZZER}"
exec ${FUZZER} -jobs=${WORKERS} -workers=${WORKERS} -max_total_time=${SECONDS} ${SEEDS}
else
exec ${FUZZER} ${ARG}
fi

0 comments on commit 0789d61

Please sign in to comment.