wasmtime: Only zip the seed corpus if it exists (#4065)

This will prevent build failures like
https://oss-fuzz-build-logs.storage.googleapis.com/log-5a0b58fe-4a35-46d5-b4d2-221905e7d208.txt
in the future.
This commit is contained in:
Nick Fitzgerald 2020-07-06 10:46:47 -07:00 committed by GitHub
parent ba72f0b7fc
commit 82252c22ef
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 1 deletions

View File

@ -27,6 +27,12 @@ for f in $SRC/wasmtime/fuzz/fuzz_targets/*.rs
do
FUZZ_TARGET_NAME=$(basename ${f%.*})
cp $FUZZ_TARGET_OUTPUT_DIR/$FUZZ_TARGET_NAME $OUT/
zip -jr $OUT/${FUZZ_TARGET_NAME}_seed_corpus.zip $PROJECT_DIR/wasmtime-libfuzzer-corpus/$FUZZ_TARGET_NAME/
if [[ -d $PROJECT_DIR/wasmtime-libfuzzer-corpus/$FUZZ_TARGET_NAME/ ]]; then
zip -jr \
$OUT/${FUZZ_TARGET_NAME}_seed_corpus.zip \
$PROJECT_DIR/wasmtime-libfuzzer-corpus/$FUZZ_TARGET_NAME/
fi
cp $SRC/default.options $OUT/$FUZZ_TARGET_NAME.options
done