Fix test_report for AFL.

This commit is contained in:
Oliver Chang 2017-02-16 21:43:31 -08:00
parent 76762126ce
commit d68a23644e
1 changed files with 11 additions and 2 deletions

View File

@ -27,13 +27,22 @@ for FUZZER_BINARY in $(find $OUT/ -executable -type f); do
continue
fi
N=$[$N+1]
FUZZER=$(basename $FUZZER_BINARY)
if echo "$FUZZER" | grep "^afl-" > /dev/null 2>&1; then
continue
fi
N=$[$N+1]
echo "testing $FUZZER"
# run fuzzer.
FUZZER_STDOUT=$(tempfile)
run_fuzzer $FUZZER -max_total_time=20 |& tee $FUZZER_STDOUT
if [[ "$FUZZING_ENGINE" = libfuzzer ]]; then
run_fuzzer $FUZZER -max_total_time=20 |& tee $FUZZER_STDOUT
else
export AFL_NO_UI=1
timeout --preserve-status -s INT 20s run_fuzzer $FUZZER |& tee $FUZZER_STDOUT
fi
FUZZER_STATUS=${PIPESTATUS[0]}
FAILURES=0