Improve fuzz/get_all_corpora

This commit is contained in:
Tim Rühsen 2017-07-27 11:29:29 +02:00
parent c1bf52dbc3
commit 4abb701b2c
1 changed files with 8 additions and 2 deletions

View File

@ -2,11 +2,17 @@
# #
# #
if ! grep -q FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION Makefile; then
echo "The build environment hasn't been set up for fuzzing (likely for regression testing)."
echo "Please built regarding README.md and try again."
exit 1
fi
if $(grep -q '^#define WITH_LIBIDN2 1' ../config.h); then RUNTIME="_idn2"; if $(grep -q '^#define WITH_LIBIDN2 1' ../config.h); then RUNTIME="_idn2";
elif $(grep -q '^#define WITH_LIBIDN 1' ../config.h); then RUNTIME="_idn"; elif $(grep -q '^#define WITH_LIBIDN 1' ../config.h); then RUNTIME="_idn";
elif $(grep -q '^#define WITH_LIBICU 1' ../config.h); then RUNTIME="_icu"; elif $(grep -q '^#define WITH_LIBICU 1' ../config.h); then RUNTIME="_icu";
else RUNTIME=""; fi else RUNTIME=""; fi
for fuzzer in libpsl${RUNTIME}*_fuzzer; do for fuzzer in `ls *_fuzzer.c|cut -d'_' -f2-|cut -d'.' -f1`; do
./get_ossfuzz_corpora $fuzzer ./get_ossfuzz_corpora libpsl${RUNTIME}_$fuzzer
done done