diff options
author | Nick Mathewson <nickm@torproject.org> | 2017-01-27 11:16:23 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2017-01-30 08:37:27 -0500 |
commit | d71fc474385281453eaa93522479d32af85c94ef (patch) | |
tree | 30ed6c8ae1f20ff2bd7e37be07c7a12e67e588c9 /src/test/fuzz_static_testcases.sh | |
parent | 2202ad7ab0132ed5505067aca9020caa05c918fd (diff) | |
download | tor-d71fc474385281453eaa93522479d32af85c94ef.tar.gz tor-d71fc474385281453eaa93522479d32af85c94ef.zip |
Update documentation and testing integration for fuzzing
Diffstat (limited to 'src/test/fuzz_static_testcases.sh')
-rwxr-xr-x | src/test/fuzz_static_testcases.sh | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/src/test/fuzz_static_testcases.sh b/src/test/fuzz_static_testcases.sh index 276bc6e157..bfe1677573 100755 --- a/src/test/fuzz_static_testcases.sh +++ b/src/test/fuzz_static_testcases.sh @@ -5,11 +5,23 @@ set -e +if [ -z "${TOR_FUZZ_CORPORA}" ] || [ ! -d "${TOR_FUZZ_CORPORA}" ] ; then + echo "You need to set TOR_FUZZ_CORPORA to point to a checkout of " + echo "the 'fuzzing-corpora' repository." + exit 77 +fi + + + for fuzzer in "${builddir:-.}"/src/test/fuzz/fuzz-* ; do f=`basename $fuzzer` case="${f#fuzz-}" - echo "Running tests for ${case}" - for entry in ${abs_top_srcdir:-.}/src/test/fuzz/data/${case}/*; do - "${fuzzer}" "--err" < "$entry" - done + if [ -d "${TOR_FUZZ_CORPORA}/${case}" ]; then + echo "Running tests for ${case}" + for entry in "${TOR_FUZZ_CORPORA}/${case}/"*; do + "${fuzzer}" "--err" < "$entry" + done + else + echo "No tests found for ${case}" + fi done |