blob: b54863eccf8c9d1bd82e2ba4b27807ad3ac0e53b [file] [log] [blame]
Joe Drago76370232019-07-16 11:00:52 -07001#!/bin/bash
2
3command -v afl-clang >/dev/null 2>&1 || { echo >&2 "Please install afl-clang."; exit 1; }
4command -v afl-fuzz >/dev/null 2>&1 || { echo >&2 "Please install afl-fuzz."; exit 1; }
5
6mkdir build.fuzz
7cd build.fuzz
Joe Drago53355352019-10-28 19:04:51 -07008CC=afl-clang cmake -G Ninja .. -DAVIF_CODEC_AOM=0 -DAVIF_BUILD_AOM=0 -DAVIF_CODEC_DAV1D=1 -DAVIF_LOCAL_DAV1D=1 -DAVIF_BUILD_TESTS=1 || exit 1
Joe Drago76370232019-07-16 11:00:52 -07009ninja || exit 1
10AFL_EXIT_WHEN_DONE=1 afl-fuzz -t 200 -i ../tests/inputs -o output.$(date "+%Y.%m.%d-%H.%M.%S") ./aviffuzz @@