oss-fuzz-copy.sh 655 B

12345678910111213141516171819
  1. #!/usr/bin/env bash
  2. set -e
  3. # --------------------------------------------------------------------
  4. # Copies all the corpus files, dict and options to the $OUT directory.
  5. # This script is only used on oss-fuzz directly
  6. # --------------------------------------------------------------------
  7. fuzzerFiles=$(find $SRC/open62541/tests/fuzz/ -name "*.cc")
  8. for F in $fuzzerFiles; do
  9. fuzzerName=$(basename $F .cc)
  10. if [ -d "$SRC/open62541/tests/fuzz/${fuzzerName}_corpus" ]; then
  11. zip -jr $OUT/${fuzzerName}_seed_corpus.zip $SRC/open62541/tests/fuzz/${fuzzerName}_corpus/
  12. fi
  13. done
  14. cp $SRC/open62541/tests/fuzz/*.dict $SRC/open62541/tests/fuzz/*.options $OUT/