Add fuzz.sh to do fuzzing with go-fuzz (#194)

Fixes #181
This commit is contained in:
Kazuyoshi Kato
2017-10-21 16:37:53 -07:00
committed by Thomas Pelletier
parent a410399d2c
commit 1916042ba2
3 changed files with 47 additions and 0 deletions
Executable
+15
View File
@@ -0,0 +1,15 @@
#! /bin/sh
set -eu
go get github.com/dvyukov/go-fuzz/go-fuzz
go get github.com/dvyukov/go-fuzz/go-fuzz-build
if [ ! -e toml-fuzz.zip ]; then
go-fuzz-build github.com/pelletier/go-toml
fi
rm -fr fuzz
mkdir -p fuzz/corpus
cp *.toml fuzz/corpus
go-fuzz -bin=toml-fuzz.zip -workdir=fuzz