oss-fuzz-copy.sh 936 B

1234567891011121314151617181920212223242526
  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. # fuzz_binary_message and fuzz_tcp_message have the same corpus, just copy the .zip
  15. cp $OUT/fuzz_binary_message_seed_corpus.zip $OUT/fuzz_tcp_message_seed_corpus.zip
  16. cp $SRC/open62541/tests/fuzz/*.dict $SRC/open62541/tests/fuzz/*.options $OUT/
  17. # Copy the fuzzer stuff from mdns
  18. SRC=$SRC/open62541/deps $SRC/open62541/deps/mdnsd/tests/fuzz/oss-fuzz-copy.sh