mirror of https://github.com/google/oss-fuzz.git
[zstd] Move downloading seed corpora to build.sh (#2331)
I just added a new fuzzer, `zstd_frame_info`, and want to be able to add new fuzzers without submitting a pull request to oss-fuzz. This change uses zstd's Makefile to download the corpora. Now I can add a new fuzzer to zstd and it will automatically get built and download the seed corpus in oss-fuzz.
This commit is contained in:
parent
7bdfb2b7d8
commit
fb7075b1ed
|
@ -16,17 +16,7 @@
|
|||
|
||||
FROM gcr.io/oss-fuzz-base/base-builder
|
||||
MAINTAINER nickrterrell@gmail.com
|
||||
RUN apt-get update && apt-get install -y make python
|
||||
# Add corpora
|
||||
ADD https://github.com/facebook/zstd/releases/download/fuzz-corpora/block_decompress_seed_corpus.zip \
|
||||
https://github.com/facebook/zstd/releases/download/fuzz-corpora/block_round_trip_seed_corpus.zip \
|
||||
https://github.com/facebook/zstd/releases/download/fuzz-corpora/simple_decompress_seed_corpus.zip \
|
||||
https://github.com/facebook/zstd/releases/download/fuzz-corpora/simple_round_trip_seed_corpus.zip \
|
||||
https://github.com/facebook/zstd/releases/download/fuzz-corpora/stream_decompress_seed_corpus.zip \
|
||||
https://github.com/facebook/zstd/releases/download/fuzz-corpora/stream_round_trip_seed_corpus.zip \
|
||||
https://github.com/facebook/zstd/releases/download/fuzz-corpora/dictionary_decompress_seed_corpus.zip \
|
||||
https://github.com/facebook/zstd/releases/download/fuzz-corpora/dictionary_round_trip_seed_corpus.zip \
|
||||
$SRC/
|
||||
RUN apt-get update && apt-get install -y make python wget
|
||||
# Clone source
|
||||
RUN git clone --depth 1 https://github.com/facebook/zstd
|
||||
WORKDIR zstd
|
||||
|
|
|
@ -18,6 +18,9 @@
|
|||
|
||||
cd tests/fuzz
|
||||
|
||||
# Download the seed corpora
|
||||
make -j seedcorpora
|
||||
# Build all of the fuzzers
|
||||
./fuzz.py build all
|
||||
|
||||
for target in $(./fuzz.py list); do
|
||||
|
@ -33,5 +36,5 @@ for target in $(./fuzz.py list); do
|
|||
cp "$target.dict" "$OUT"
|
||||
fi
|
||||
|
||||
cp "$SRC/${target}_seed_corpus.zip" "$OUT"
|
||||
cp "corpora/${target}_seed_corpus.zip" "$OUT"
|
||||
done
|
||||
|
|
Loading…
Reference in New Issue