Fix Tor build with non-existent seed corpus for some fuzzers (#469). (#481)

This commit is contained in:
Abhishek Arya 2017-03-26 19:26:59 -07:00 committed by GitHub
parent 553b2396cb
commit 2d5e2ef84f
1 changed files with 5 additions and 1 deletions

View File

@ -43,7 +43,11 @@ for fuzzer in src/test/fuzz/*.a; do
output="${fuzzer%.a}"
output="${output##*lib}"
${CXX} ${CXXFLAGS} -std=c++11 -lFuzzingEngine ${fuzzer} ${TORLIBS} -o ${OUT}/${output}
zip -j ${OUT}/${output}_seed_corpus.zip ${SRC}/tor-fuzz-corpora/${output#oss-fuzz-}/*
corpus_dir="${SRC}/tor-fuzz-corpora/${output#oss-fuzz-}"
if [ -d "${corpus_dir}" ]; then
zip -j ${OUT}/${output}_seed_corpus.zip ${corpus_dir}/*
fi
done