fuzz_static_testcases.sh 673 B

123456789101112131415161718192021222324252627
  1. #!/bin/sh
  2. # Copyright (c) 2016-2017, The Tor Project, Inc.
  3. # See LICENSE for licensing information
  4. set -e
  5. if [ -z "${TOR_FUZZ_CORPORA}" ] || [ ! -d "${TOR_FUZZ_CORPORA}" ] ; then
  6. echo "You need to set TOR_FUZZ_CORPORA to point to a checkout of "
  7. echo "the 'fuzzing-corpora' repository."
  8. exit 77
  9. fi
  10. for fuzzer in "${builddir:-.}"/src/test/fuzz/fuzz-* ; do
  11. f=`basename $fuzzer`
  12. case="${f#fuzz-}"
  13. if [ -d "${TOR_FUZZ_CORPORA}/${case}" ]; then
  14. echo "Running tests for ${case}"
  15. for entry in "${TOR_FUZZ_CORPORA}/${case}/"*; do
  16. "${fuzzer}" "--err" < "$entry"
  17. done
  18. else
  19. echo "No tests found for ${case}"
  20. fi
  21. done