You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

31 lines
731 B

  1. set -e
  2. buildDir=../build
  3. if [ $# -gt 0 ]; then
  4. buildDir=$1
  5. fi
  6. for testSource in $(ls -1 *.cc); do
  7. test=$(echo $testSource | sed -e 's/\.cc$//')
  8. if [ ! -x $buildDir/fuzz/$test ] ; then
  9. echo "Failed to find binary for $test"
  10. exit 1
  11. fi
  12. if [ ! -d ${test}_corpus ]; then
  13. echo "Failed to find corpus directory for $test"
  14. exit 1
  15. fi
  16. if [ -d ${test}_corpus_old ]; then
  17. echo "Old corpus directory for $test already exists"
  18. exit 1
  19. fi
  20. done
  21. for testSource in $(ls -1 *.cc); do
  22. test=$(echo $testSource | sed -e 's/\.cc$//')
  23. mv ${test}_corpus ${test}_corpus_old
  24. mkdir ${test}_corpus
  25. $buildDir/fuzz/$test -max_len=50000 -merge=1 ${test}_corpus ${test}_corpus_old
  26. rm -Rf ${test}_corpus_old
  27. done