diff options
author | Nikias Bassen | 2017-05-29 04:08:29 +0200 |
---|---|---|
committer | Nikias Bassen | 2017-05-29 04:08:29 +0200 |
commit | 99f3ab144dcaa97a2be37e562740dbff2de350c6 (patch) | |
tree | b6540c04944d1e493e95693c70b2d39e8b01302b /fuzz/test-fuzzers.sh | |
parent | 1e89644636438269bcedb50f3eabf0780d0074ac (diff) | |
download | libplist-99f3ab144dcaa97a2be37e562740dbff2de350c6.tar.gz libplist-99f3ab144dcaa97a2be37e562740dbff2de350c6.tar.bz2 |
Integrate fuzzers into build system
Diffstat (limited to 'fuzz/test-fuzzers.sh')
-rwxr-xr-x | fuzz/test-fuzzers.sh | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/fuzz/test-fuzzers.sh b/fuzz/test-fuzzers.sh new file mode 100755 index 0000000..5c758c4 --- /dev/null +++ b/fuzz/test-fuzzers.sh @@ -0,0 +1,33 @@ +#!/bin/sh + +CURDIR=`pwd` +FUZZDIR=`dirname $0` + +cd ${FUZZDIR} + +if ! test -x xplist_fuzzer || ! test -x bplist_fuzzer; then + echo "ERROR: you need to build the fuzzers first." + cd ${CURDIR} + exit 1 +fi + +if ! test -d xplist-input || ! test -d bplist-input; then + echo "ERROR: fuzzer corpora directories are not present. Did you run init-fuzzers.sh ?" + cd ${CURDIR} + exit 1 +fi + +echo "### TESTING xplist_fuzzer ###" +if ! ./xplist_fuzzer xplist-input -dict=xplist.dict -runs=10000; then + cd ${CURDIR} + exit 1 +fi + +echo "### TESTING bplist_fuzzer ###" +if ! ./bplist_fuzzer bplist-input -dict=bplist.dict -runs=10000; then + cd ${CURDIR} + exit 1 +fi + +cd ${CURDIR} +exit 0 |