libpsl/fuzz/get_all_corpora

19 lines
617 B
Plaintext
Raw Permalink Normal View History

2017-07-19 15:02:03 +02:00
#!/bin/sh -eu
#
#
2017-07-27 11:29:29 +02:00
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
2017-07-19 15:02:03 +02:00
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_LIBICU 1' ../config.h); then RUNTIME="_icu";
else RUNTIME=""; fi
2017-07-27 11:29:29 +02:00
for fuzzer in `ls *_fuzzer.c|cut -d'_' -f2-|cut -d'.' -f1`; do
./get_ossfuzz_corpora libpsl${RUNTIME}_$fuzzer
2017-07-19 15:02:03 +02:00
done